FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add dlib (#721) · JasonYan99/docker-python@e3d1d8c · GitHub

Repository navigation

Commit e3d1d8c

Browse files
authored
Add dlib (Kaggle#721)
1 parent d17d766 commit e3d1d8c

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎Dockerfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ RUN pip install flashtext && \
469469
pip install bqplot && \
470470
pip install earthengine-api && \
471471
pip install transformers && \
472+
pip install dlib && \
472473
pip install kaggle-environments && \
473474
# b/149905611 The geopandas tests are broken with the version 0.7.0
474475
pip install geopandas==0.6.3 && \

‎tests/data/face.jpg‎

35.8 KB
LoadingViewer requires iframe.

‎tests/test_dlib.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import unittest
2+
3+
import cv2
4+
import dlib
5+
6+
7+
class TestDLib(unittest.TestCase):
8+
def test_dlib_face_detector(self):
9+
detector = dlib.get_frontal_face_detector()
10+
image = cv2.imread('/input/tests/data/face.jpg')
11+
image_gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
12+
faces = detector(image_gray, 1)
13+
14+
self.assertEqual(len(faces), 1)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL