Saad0KH commited on
Commit
7dc84f1
Β·
verified Β·
1 Parent(s): fb8af93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -58,7 +58,8 @@ def detect_and_segment_persons(image, clothes):
58
 
59
  bboxes, kpss = detector.detect(img)
60
  if bboxes.shape[0] == 0: # Aucun visage dΓ©tectΓ©
61
- return []
 
62
 
63
  height, width, _ = img.shape # Get image dimensions
64
 
 
58
 
59
  bboxes, kpss = detector.detect(img)
60
  if bboxes.shape[0] == 0: # Aucun visage dΓ©tectΓ©
61
+ image_rm_background = remove_background(image)
62
+ return [encode_image_to_base64(image_rm_background)]
63
 
64
  height, width, _ = img.shape # Get image dimensions
65