dvieri commited on
Commit
7972fcc
·
verified ·
1 Parent(s): 28e6e92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -68,6 +68,9 @@ def extract_hog_features(img):
68
  return hog_features
69
 
70
  def get_face(img):
 
 
 
71
  detector = MTCNN()
72
  faces = detector.detect_faces(img)
73
  if faces:
 
68
  return hog_features
69
 
70
  def get_face(img):
71
+ img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
72
+ img = img.astype(np.float32) / 255.0
73
+
74
  detector = MTCNN()
75
  faces = detector.detect_faces(img)
76
  if faces: