Skip to content

Commit

Permalink
Changed complete detector to use Face, Profile and Glasses Detectors.
Browse files Browse the repository at this point in the history
  • Loading branch information
heynemann committed Mar 27, 2013
1 parent cb25fe5 commit d78370e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion remotecv/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.7.1'
__version__ = '0.7.2'
19 changes: 9 additions & 10 deletions remotecv/detectors/complete_detector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d78370e

Please sign in to comment.