bit-guber commited on
Commit
08500ba
1 Parent(s): 12e9206

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- # annotatedImage = image.copy()
167
- # for (x, y, w, h) in rawfaces:
168
- # cv2.rectangle(annotatedImage, (x, y), (x+w, y+h), (255, 0, 0), 2)
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 = []
 
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 = []