faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

No face detected. (Extract)

Open room3dev opened this issue 8 years ago • 3 comments

Hi, I try to move from FakeApp to deepfakes/faceswap but I found that faceswap extractor fails to extract the face from so many images while FakeApp can found all of them. (here the example image)

How can I extract the faces like I do in FakeApp?

room3dev avatar Feb 01 '18 04:02 room3dev

I tried the 3 yet known methods (face_recognition from @ageitgey, haarcascade from opencv, get_frontal_face_detector from dlib) and all 3 fail on detecting the face on your image.

I rotated it and then it was working, so the problem seem to come from the angle. Maybe there is some parameter to improve that. We could also rotate images if no face is found. Also we can have a look at the fakeapp method if possible

Clorr avatar Feb 01 '18 11:02 Clorr

Ok, I checked in FakeApp, and it uses dlib.cnn_face_detection_model_v1("mmod_human_face_detector.dat"). It seems to support more angles but is also much more resource intensive and seems to fails on large images (I had a bad_alloc on a 2K wide image).

Maybe we should add it, but as fallback.

Clorr avatar Feb 01 '18 12:02 Clorr

Added in #109

Note that it is really slow, and may conflict with multithreading, but I need your feedback on that...

Clorr avatar Feb 03 '18 18:02 Clorr