Open HoangTienDuc opened 4 years ago
I have tried the face align script provided by the author to preprocess lfw, and I cannot get a similar result as reported one. I found that the aligned image is a little different from downloaded here, and when I downloaded from cosface[https://awesomeopensource.com/project/yule-li/CosFace], it works.....................
After trying to visualize the results aligned by the code here, I found it did not work.
Following is the image aligned by the code here with LFW dataset:
I recommend using TF MTCNN to detect faces, and remove extra faces like insightface.
thank for your advice.
The function detect_faces in detector.py gives a list of bounding boxes and landmark sets, where each entry of the list corresponds to a face detected. You can iterarate through all detected faces or use just the first. If you are only interested in the largest face in the image, you can set min_face_size to a value (potentially dependent on the image dimension) large enough to eliminate all other faces. For instance, you can set min_face_size = np.float(pil_image.size[0])/4 to detect only faces that are at least 1/4 of image width wide.
For alignment and cropping, please see my response to issue #138.
There are some images that contain more than 1 face. How did you filter out unwanted faces?