Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5541 Discussions

Is there a reasonably easy way to undo model_optimizer install_prerequisites.sh?

Kulecz__Walter
New Contributor I
172 Views

I tried it on a system where I probably shouldn't have, an "Atomic Pi" Atom Z8350 system with 16GB eEMC

The openvino apt install of 2021.1 on Ubuntu 20.04 works well, the sample and demo apps build and run fine, my code worked fine after I converted my model from IR5 to IR10 (Which I did on my i7 laptop.

I thought it might be "cool" to have such a small system able to do "everything".  Seems not possible.  When I ran the mo_tf.py it segfault-ed with illegal instruction:

ai@AtomicPi20:/opt/intel/openvino/deployment_tools/model_optimizer$ python3 mo_tf.py --input_model /home/ai/ssdv2/frozen_inference_graph.pb --tensorflow_use_custom_operations_config /home/ai/ssdv2/ssd_v2_support.json --tensorflow_object_detection_api_pipeline_config /home/ai/ssdv2/pipeline.config --data_type FP16
/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/mo/main.py:85: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if op is 'k':
[ WARNING ]  Use of deprecated cli option --tensorflow_use_custom_operations_config detected. Option use in the following releases will be fatal. Please use --transformations_config cli option instead
Model Optimizer arguments:
Common parameters:
	- Path to the Input Model: 	/home/ai/ssdv2/frozen_inference_graph.pb
	- Path for generated IR: 	/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/.
	- IR output name: 	frozen_inference_graph
	- Log level: 	ERROR
	- Batch: 	Not specified, inherited from the model
	- Input layers: 	Not specified, inherited from the model
	- Output layers: 	Not specified, inherited from the model
	- Input shapes: 	Not specified, inherited from the model
	- Mean values: 	Not specified
	- Scale values: 	Not specified
	- Scale factor: 	Not specified
	- Precision of IR: 	FP16
	- Enable fusing: 	True
	- Enable grouped convolutions fusing: 	True
	- Move mean values to preprocess section: 	None
	- Reverse input channels: 	False
TensorFlow specific parameters:
	- Input model in text protobuf format: 	False
	- Path to model dump for TensorBoard: 	None
	- List of shared libraries with TensorFlow custom layers implementation: 	None
	- Update the configuration file with input/output node names: 	None
	- Use configuration file used to generate the model with Object Detection API: 	/home/ai/ssdv2/pipeline.config
	- Use the config file: 	/home/ai/ssdv2/ssd_v2_support.json
Model Optimizer version: 	2021.1.0-1237-bece22ac675-releases/2021/1
Illegal instruction (core dumped)

 

Looks like this took over 2GB of eEMC, and since it doesn't work, is there a reasonably easy way to undo the effects of the model_optimizer install_prerequisites.sh?

0 Kudos
1 Solution
Adli
Moderator
158 Views

Hi Kulecz__Walter,

 

According to this thread, it is not possible to automatically revert the changes made by pip. It should be done manually.

 

To uninstall multiple packages installed by pip, I suggest you follow the following steps:

  1. Copy all the names of the listed packages in the 'requirements.txt' file. 'requirements.txt' is located in 'deployment_tools/model_optimizer' directory.
  2. Create a new <textfile.txt> file and paste the names on the text file.
  3. Then, run the following command:
    pip freeze
  4. Go to the location of the <textfile.txt> file and run the following command:
    pip uninstall -y -r <textfile.txt>

 

Regards,

Adli

 

View solution in original post

3 Replies
Adli
Moderator
159 Views

Hi Kulecz__Walter,

 

According to this thread, it is not possible to automatically revert the changes made by pip. It should be done manually.

 

To uninstall multiple packages installed by pip, I suggest you follow the following steps:

  1. Copy all the names of the listed packages in the 'requirements.txt' file. 'requirements.txt' is located in 'deployment_tools/model_optimizer' directory.
  2. Create a new <textfile.txt> file and paste the names on the text file.
  3. Then, run the following command:
    pip freeze
  4. Go to the location of the <textfile.txt> file and run the following command:
    pip uninstall -y -r <textfile.txt>

 

Regards,

Adli

 

View solution in original post

Kulecz__Walter
New Contributor I
147 Views

I did find another way to do it, while waiting for a reply.

I used the scrollback buffer in my terminal window and cut and pasted the summary lines of what pip3 installed (Successfully install ...) and then pasted it into the pip3 uninstall commands.

Your solution is more general, as not everyone keeps as much scrollback buffer in their terminals as I do.

 

Adli
Moderator
138 Views

Hi Kulecz__Walter,


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.


Regards,

Adli


Reply