I run yolort_trt for inference with c++, and this is a question about the file format specified by the --class_names argument. #445
Replies: 2 comments 13 replies
-
Hi @leeyunhome , The way we generate the tensorrt engine is a little different from the official YOLOv5 one, did you export the tensorrt serialization model as follows? python3 tools/export_model.py --checkpoint_path {path/to/your/best.pt} --include engine https://github.com/zhiqwang/yolov5-rt-stack/tree/main/deployment/tensorrt#usage BTW, you can find the coco.names sample at belows: https://github.com/zhiqwang/yolov5-rt-stack/blob/main/notebooks/assets/coco.names |
Beta Was this translation helpful? Give feedback.
-
Hello, @zhiqwang I ran yolort_trt in Jetson Xavier NX with the yolov5s.engine file obtained with the export command you gave me in version 0.6.3 of yolort, but I get the following error. Can you tell me where I went wrong? manager@manager-desktop:~/coding/github-repository/yolov5-rt-stack/deployment/tensorrt/build$ ./yolort_trt --image ~/Pictures/girl.jpg --model_path ~/yolov5s.engine --class_names coco.names Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello, @zhiqwang
I run yolort_trt for inference with c++, and this is a question about the file format specified by the --class_names argument.
When executing yolort_trt with the following command, a file called coco.names was specified as an argument of the --class_names option.
The file contents are as follows.
I can't seem to make an inference when I specify this, can you give me some advice on how to solve it?
./yolort_trt --image /home/manager/Pictures/girl.jpg --model_path ~/yolov5s.engine --class_names coco.names
coco.names file content
person bicycle car motorbike aeroplane bus train truck boat traffic light fire hydrant stop sign parking meter bench bird ...
manager@manager-desktop:~/coding/github-repository/yolov5-rt-stack/deployment/tensorrt/build$ ./yolort_trt --image /home/manager/Pictures/girl.jpg --model_path ~/yolov5s.engine --class_names coco.names
Loading engine from file: /home/manager/yolov5s.engine
3: Cannot find binding of given name: num_detections
3: Cannot find binding of given name: detection_boxes
3: Cannot find binding of given name: detection_scores
3: Cannot find binding of given name: detection_classes
3: [executionContext.cpp::setBindingDimensions::945] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::setBindingDimensions::945, condition: profileMinDims.d[i] <= dimensions.d[i]. Supplied binding dimension [1,3,640,640] for bindings[0] exceed min ~ max range at index 0, maximum dimension in profile is 10, minimum dimension in profile is 10, but supplied dimension is 1.
)
Bind[0] {Name:images, Datatype:0, Shape:(10,3,640,640,)}
Bind[1] {Name:output, Datatype:0, Shape:(10,25200,85,)}
Detected 0 objects.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions