You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I refer to yolo_deepstream/tree/main/tensorrt_yolov7 and use "yolov7QAT" to perform a batch detection task, the following error occurs ./build/detect --engine=yolov7QAT.engine --img=./imgs/horses.jpg,./imgs/zidane.jpg
It works fine when running a single detection task with "yolov7QAT.engine".
"yolov7QAT.engine" comes from "yolov7qat.onnx" conversion.
Whether downloaded from here or self trained "yolov7qat.onnx" (using 'netron' view, it shows the same structure), the same error occurs when running `. /build/detect `` all show the same error message
Runs fine with non-qat "yolov7db4fp32.engine" or "yolov7db4fp16.engine"
Suggest explicitly specifying “dynamic-batch”, and the problem was solved!
#Peplace
# int8 QAT model, the onnx model with Q&DQ nodes
/usr/src/tensorrt/bin/trtexec --onnx=yolov7qat.onnx --saveEngine=yolov7QAT.engine --fp16 --int8
with
# int8 QAT model, the onnx model with Q&DQ nodes and dynamic-batch
/usr/src/tensorrt/bin/trtexec --onnx=yolov7qat.onnx \
--minShapes=images:1x3x640x640 \
--optShapes=images:12x3x640x640 \
--maxShapes=images:16x3x640x640 \
--saveEngine=yolov7QAT.engine --fp16 --int8
However, when testing performance with /usr/src/tensorrt/bin/trtexec --loadEngine=yourmodel.engine, the performance of the engine that is explicitly specified as dynamic batch is much worse.
yolov7QAT.engine
=== Performance summary ===
[I] Throughput: 57.8406 qps
[I] Latency mean = 17.8946 ms
yolov7QAT.engine with dynamic batch(max=16)
=== Performance summary ===
[I] Throughput: 23.8396 qps
[I] Latency: mean = 42.046 ms
YunghuiHsu
changed the title
About converting YOLOv7 QAT model to TensorRT engine
About converting YOLOv7 QAT model to TensorRT engine(failed for dynamic-batch setting)
May 31, 2023
When I refer to yolo_deepstream/tree/main/tensorrt_yolov7 and use "yolov7QAT" to perform a batch detection task, the following error occurs
./build/detect --engine=yolov7QAT.engine --img=./imgs/horses.jpg,./imgs/zidane.jpg
Error Message
Note
Environment
The text was updated successfully, but these errors were encountered: