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
Loss of precision with v1.3 #247
Comments
This is strange indeed, what function are you using to get the landmarks? Could you please attach the input image as seen by the detector, without points on top? |
Thanks for attaching it. The difference is caused by how the image normalization is performed. The correct one for SFD should be BGR+subtracting the mean. Prior to 1.3.0 there were some inconsistencies on this matter (during batch detection this was wrongly not performed). |
Thanks for taking the time to look into this. |
bonus question : for selfie images, cropping the face to a square introduces a lot of deformation. Would you recommend to retrain (or fine-tune) the network on these images ? |
@Xavier31 At the time this models were trained the noise was generated synthetically during training, neither SFD nor blaze face were released yet. The bounding boxes don't have to be square. The way the cropping works is by taking the bounding box and computing based on it a center point and a scale. Based on them a center crop and re-scaling is performed. There is no distortion introduced, the aspect ratio is preserved by the cropping function. The detectors provided already predict rectangles so they are not squares. You can pretty much use any detector you like, there is no particular preference for one or other as long as they perform well. |
ah thanks for the explanation, I did not realize the aspect ratio was preserved. But that means that in some cases, the cropped image will include a lot of background, and the heatmap that are far from the center of the image are much more noisy right ? |
What happens is that sometimes the face indeed can be too small (ie include a lot of background) or cropped out (lets see that the chin may get cut by mistake if the scale is off. |
Hi
It seems that the results of the update (version 1.3.1) are noticeably worse than the last one (version 1.2).
I made some benchmark and although it does not seem much in terms of NME, it is there and even more noticeable when you look at the images
(look at the eyes and temple landmarks)
version 1.2
version 1.3
I looked at a bunch of results on the FFHQ dataset, and noticed consistently worse precision.
I could not track down what causes this difference, my suspicion is currently on the new batch inference code but could not pinpoint it yet
The text was updated successfully, but these errors were encountered: