Open zhengge opened 7 years ago
I found the same problem. Is it supposed to just crop? When I have rotated faces, the recognition precision goes down.
@lrsperanza Did you rotate the test dataset?
@zhengge you can see https://github.com/davidsandberg/facenet/issues/93
@xizi thanks
@zhengge no, I didn't. Because MTCNN detects faces even when they are rotated by 90 degrees, I thought that I could somehow use it to rotate the faces back to a vertical position. When the face is too rotated, MTCNN won't detect the landmarks properly so that I could use them to rotate the faces back to an upright position like described by dougsouza on #93. I'm seriously considering training a neural network for the sole task of detecting if an image is rotated by 90º, 180º or 270º so that it can be rotated back
I've been doing more tests in the last minutes, and it seems that MTCNN doesn't recognize faces when they are rotated by more than 90 degrees. It was returning random picture rectangles as faces, that's why the landmarks weren't working.
@lrsperanza I don't understand what you said, When the face is too rotated, MTCNN won't detect the landmarks properly. So you think that training a neural network with unaligned face has a better result. Is this what you mean?
@zhengge when the faces are rotated by more than +-90 degrees, it won't detect the face at all, most of the times. I've been considering creating a whole new neural network apart from mtcnn and apart from facenet to detect rotated pictures and rotate them back to the proper position so that mtcnn can detect the faces and facenet can recognize them properly when the user's input image is rotated to begin with
Firstly, Thanks. Please include the alignment code based on the mtcnn landmark points. I have found out that the current code does not align the cropped face chips. I can prove that the face recognition accuracy improves significantly if the images are aligned properly.
Yeah, @achbogga is correct. Does anybody has the Tensorflow version of MTCNN alignment.
@davidsandberg
I have been reading the facenet paper very closely, the authors claim that the network is so strong that a tight face crop over the face region is sufficient and no need of any rotation/any other transformation. That is why the alignment code produces tight crop rather than rotating the faces. However, the performance seems to increase if the alignment is also performed. Please correct me if I am wrong @davidsandberg.
@pavankumarkatakam: Currently I have no plans of making a tensorflow-only version of MTCNN. @achbogga: I agree. I have tried training with some rotations as extra augmentation and it looked like that could very slightly improve the results. But it was a bit inconclusive. I haven't tried doing some more intricate alignment of the test set only but that could be interresting to try.
Hi @davidsandberg ,
I'm studying the Machine Learning on Face Recognition recently and I found that your project is a great start so I'm reading all the python codes recently.
However, I found that your code in src/align/align_dataset_mtcnn.py did not align the face, and just cropped the face by bounding_boxes.
Thank you for the great project, I really appreciate your work.