Impossible d’installer OpenVINO™ Training Extension à partir de la branche divers du référentiel GitHub*.
Conditions préalables
Étapes d’installation :
git clone https://github.com/openvinotoolkit/training_extensions.git
export OTE_DIR=`pwd`/training_extensions
git clone https://github.com/openvinotoolkit/open_model_zoo --branch 2021.4.2
export OMZ_DIR=`pwd`/open_model_zoo
cd /training_extensions/models/object_detection
./init_venv.sh
source venv/bin/activate
/training_extensions/external/mmdetection/requirements/runtime.txt
onnx==1.10.1
onnxoptimizer==0.2.6
cd /training_extensions/external/mmdetection/
pip install -r requirements/build.txt
pip install "git+ https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools"
pip install -v -e .
cd /training_extensions/models/object_detection
export MODEL_TEMPLATE=`realpath ./model_templates/horizontal-text-detection/horizontal-text-detection-0001/template.yaml`
export WORK_DIR=/tmp/my-$(basename $(dirname $MODEL_TEMPLATE))
export SNAPSHOT=snapshot.pth
python ../../tools/instantiate_template.py ${MODEL_TEMPLATE} ${WORK_DIR}
cd ${WORK_DIR}
python export.py \
--load-weights ${SNAPSHOT} \
--save-model-to export
python ${OMZ_DIR}/demos/object_detection_demo/python/object_detection_demo.py \
-m export/model.xml \
-at ssd \
-i /dev/video0
Étapes de dépannage :
Si ModuleNotFoundError : Aucun module nommé 'mmcv._ext' ne s’est produit, rétrogradez CUDA à la version 10.2.
Si RuntimeError : OpenVINO™ Model Optimizer n’est pas trouvé ou configuré correctement s’est produit, suivez les étapes de Étape 4 : Configurer Model Optimizer.
Si l’erreur persiste, indiquez le PATH complet pour mo.py à l’intérieur du fichier /mmdetection/tools/export.py (lignes 154,171,179 et 185).
CHEMIN COMPLET pour mo.py :
/opt/intel/openvino_2021.4.752/deployment_tools/model_optimizer/mo.py