Intel® Edge Software Hub
Get answers from community peers to your questions about building Edge Software Hub solutions for edge compute node.
Announcements
The Edge Software Vision Package for Red Hat Enterprise Linux is now available here.

Learn more about developing on Intel® Hardware and Software here.
432 Discussions

subprocess.CalledProcessError ,RuntimeError: OpenVINO Model Optimizer is not found or configured im

basaveswara
Beginner
5,153 Views

Hello all,

I'm using open vino edge_insight_industrial

while trying to export the model(i.e converting int XML & Bin),

I'm getting the error.

 

File "/home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py", line 283, in main
with_text=with_text)
File "/home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py", line 173, in export_to_openvino
raise RuntimeError('OpenVINO Model Optimizer is not found or configured improperly')
RuntimeError: OpenVINO Model Optimizer is not found or configured improperly
Traceback (most recent call last):
File "export.py", line 41, in <module>
main()
File "export.py", line 37, in main
exporter(ote_args)
File "/home/kmlubuntu/training_extensions/ote/ote/modules/exporters/base.py", line 31, in __call__
self._export_to_openvino(args, tools_dir)
File "/home/kmlubuntu/training_extensions/ote/ote/modules/exporters/mmdetection.py", line 112, in _export_to_openvino
super()._export_to_openvino(args, tools_dir)
File "/home/kmlubuntu/training_extensions/ote/ote/modules/exporters/mmdetection.py", line 51, in _export_to_openvino
run_through_shell(f'python3 {os.path.join(tools_dir, "export.py")} '
File "/home/kmlubuntu/training_extensions/ote/ote/utils/misc.py", line 165, in run_through_shell
**std_streams_args)
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py model.py /tmp/my_model/outputs/latest.pth /tmp/my_model/export --update_config data.train.dataset.classes=[\"vehicle\",\"person\",\"non-vehicle\"] data.val.classes=[\"vehicle\",\"person\",\"non-vehicle\"] data.test.classes=[\"vehicle\",\"person\",\"non-vehicle\"] model.bbox_head.num_classes=3 --opset=11 openvino --input_format BGR' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py", line 326, in <module>
sys.exit(main(args) or 0)
File "/home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py", line 283, in main
with_text=with_text)
File "/home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py", line 173, in export_to_openvino
raise RuntimeError('OpenVINO Model Optimizer is not found or configured improperly')
RuntimeError: OpenVINO Model Optimizer is not found or configured improperly
Traceback (most recent call last):
File "export.py", line 41, in <module>
main()
File "export.py", line 37, in main
exporter(ote_args)
File "/home/kmlubuntu/training_extensions/ote/ote/modules/exporters/base.py", line 31, in __call__
self._export_to_openvino(args, tools_dir)
File "/home/kmlubuntu/training_extensions/ote/ote/modules/exporters/mmdetection.py", line 112, in _export_to_openvino
super()._export_to_openvino(args, tools_dir)
File "/home/kmlubuntu/training_extensions/ote/ote/modules/exporters/mmdetection.py", line 51, in _export_to_openvino
run_through_shell(f'python3 {os.path.join(tools_dir, "export.py")} '
File "/home/kmlubuntu/training_extensions/ote/ote/utils/misc.py", line 165, in run_through_shell
**std_streams_args)
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/kmlubuntu/training_extensions/external/mmdetection/tools/export.py model.py /tmp/my_model/outputs/latest.pth /tmp/my_model/export --update_config data.train.dataset.classes=[\"vehicle\",\"person\",\"non-vehicle\"] data.val.classes=[\"vehicle\",\"person\",\"non-vehicle\"] data.test.classes=[\"vehicle\",\"person\",\"non-vehicle\"] model.bbox_head.num_classes=3 --opset=11 openvino --input_format BGR' returned non-zero exit status 1.

 

Specification

OS :ubuntu 18.04

processor : i7 11gen

 

i tried reinstalling the complete package at least 3 times but can't figured this out!

0 Kudos
1 Solution
JesusE_Intel
Moderator
5,035 Views

Hi basaveswara,


OpenVINO is part of the video ingestion container included with EII. Training extensions will need to utilize OpenVINO model optimizer that is locally installed on the computer. Could you try to install OpenVINO locally on the system and trying again?

https://software.intel.com/en-us/openvino-toolkit


Regards,

Jesus




View solution in original post

0 Kudos
8 Replies
JesusE_Intel
Moderator
5,112 Views

Hi basaveswara,


Thanks for reaching out, could you share a bit more information?

  • What version of EII are you using?
  • What command did you run?


Regards,

Jesus


0 Kudos
basaveswara
Beginner
5,094 Views

Hi JesusE_Intel,

EII Version : 2.6

command :

python export.py \
   --load-weights ${WORK_DIR}/outputs/latest.pth \
   --save-model-to ${WORK_DIR}/export

 though i have the latest.pth ,I'm getting the same error

Link that i followed: "https://github.com/openvinotoolkit/training_extensions/tree/develop/models/object_detection/model_templates/custom-object-detection"

 

I had attached the log files in the following.please take a look

0 Kudos
JesusE_Intel
Moderator
5,036 Views

Hi basaveswara,


OpenVINO is part of the video ingestion container included with EII. Training extensions will need to utilize OpenVINO model optimizer that is locally installed on the computer. Could you try to install OpenVINO locally on the system and trying again?

https://software.intel.com/en-us/openvino-toolkit


Regards,

Jesus




0 Kudos
basaveswara
Beginner
5,001 Views

 Hi Jesus,

I'm getting the same error. though I had reinstalled the openvino locally

0 Kudos
JesusE_Intel
Moderator
4,955 Views

Hi basaveswara,


When you installed OpenVINO did you set the environment variables?

source /opt/intel/openvino_2021/bin/setupvars.sh


Could you provide the output of your command line, sourcing the environment variables and running the commands up until the error?


Regards,

Jesus



0 Kudos
basaveswara
Beginner
4,923 Views

Hi Jesus,

 

When you installed Open Vino did you set the environment variables? 

Yes

Could you provide the output of your command line, sourcing the environment variables and running the commands up until the error?

I had attached the picture of the errors and the environmental variables.

0 Kudos
JesusE_Intel
Moderator
4,903 Views

Hi basaveswara,


Thank you for sharing the screenshots, it looks like you are running the script within a virtual environment but the sourcing of the OpenVINO environment variables is happening outside of the virtual environment.


Please try souring OpenVINO from within the virtual environment (detection).


Regards,

Jesus


0 Kudos
JesusE_Intel
Moderator
4,849 Views

If you need any additional information, please submit a new question as this thread will no longer be monitored.


0 Kudos
Reply