Resnet34 and ImageNet stats for facial recognition?

Trying my version of the Brown/Black/Teddy bear classifier.

I’ve trained using a RESNET34 normalized with ImageNet stats with a few hundred images of Chad Smith and Will Ferrell, I can get 95% accuracy after some cycles, but I can easily fool it in production(Chad Smith always has a cap on backwards, if I upload a photo of Will in a hat it gets it wrong).

https://chadvswill.scottmcallester.xyz/

So a few questions:

  • Does ImageNet have labels for celebrities? Am I wasting my time by applying these pretrained weights?
  • Would more images/transformations help?
  • Is there a better suited model in the fastai library for facial recognition? A quick Google and it seems there are VGGFace2 and FaceNet, but these aren’t available in fastai.

A basic classifier won’t work. You need siamese network. https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78

1 Like