[example - yolov5] update to rknn_model_zoo version

This commit is contained in:
zen 2022-07-22 10:42:49 +08:00
parent 9ad79343fa
commit 25f8cd515b
3 changed files with 19 additions and 4 deletions

View File

@ -0,0 +1,15 @@
# YOLOV5 DEMO
### 1.About onnx file
- This model remove the post-process layer(which is not available on NPU now).
- To export .onnx format model file, refer to https://github.com/airockchip/rknn_model_zoo/tree/main/models/vision/object_detection/yolov5-pytorch
### 2.Run demo
```
python test.py
```

View File

@ -236,7 +236,7 @@ if __name__ == '__main__':
# Load ONNX model
print('--> Loading model')
ret = rknn.load_onnx(model=ONNX_MODEL, outputs=['378', '439', '500'])
ret = rknn.load_onnx(model=ONNX_MODEL)
if ret != 0:
print('Load model failed!')
exit(ret)
@ -301,8 +301,8 @@ if __name__ == '__main__':
if boxes is not None:
draw(img_1, boxes, scores, classes)
# show output
# cv2.imshow("post process result", img_1)
# cv2.waitKey(0)
# cv2.destroyAllWindows()
cv2.imshow("post process result", img_1)
cv2.waitKey(0)
cv2.destroyAllWindows()
rknn.release()

Binary file not shown.