-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed complete detector to use Face, Profile and Glasses Detectors.
- Loading branch information
Showing
2 changed files
with
10 additions
and
11 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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.7.1' | ||
__version__ = '0.7.2' |
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 |
---|---|---|
|
@@ -4,26 +4,25 @@ | |
# thumbor imaging service | ||
# https://github.com/globocom/thumbor/wiki | ||
|
||
# Licensed under the MIT license: | ||
# Licensed under the MIT license: | ||
# http://www.opensource.org/licenses/mit-license | ||
# Copyright (c) 2011 globo.com [email protected] | ||
|
||
from remotecv.detectors import CascadeLoaderDetector | ||
from remotecv.detectors.face_detector import FaceDetector | ||
from remotecv.detectors.feature_detector import FeatureDetector | ||
from remotecv.detectors.glasses_detector import GlassesDetector | ||
from remotecv.detectors.profile_detector import ProfileDetector | ||
|
||
|
||
class CompleteDetector(CascadeLoaderDetector): | ||
|
||
def detect(self, image): | ||
face_detector = FaceDetector() | ||
feature_detector = FeatureDetector() | ||
|
||
feature_points = [] | ||
glasses_detector = GlassesDetector() | ||
profile_detector = ProfileDetector() | ||
|
||
face_points = face_detector.detect(image) or [] | ||
glasses_points = glasses_detector.detect(image) or [] | ||
profile_points = profile_detector.detect(image) or [] | ||
|
||
if not face_points: | ||
feature_points = feature_detector.detect(image) or [] | ||
|
||
return face_points + feature_points | ||
|
||
return face_points + glasses_points + profile_points |