[example - yolov5] update to rknn_model_zoo version
This commit is contained in:
parent
9ad79343fa
commit
25f8cd515b
15
examples/onnx/yolov5/README.md
Normal file
15
examples/onnx/yolov5/README.md
Normal 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
|
||||
```
|
||||
|
||||
@ -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.
Loading…
x
Reference in New Issue
Block a user