njgroene commited on
Commit
6838488
1 Parent(s): 1f89823

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ from torch_mtcnn import show_bboxes
16
  # pipeline = pipeline(task="image-classification", model="njgroene/fairface")
17
  def pipeline(img):
18
  bounding_boxes, landmarks = detect_faces(img)
19
-
20
  img_cropped = img.crop(bb)
21
 
22
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
 
16
  # pipeline = pipeline(task="image-classification", model="njgroene/fairface")
17
  def pipeline(img):
18
  bounding_boxes, landmarks = detect_faces(img)
19
+ bb = [bounding_boxes[0,0], bounding_boxes[0,1], bounding_boxes[0,2], bounding_boxes[0,3]]
20
  img_cropped = img.crop(bb)
21
 
22
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")