rockchip-linux / rknn-toolkit

BSD 3-Clause "New" or "Revised" License
831 stars 175 forks source link

Load yolov5 failed! #141

Open hjwangu opened 2 years ago

hjwangu commented 2 years ago

D Using CPPUTILS: True I Start importing onnx... D ONNX model check failed, Exception: ValidationError("Your model ir_version is higher than the checker's.",) W Call onnx.optimizer.optimize fail, skip optimize I Current ONNX Model use ir_version 7 opset_version 11 I Call RKNN onnx optimize fail, skip optimize E Catch exception when loading onnx model: best1.onnx! E Traceback (most recent call last): E File "rknn\base\RKNNlib\RK_nn.py", line 141, in rknn.base.RKNNlib.RK_nn.RKnn.load_onnx E File "rknn\base\RKNNlib\app\importer\import_onnx.py", line 118, in rknn.base.RKNNlib.app.importer.import_onnx.Importonnx.run E File "rknn\base\RKNNlib\converter\convert_onnx.py", line 111, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.init E File "rknn\base\RKNNlib\converter\convert_onnx.py", line 1059, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx._build_subgraph E File "rknn\base\RKNNlib\converter\onnx_util.py", line 366, in rknn.base.RKNNlib.converter.onnx_util.onnx_subgraph.build_subgraph E KeyError: '378' E Please feedback the detailed log file to the RKNN Toolkit development team. E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues

zen-xingle commented 2 years ago

The error information tells us that there is no node named '378' in the ONNX model. Follow README.md in examples/onnx/yolov5 and pick up the right index according to your model.

Or you can try to convert from a PyTorch model, for which you can follow the tips in examples/pytorch/yolov5