Facenet Classifier vs Peoplenet-Face Class Classifier

Please provide the following information when requesting support.

• Hardware: Nano
• Network Type Detectnet_v2

Hi,

I am currently using peoplenet with deepstream’s test5 app to detect people entering a store and count them. My next step is developing an age/gender classifier, to do this I thought of two approaches:
1-retraining facenet on classes such as:
*male(1-15)
*female(1-15), etc…
2-retraining peoplenet on the class person as well as the face class with classes as mentioned in point 1.

I still can’t decide which classifier to go with especially since I am currently using peoplenet and I haven’t noticed any face detections happening in the frames. It is also mentioned that facenet only detects faces that occupy over 10% of the frame which might not be the case here since the camera is put above the entrance door, and peoplenet only detects objects that are over 10x10 pixels.

Can someone help guide me towards the right model training choice, especially since it would need quite a bit of cloud training resources, so it would be wiser to ask for an opinion on this?

Thanks

You can leverage deepstream sample.
In deepstream, there is
/opt/nvidia/deepstream/deepstream-6.0/samples/configs/tao_pretrained_models/deepstream_app_source1_facedetectir.txt

In it , it will call config_infer_primary_facedetectir.txt

You can replace the resnet18_facedetectir_pruned.etlt(facedetectir model) with official released facenet model (FaceDetect | NVIDIA NGC)

Then run

$ deepstream-app -c deepstream_app_source1_facedetectir.txt

It will detect faces.

For classifier, you can use TAO classification(Image Classification — TAO Toolkit 3.21.11 documentation) or TAO multi-classification(Multitask Image Classification — TAO Toolkit 3.21.11 documentation) to train.

Then, config this classifier model as the secondary-gie0 in deepstream_app_source1_facedetectir.txt.
Similarly, you can refer to deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt (it will detect cars and then classify vehiclemake and vehicletype)

After configuring primary gie and secondary gie, then run

$ deepstream-app -c deepstream_app_source1_facedetectir.txt

It will detect faces and do classification.

Super! Thanks, @Morganh, will give it a go.