Face-detection porting from python application

Dear all,

[every mentioned file is in my GitHub repo https://github.com/wuanagana/face-detection]
I’m trying to porting my FaceDetection.py program to Jetson platform.
In this program I used:

and the result is in allPythonNvidia.txt. As you can see there is one result with a high confidence and the relative coordinates contain a face.

Then I started to convert the model in TensorRT. I changed the flatten layer with reshape layer and I added keep_count parameter to detection out layer. The changed file is in nvidia_deploy.prototxt.

I correctly converted the .caffemodel and .prototxt file into .engine file and I used a deepstream_redaction_app.c with configure file: config_infer.txt.

Then I created a custom parser [nvdsparsebbox_ssd.cpp] in order to parse the detection_out result and I correctly added it to deepstream_redaction_app.c through the configuration file.

The problem is that, as you can see in allJetsonNetScale1.txt, the confidence for the same frame is lower than the python result and relative coordinates don’t contain the face.

Anyone have any suggestions for correcting my face detection program?

Thanks in advance,


Could you check if you are using the correct color format first (align to the Caffe frameworks)?

model-color-format: Color format required by the model
* 0: RGB
* 1: BGR
* 2: GRAY

By the way, Deepstream have a sample for ssd-based detection.
The sample already implements required bounding box parser, which is more suitable for your usecase:



thanks for the quick reply, effectively the model color format for this model is BGR and now I correctly set up the parameter in the config file, but the result is almost the same as you can see here allJetsonNetScale1OffsetBGR.txt.

About the sample, the parser that I already used is that sample, I added only some lines in order to print the results but the structure is the same.

Thanks in advance,

Thanks for the checking.

We are going to reproduce this in our internal environment.
Will update more information with you later.


Sorry for the late update.

We try to reproduce this issue in our environment but found it works correctly.
May I know which video do you use?

We try this the sample video from redaction GitHub:

And the face can be detected correctly as following:



thanks for the idea, I will compare projects.
During these days I analyzed the problem in more depth and I think that the custom parser doesn’t “send” correctly the detected object to the deepstream_redaction_app.c.

More in particular, I correctly set detection object in std::vector<NvDsInferObjectDetectionInfo> &objectList through push_back() function, but I can’t see this object in deepstream_redaction_app.c.

How is it possible? Who inserts this data into NvDsBatchMeta structure? In which structure are they? [NvDsObjectMetaList, NvDisplayMetaList, NvDsUserMetaList] ?


The bounding box is correctly set when we reproduce this issue with the source in the GitHub.
That’s why we can see the output with face detected.

Would you mind to check the output first?
If you can see the similar result, the metadata should also be correctly set.