Plugin fails when trying YOLOv4-tiny model
See original GitHub issueHey Alexis. Thank you for the great work.
I tried to run YOLOv4-tiny-416 model using an ONNX file converted using https://github.com/jkjung-avt/tensorrt_demos/blob/master/yolo/yolo_to_onnx.py.
However, the engine is not built, since an assertion in the YOLO layer plugin fails.
python: yolo_layer.cu:115: virtual nvinfer1::Dims nvinfer1::YoloLayerPlugin::getOutputDimensions(int, const nvinfer1::Dims*, int): Assertion `inputs[0].d[0] == (mNumClasses + 5) * mNumAnchors' failed.
This is the class that I have added to yolo.py
class YOLOv4_tiny(YOLO):
ENGINE_PATH = Path(__file__).parent / 'yolov4-tiny-416.trt'
MODEL_PATH = Path(__file__).parent / 'yolov4-tiny-416.onnx'
NUM_CLASSES = 90
INPUT_SHAPE = (3, 416, 416)
LAYER_FACTORS = [32, 16]
SCALES = [1.05, 1.05]
ANCHORS = [[81,82, 135,169, 344,319],
[10,14, 23,27, 37,58]]
Could you please help me debug this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Problems converting yolov4-tiny-3layer models to TRT #334
Hello JK, I am trying to convert a custom-trained yolov4-tiny-3layer model to tensorRT to do accelerated inference on the Jetson Nano.
Read more >DeepStream 4.0 + Custom Yolo Model - App run failed
I have a custom Yolo model build upon yolov3-tiny. ... Deserialize yoloLayerV3 plugin: yolo_31 ** ERROR: <main:651>: Failed to set pipeline ...
Read more >Using YOLOv4 on NVIDIA DeepStream 5.0 - Medium
This article will guide you to install and use Yolo-v4 on NVIDIA DeepStream 5.0. ... Try to give explicit path /usr/src/tensorrt/bin/trtexec ...
Read more >Solved: Re: Help converting owned YOLOv4-tiny model to IR
When I ran it, it threw the following error: ... I am attaching the three Yolov4-tiny model files in a compressed zip file,...
Read more >Tutorial Darknet* YOLOv4 Model - OpenVINO™ Documentation
Since the model is not supported directly in the OpenVINO and the DL Workbench, according to the model import recommendations, you need to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@GeekAlexis Thanks a lot. Will try that.
I tried your repo in Xavier-NX. It works like charm with Good FPS and accuracy! Good job
@PiyalGeorge Yes, you need to train a ReID model on the same class, assuming the class is not person. And there is nothing specific for tiny because ReID is independent of detector. FYI, you shouldn’t convert YOLO to TensorRT, converting to ONNX is enough.