detectnet/train_ssd.py has training script for retraining ssd-mobilenet I want to know how to retrain facenet?
as vision.ssd has mobilenet and vgg. Are such import module available for facenet too?
Advance Thanks for the help.
Thanks & Regards,
Hi @dipankar123sil, the pytorch-ssd training code doesn’t support the FaceNet DNN architecture. If you are referring to the facenet-120 model that was downloaded by the repo, that was from the older (outdated) DetectNet DNN architecture - that model just does face detection, and not face recognition / feature embedding like the newer FaceNet DNN architecture does.
If you just wanted to do the face detection with SSD-Mobilenet, you should be able to run that pytorch-ssd training code (train_ssd.py) on publicly-available face detection datasets like FDDB, 300-W, WIDER, ect. You would need to add the dataloader code to support these datasets.
Thanks for the very prompt response. Are there any pre-build models for face recognition? That will help as I was looking for transfer learning methodology as I wanted to implement both training and inference on Jetson nao 2GB module.
Not that I know of. Although I have also heard of folks around here using DLIB for extracting facial features/landmarks.
My understanding of the FaceNet DNN architecture, is that it doesn’t actually perform facial recognition persay, but rather it outputs the feature embedding (i.e. vector of encoded landmarks/ect) that one can compare to a database of known feature-descriptors and access a similarity metric against.
This way it is easier to add new faces into the database at runtime, because it doesn’t require retraining of the model. Keypoint matching (i.e. SIFT/SURF/ORB) works in a similar way, where you compare their feature descriptors to find the closest match (i.e. by sum of absolute difference or L2-norm, ect). What FaceNet does is output you good, descriptive features that are able to be matched more accurately.
So you may still be able to use FaceNet, or an approach using DLIB or another face detection/recognition libraries that extracts the facial landmarks/features for you and then you manage/match the feature database. I don’t think it typically requires re-training the model for each new face to be recognized, but there are always new approaches/research out there.
Thanks @dusty_nv for detailed explanation , let me try out the methods you have mentioned.
Thanks & Regards,