cavalleria / cavaface

face recognition training project(pytorch)
MIT License
456 stars 88 forks source link

modify mobilefacenet to accept 224x224 #90

Closed jamesrobertwilliams closed 1 year ago

jamesrobertwilliams commented 1 year ago

@cavalleria

firstly thank you for this awesome repo. I would like to train mobilefacenet with an input size of 224x224 and not 112x112.

Thus, I would like to modify the source here: https://github.com/cavalleria/cavaface/blob/master/backbone/mobilefacenet.py

Am i correct in saying that all I need to do is modify the Linear layer here: https://github.com/cavalleria/cavaface/blob/822651f0e6d4d08df5441922acead39dc5375103/backbone/mobilefacenet.py#L193

to adjust for the increased size of the ouput from conv_6_dw?

Thank you!

cavalleria commented 1 year ago

you should modify kernel size of gdc layer to 14x14. https://github.com/cavalleria/cavaface/blob/822651f0e6d4d08df5441922acead39dc5375103/backbone/mobilefacenet.py#L190

jamesrobertwilliams commented 1 year ago

@cavalleria thank you EVER so much for your fast reply and your awesome pkg. I did think of doubling the kernel size but I was not sure about the implications to GDC of using an even sized kernel and also a large kenel. Anyways, it seems to train now :) Thank you again.