Closed LrWm3 closed 10 months ago
I believe it is something to do with the parser. I still don't really understand why my onnx model was not producing the right dimensions. But I was able to work around it compiling the example below and using NvDsInferParseYoloV7
as the class
edit: I thought it worked but it didn't really. no segfault but I believe it was not parsing the output correctly.
The export_yolox.py
should have the correct output for the parser (3 outputs). Are you using the latest export_yolox.py
from this repo?
git clone https://github.com/Megvii-BaseDetection/YOLOX.git cd YOLOX pip3 install -r requirements.txt python3 setup.py develop pip3 install onnx onnxsim onnxruntime cp ../DeepStream-Yolo/utils/export_yolox.py . wget https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_s.pth python3 export_yolox.py -w yolox_s.pth -c exps/default/yolox_s.py --dynamic cd ../DeepStream-Yolo CUDA_VER=12.1 make -C nvdsinfer_custom_impl_Yolo
Jusr converted following these steps and the output is correct
I believe it is something in my config. When I test the generated model with the onnx python lib, I see the three outputs. It's only when I use it with nvinfer that it shows the single output with unexpected dimensions. Will check again tomorrow.
Maybe you are using a old engine with wrong output. Please delete it and try to generate again with the exported ONNX model.
Ahh, I didn't understand the engine file. Removing it and rerunning solved the issue for yolox_s.oonx. I was originally trying this with another model I had and it wasn't working.
Appreciate all the help!
Working in deepstream docker. Tried both 6.2 and 6.3 docker images.
Using yolox_s.pth to generate the onnx file after following the instructions in the repository. (history below)
one thing stood out to me:
But it looks like the parser is expecting there to be three outputs (in nvdsparsebbox_Yolo.cpp#L165-L169 )
I am not sure if this is an issue or if there is something I need to do to make it match the output here.
I can run the pipeline without issue if I use one of the models included in the DeepStream Samples folder, but so far have not been able to get a yolox model working.
Appreciate any guidance.
related command history
ys.txt
log of command itself