| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d17d766 commit e3d1d8c
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -469,6 +469,7 @@ RUN pip install flashtext && \ | |||
| 469 | 469 | pip install bqplot && \ | |
| 470 | 470 | pip install earthengine-api && \ | |
| 471 | 471 | pip install transformers && \ | |
| 472 | + pip install dlib && \ | ||
| 472 | 473 | pip install kaggle-environments && \ | |
| 473 | 474 | # b/149905611 The geopandas tests are broken with the version 0.7.0 | |
| 474 | 475 | pip install geopandas==0.6.3 && \ | |
| Original file line number | Diff line number | Diff 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) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments