I trained the yolov5s.pt model with two classes and tested it.
Then converted yolov5s.pt to yolov5s.onnx "python export.py --rknpu --weight yolov5s.pt".
I then converted yolov5s.onnx using the convert.py script "rknn_model_zoo\examples\yolov5\python" to yolov5.rknn. But when running the model on RV1106 I get an error for some reason.
When configuring the standard yolov5s.pt model, everything works fine.
Maybe it's because of the change in the number of classes?
Yolov5 convert to RKNN
Hi,Yurii wrote: ↑2024-03-20 19:41 I trained the yolov5s.pt model with two classes and tested it.
Then converted yolov5s.pt to yolov5s.onnx "python export.py --rknpu --weight yolov5s.pt".
I then converted yolov5s.onnx using the convert.py script "rknn_model_zoo\examples\yolov5\python" to yolov5.rknn. But when running the model on RV1106 I get an error for some reason.
When configuring the standard yolov5s.pt model, everything works fine.
Maybe it's because of the change in the number of classes?
xxx.png
The trained models may vary in the number of categories and their structures. Parameters need to be adjusted at runtime. You need to set the OBJ_CLASS_NUM parameter in the postprocess.h file and modify the coco_80_labels_list file in the model folder to change the names of the categories.