Skip to content
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

Unable to detect rotated faces / landmarks inaccurate #4

Open
xsacha opened this issue Aug 10, 2019 · 4 comments
Open

Unable to detect rotated faces / landmarks inaccurate #4

xsacha opened this issue Aug 10, 2019 · 4 comments

Comments

@xsacha
Copy link

xsacha commented Aug 10, 2019

t1
t4

These two test images look better in other implementations of RetinaFace for PyTorch, for eg.
https://github.com/bogireddytejareddy/retinaface-pytorch/blob/master/test_results/t1.jpg
https://github.com/bogireddytejareddy/retinaface-pytorch/blob/master/test_results/t4.jpg

@supernotman
Copy link
Owner

t1
t4

These two test images look better in other implementations of RetinaFace for PyTorch, for eg.
https://github.com/bogireddytejareddy/retinaface-pytorch/blob/master/test_results/t1.jpg
https://github.com/bogireddytejareddy/retinaface-pytorch/blob/master/test_results/t4.jpg

t1
t4

These two test images look better in other implementations of RetinaFace for PyTorch, for eg.
https://github.com/bogireddytejareddy/retinaface-pytorch/blob/master/test_results/t1.jpg
https://github.com/bogireddytejareddy/retinaface-pytorch/blob/master/test_results/t4.jpg

Thanks for your test.And i noticed the problem as well , i am still trying to figure it out and try to make the performance and recall for rotated faces better.
And i think there is some probable cause for this:

  1. I use different loss weight for cls,box and landmarks . In the paper,the author said the loss-balancing parameters are set to 1, 0.25, 0.1,but i see the origin code it seems to be 1,1,0.5(I am not sure).So this might influence the performance.
  2. I find that when i use random flip Augmentation, losses for landmarks seems weird like this:
    TIM截图20190812103320
    Some noises in landmark loss.But i checked the groundtruth and found no wrong label.
  3. There are some components to do like deformable convolution and data augumentation ways i listed in Todo list in readme. These may also make some affect.
    Still there are some bugs in the code and i am trying to fixed it. And it is welcomed to commit a issue if you have any find.
    Thanks.

@xsacha
Copy link
Author

xsacha commented Aug 19, 2019

Landmarks are more accurate after your latest bug fix! Getting high precision (over 90%) quite early now at about epoch 10.
Rotated faces are still not detected but I suppose that is due to the data loader.

Comparing to your result in README, which I was unable to achieve before:

---- [Epoch 39/200, Batch 400/403] ----
+----------------+-----------------------+
| loss name      | value                 |
+----------------+-----------------------+
| total_loss     | 0.09969855844974518   |
| classification | 0.09288528561592102   |
| bbox           | 0.0034053439740091562 |
| landmarks      | 0.003407923271879554  |
+----------------+-----------------------+
-------- RetinaFace Pytorch --------
Evaluating epoch 39
Recall: 0.7432201780921814
Precision: 0.906913273261629

I now get quite a bit better results than what you had:
Recall of 75% and precision of 94.5%

---- [Epoch 39/200, Batch 1600/1610] ----
+----------------+-----------------------+
| loss name      | value                 |
+----------------+-----------------------+
| total_loss     | 0.08609515428543091   |
| classification | 0.0003947564400732517 |
| bbox           | 0.035630300641059875  |
| landmarks      | 0.05007009953260422   |
+----------------+-----------------------+
-------- RetinaFace Pytorch --------
Evaluating epoch 39
Recall: 0.7492150513297574
Precision: 0.9453832716431287

@xsacha
Copy link
Author

xsacha commented Aug 20, 2019

Just a note that epoch 39 was actually the best epoch I had out of the lot, so it only got worse from there.

@supernotman
Copy link
Owner

Just a note that epoch 39 was actually the best epoch I had out of the lot, so it only got worse from there.

yes,I also noticed this.I am stilling trying to fix all these problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants