Commande d’optimiseur de modèle correcte pour convertir le modèle YOLOv5 ONNX en format IR.
- Modèle YOLOv5 ONNX converti en format IR :
python /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo.py --input_model "model.onnx" --output_dir "cur_folder/"
- Erreur reçue :
[ ERROR ] The ExpandDims node Unsqueeze_583 has more than 1 input
[ ERROR ] Cannot infer shapes or values for node "Slice_4".
[ ERROR ] Output shape: [0 3 0 0] of node "Slice_4" contains non-positive values
[ ERROR ] It can happen due to bug in custom shape infer function .
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
Il y a trois nœuds de sortie dans YOLOv5 et tous doivent être spécifiés dans la commande :
Commande Optimiseur de modèle : python mo.py --input_model model.onnx --nœuds de débit --input_shape [1,3,512,512]
Utilisez Netron pour visualiser le poids YOLOv5 ONNX.