emilianavt / OpenSeeFace

Robust realtime face and facial landmark tracking on CPU with Unity integration
BSD 2-Clause "Simplified" License
1.44k stars 151 forks source link

random resuls of landmark model (-1) #7

Closed sasanasadiabadi closed 4 years ago

sasanasadiabadi commented 4 years ago

Trying the new landmark model, It seems that I get random landmarks. You mention that accuracy is very low, but I wonder if I'm doing some mistake! could you share some sample results of the new landmark model as well? thanks.

Also I think the reshaping in here
https://github.com/emilianavt/OpenSeeFace/blob/8ff2e61e1b34da2746b7074b0f4a404ae3105a16/model.py#L210 https://github.com/emilianavt/OpenSeeFace/blob/8ff2e61e1b34da2746b7074b0f4a404ae3105a16/model.py#L211 should be (30, 7*7).

emilianavt commented 4 years ago

You are right, that should be reshape(30, 7*7). I actually forgot to test the inference=True version, because tracker.py is currently doing the manual landmark decoding. Actually, I think I forgot to consider the batch size as well, even though I'm pretty sure I had it working correctly for the bigger models. I'll check what's going on there.

As a side note, the points for the 30 point model are laid out like this.

emilianavt commented 4 years ago

model.py should be fixed now in cfe2e2f12e4daa6a579655aeb561fb0c70b3ad84. The models should work with bigger batch sizes and inference=True as well. The random output was most likely related to the different factor applied to the sigmoid to work better with the lower resolution. I've attached the output of the new model on one of the WIDER FACE images. 11_Meeting_Meeting_11_Meeting_Meeting_11_573

sasanasadiabadi commented 4 years ago

Thanks, the issue is fixed.

Before closing this, I'd like to ask if you still have the trained ShuffleNet-V2 PyTorch weights to share? Thanks.

emilianavt commented 4 years ago

I think I can find those, but they were trained on a less refined dataset and with less augmentation, so they're not really comparable. Are you still interested?

sasanasadiabadi commented 4 years ago

Yes that would be great if you could find them. I'm planning to retrain it, that'd be good to start from a pretrained model. Many thanks.

emilianavt commented 4 years ago

I think it should be these.

sasanasadiabadi commented 4 years ago

Thanks a lot. closing this issue.