Unable to install OpenVINO™ Training Extension from GitHub* repository misc branch.
Prerequisites
Installation Steps:
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
Troubleshooting steps:
If ModuleNotFoundError: No module named 'mmcv._ext' occurred, downgrade CUDA to version 10.2.
If RuntimeError: OpenVINO™ Model Optimizer is not found or configured properly occurred, complete the steps in Step 4: Configure the Model Optimizer.
If the error persists, provide the full PATH for mo.py inside of the /mmdetection/tools/export.py file (Line 154,171,179 and 185).
FULL PATH for mo.py:
/opt/intel/openvino_2021.4.752/deployment_tools/model_optimizer/mo.py