Closed DJT777 closed 1 year ago
Hi @DJT777 , sorry it has taken me so long to get back to you. There are a few issues at play here.
1) You model has a static batch size, whereas my implementation originally only supported dynamic batch sizes. It now supports both, please set Options.doesSupportDynamicBatchSize
appropriately.
2) Your model expects the input image to be of size (3, 512, 512). If you were running my sample code, you were feeding it images of size (3, 112, 112), so that is why it was crashing. I have written more robust code which will now return an error if you try to feed the model an incorrectly sizes image, and I have also specified where in the code you need to resize your image.
Hey Cyrus,
I'm working through your code to learn TensorRT.
I trained tiny Yolov4 model and ported it over to onnx with several different batch sizes. I made some modifications to the code to accommodate static batch sizes. For each model I changed the dimension calculations, depending on which model but each was consistent with the input dimensions.
However I am getting some segfaults on this block of code in engine.cpp
Here are the models I am using:
https://drive.google.com/drive/u/0/folders/14AEDjchvPF8Tp8PrFsRMg7q4wZG8KMNi