scrfd 10g model (attached) is unable to detect any faces in sample images
cyrusbehr opened this issue · 3 comments
I've modified the code in app_scrfd.cpp
to load my own scrfd 10g (which can be downloaded here) instead of the default one. The only other thing I've changed is the batch size, from 6 to 1, here.
When I then build the trt model and run inference using the example code, it is unable to find any faces in any of the sample images in workspace/inference/
.
If I then load the model directly with onnxruntime C++ and run inference, I can find faces in all of those same images.
Can you please download and test the scrfd model and tell me what is missing there.
Or is there something special I'm supposed to do when exporting from pytorch to onnx. And if so, could you share what that is with me please.
I was able to solve the issue by following the instructions here: https://github.com/namdvt/SCRFD_FaceDetection_TensorRT#export-scrfd-onnx
To summarize, my model had the following output dimensions:
While the model needs to have these output dimensions:
Using the code above, I was able to export the model from pytorch to onnx with the correct output dimensions.