Update app.py
Browse files
app.py
CHANGED
@@ -163,12 +163,12 @@ def image_inference(image):
|
|
163 |
faces = [ Image.fromarray(x, mode = 'RGB') for x in faces ]
|
164 |
ages, genders, beards, blurs, ethncities, masks = AnalysisFeatures( faces )
|
165 |
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
|
170 |
-
|
171 |
-
return frameWrapper( rawfaces, ages, genders, beards, blurs, ethncities, masks )
|
172 |
def video_inference(video_path):
|
173 |
|
174 |
global_facesCo = []
|
|
|
163 |
faces = [ Image.fromarray(x, mode = 'RGB') for x in faces ]
|
164 |
ages, genders, beards, blurs, ethncities, masks = AnalysisFeatures( faces )
|
165 |
|
166 |
+
annotatedImage = image.copy()
|
167 |
+
for (top, left, bottom, right) in rawfaces:
|
168 |
+
cv2.rectangle(annotatedImage, (top, left), (left, right), (255, 0, 0), 5)
|
169 |
|
170 |
+
return Image.fromarray(annotatedImage, mode = 'RGB'), frameWrapper( rawfaces, ages, genders, beards, blurs, ethncities, masks )
|
171 |
+
# return frameWrapper( rawfaces, ages, genders, beards, blurs, ethncities, masks )
|
172 |
def video_inference(video_path):
|
173 |
|
174 |
global_facesCo = []
|