728x90
[ERROR:0@0.058] global onnx_importer.cpp:1054 cv::dnn::dnn4_v20221220::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [Reshape]:(onnx_node!/model.22/dfl/Reshape) from domain='ai.onnx'
Traceback (most recent call last):
<cpp />
[ERROR:0@0.058] global onnx_importer.cpp:1054 cv::dnn::dnn4_v20221220::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [Reshape]:(onnx_node!/model.22/dfl/Reshape) from domain='ai.onnx'
Traceback (most recent call last):
File ".\run.py", line 12, in <module>
opencv_net = cv2.dnn.readNetFromONNX(onnx_model_path)
[Reshape] 관련 에러 메시지가 뜨면 onnx모델을 opset=12 옵션을 적용해야 합니다
아래 명령어를 입력하여 onnx모델을 새로 다운로드 합니다.
<cpp />
pip install ultralytics
yolo export model=yolov8n.pt imgsz=640 format=onnx opset=12
'Rust' 카테고리의 다른 글
[Rust] model inference with CUDA (ONNXRUNTIME,ort) (61) | 2023.07.07 |
---|---|
[Rust] Object Tracking in RUST with YOLOv8n ONNX model (78) | 2023.07.06 |
[RUST]OpenCV : 'limits' file not found (26) | 2023.07.05 |
[Rust] 동영상에 Box 그리기 (21) | 2023.07.05 |
[Rust] asser_eq! (26) | 2023.07.05 |