-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect bounding box #1242
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am facing the same issue. I am detecting the faces and saving the cropped face image on local drive to further train a facial recognition model. But the bounding box is only accurate on top left corner. Other corners are expanded. Below is my code:
`from facenet_pytorch import MTCNN
import cv2
import os
mtcnn = MTCNN(keep_all=True, device='cuda:0')
dir_path = 'assets/raw/ammar'
save_path = 'assets/face_raw/ammar'
files = os.listdir(dir_path)
for file in files:
img = cv2.imread(dir_path+"/"+file, cv2.COLOR_BGR2RGB)
boxes, _ = mtcnn.detect(img)
I'm stuck here and cannot find a solution.
The text was updated successfully, but these errors were encountered: