Skip to content

Commit

Permalink
Update fer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharun-Anand authored Sep 13, 2022
1 parent 9d13008 commit 2bf9824
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fer/fer.py
Original file line number Diff line number Diff line change
@@ -190,8 +190,9 @@ def find_faces(self, img: np.ndarray, bgr=True) -> list:
boxes,probs = self._mtcnn.detect(img)
faces=[]
print(boxes)
face=boxes[0]
faces.append([int(face[0]),int(face[1]),int(face[2])-int(face[0]),int(face[3])-int(face[1])])
if boxes:
face=boxes[0]
faces.append([int(face[0]),int(face[1]),int(face[2])-int(face[0]),int(face[3])-int(face[1])])

return faces

0 comments on commit 2bf9824

Please sign in to comment.