-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from MacherLabs/dev
added mobilenet support
- Loading branch information
Showing
5 changed files
with
122 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ A face interface class implementing different face detection, alignment and reco | |
* Face Detector (detector_method='dlib') | ||
* Dlib CNN Face Detector (detector_method='cnn') | ||
* OpenCV Face Detector (detector_method='opencv') | ||
* Mobilenet Face Detector (detector_method='mobilenet') | ||
* Dlib Face Recognition (recognition_method='dlib') | ||
* Dlib Facial Landmarks (predictor_model='small' for 5 face landmarks) | ||
|
||
|
@@ -33,7 +34,6 @@ pip install --user git+ssh://[email protected]/macherlabs/facelib.git | |
|
||
import face, cv2 | ||
facedemo = face.Face(detector_method='dlib') | ||
|
||
image_url1 = 'test.png' | ||
image_url2 = 'test2.png' | ||
|
||
|
@@ -43,3 +43,13 @@ pip install --user git+ssh://[email protected]/macherlabs/facelib.git | |
if imgcv1 is not None and imgcv2 is not None: | ||
results = facedemo.compare(imgcv1, imgcv2) | ||
print results# facelib | ||
|
||
### Mobilenet usage ### | ||
|
||
faceDetector = Face(detector_method='mobilenet', | ||
detector_model='mobilenet_300_frozen_trt_inference_graph_face.pb', # Default mobilenet_512_frozen_inference_graph_face.pb | ||
recognition_method=None , | ||
gpu_frac=0.3, | ||
trt_enable=False,# converts graph to tensorrt optimized graph | ||
precision='FP16' # Defalut 'FP32', use 'FP16'only if gpu support is available | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from face import Face | ||
from .face import Face |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ | |
'face': ['models/*'], | ||
}, | ||
|
||
install_requires=['numpy', 'dlib'], | ||
install_requires=['numpy'], | ||
zip_safe=False | ||
) |