Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Question on Use of *.md and *.yml files

Baventhiran
직원
4,510 조회수

My general understanding of the Model Optimizer is that ot converts models such as Caffe's <INPUT_MODEL>.caffemodel and TensorFlow's <INFERENCE_GRAPH>.pb using the mo.py script to IR files (*.xml & *.bin). Once converted, the IR files are able to be run by the Inference Engine.

Open model zoo models however contain *.md and *.yml files. I couldn't find any information in the website and documentation on how to deal with them.

Can you please help guide me on this? Thank you.

0 포인트
1 솔루션
Munesh_Intel
중재자
4,487 조회수

Hi Baventhiran,

Thanks for reaching out to us.


Let me illustrate to you using the following example. Let’s say you want to download googlenet-v2 model.


Firstly, download googlenet-v2 model using Model Downloader, whereby you will be downloading googlenet-v2.prototxt, googlenet-v2.prototxt.orig and googlenet-v2.caffemodel files.


Model Downloader command:

downloader.py --name googlenet-v2


After that, you can convert to IR format using Model Converter.


Model Converter command:

converter.py --name googlenet-v2


Alternatively, you can also convert to IR format using Model Optimizer. The Model Optimizer arguments available in the model.yml file. In our case for googlenet-v2, it’s the following:

https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/googlenet-v2/model.yml#L46



Regards,

Munesh


원본 게시물의 솔루션 보기

17 응답
Munesh_Intel
중재자
4,488 조회수

Hi Baventhiran,

Thanks for reaching out to us.


Let me illustrate to you using the following example. Let’s say you want to download googlenet-v2 model.


Firstly, download googlenet-v2 model using Model Downloader, whereby you will be downloading googlenet-v2.prototxt, googlenet-v2.prototxt.orig and googlenet-v2.caffemodel files.


Model Downloader command:

downloader.py --name googlenet-v2


After that, you can convert to IR format using Model Converter.


Model Converter command:

converter.py --name googlenet-v2


Alternatively, you can also convert to IR format using Model Optimizer. The Model Optimizer arguments available in the model.yml file. In our case for googlenet-v2, it’s the following:

https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/googlenet-v2/model.yml#L46



Regards,

Munesh


Baventhiran
직원
4,485 조회수

Hi Munish,

Thank you for responding.

Regarding the Model Downloader -- that failed for me (with: ERROR: Could not open requirements file: [Errno 2] No such file or directory: './requirements.in') which was why I used files from Open Model Zoo and 01 Intel Open Source.

The 01 Intel Open Source generally worked with the Application Demos

The Open Model Zoo however was the reason for this thread. The googlenet-v2 you mentioned in your explanation is googlenet-v2.md there. May I know the purpose of Open Model Zoo then if not as models to convert to IR?

Also, if Model Downloader is the only way to obtain the correct model files, can you please help with the earlier mentioned error?

And another, do you know where missing files (missing from 01 Intel Open Source) such as open-closed-eye-0001 can be obtained from?

Thanks in advance.

0 포인트
Baventhiran
직원
4,482 조회수

I'm sorry, I misinterpreted: The Model Optimizer arguments available in the model.yml file. 

I get it now, thanks for pointing it out Munesh. To save both our times, I'll accept your post as Solution.

0 포인트
Munesh_Intel
중재자
4,465 조회수

Hi Baventhiran,


open-closed-eye-0001 public model is available here in Open Model Zoo, and you can download using Model Downloader.


Regards,

Munesh




Baventhiran
직원
4,458 조회수

Hi Munesh,

Thank you for the link to the open-closed-eye-0001 public model.

As for the Model Downloader, I have already informed that it failed for me (with: ERROR: Could not open requirements file: [Errno 2] No such file or directory: './requirements.in') which was why I used files from Open Model Zoo and 01 Intel Open Source.

Have also requested for help with the error but received no response for it so far.

0 포인트
Munesh_Intel
중재자
4,465 조회수

Hi Baventhiran,

This thread will no longer be monitored since we have provided illustration and explanation. If you need any additional information from Intel, please submit a new question. 


Regards,

Munesh


0 포인트
Munesh_Intel
중재자
4,453 조회수

Hi Baventhiran,

Please run the following command to install the tools' dependencies, as mentioned in the following link:

https://docs.openvinotoolkit.org/2021.1/omz_tools_downloader_README.html#prerequisites


python3 -mpip install --user -r ./requirements.in


Regards,

Munesh


0 포인트
Baventhiran
직원
4,438 조회수

Hi Munesh,

The python3 command does not work for me, however the python command works.

FYI

  • I have Python 3.7 (and no other Python) installed and PATH set up (I have tried Python 3.9 and that does not work with OpenVINO at all)
  • The python command such as python -h works accordingly while python3 with anything such as python3 -h, python3 -v  and python3 -mpip install --user -r ./requirements.in produces this: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
  • python -mpip install --user -r ./requirements.in produces: ERROR: Could not open requirements file: [Errno 2] No such file or directory: './requirements.in'

 

0 포인트
Munesh_Intel
중재자
4,431 조회수

Hi Baventhiran,


OpenVINO is supported for Python 3.6 till 3.8 only, as stated here:

https://docs.openvinotoolkit.org/2021.2/openvino_docs_install_guides_installing_openvino_windows.html#introduction


The error that you’re seeing occurs if you run in unrelated locations.

As such, please run the following command


python -mpip install --user -r ./requirements.in


in the following folder:


<openvino_2021\deployment_tools\open_model_zoo\tools\downloader>


Regards,

Munesh



0 포인트
Baventhiran
직원
4,425 조회수

Hi Munesh,

I noted the

while setting up OpenVINO initially.

I also noted the below in https://docs.openvinotoolkit.org/2021.1/omz_tools_downloader_README.html#prerequisites

Prerequisites

  1. Install Python (version 3.5.2 or higher)
  2. Install the tools' dependencies with the following command:

As you can see they are contradictory. But never mind, thanks for pointing it out.

---------------------------------------------------

Also, thanks for noting the correct directory for ./requirements.in, unfortunately that now produces timeout error for me:

C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\open_model_zoo\tools\downloader>downloader.py --name open-closed-eye-0001 --output_dir "C:\Users\bbaratha\OneDrive - Intel Corporation\Desktop\X"
################|| Downloading open-closed-eye-0001 ||################

========== Downloading C:\Users\bbaratha\OneDrive - Intel Corporation\Desktop\X\public\open-closed-eye-0001\open-closed-eye.onnx
Traceback (most recent call last):
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 595, in urlopen
self._prepare_proxy(conn)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 816, in _prepare_proxy
conn.connect()
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 284, in connect
conn = self._new_conn()
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x00000149B21B6688>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='download.01.org', port=443): Max retries exceeded with url: /opencv/openvino_training_extensions/models/open_closed_eye/open_closed_eye.onnx (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000149B21B6688>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\open_model_zoo\tools\downloader\downloader.py", line 84, in try_download
chunk_iterable, continue_offset = start_download(offset=progress.size)
File "C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\open_model_zoo\tools\downloader\common.py", line 329, in start_download
headers=self.http_range_headers(offset))
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\adapters.py", line 502, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='download.01.org', port=443): Max retries exceeded with url: /opencv/openvino_training_extensions/models/open_closed_eye/open_closed_eye.onnx (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000149B21B6688>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')))
########## Error: Download failed

FAILED:
open-closed-eye-0001

That same timeout error happened when I tried to setup DL Workbench, later I resolved by using the proxies provided by corporate specific to Docker. 

0 포인트
Munesh_Intel
중재자
4,419 조회수

Hi Baventhiran,


This error is due to by proxy server settings. I suggest you try downloading using a non-proxied link.


Regards,

Munesh


0 포인트
Baventhiran
직원
4,414 조회수

Dear Munesh,

As mentioned in my previous post, this was the exact same outcome by a different situation relating to OpenVINO which was solved with proxy. 

To help convince you that a specific proxy is required due to the system running the OpenVINO is a corporate one, this is the outcome when tried with non-proxy settings:

C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\open_model_zoo\tools\downloader>downloader.py --name open-closed-eye-0001 --output_dir "C:\Users\bbaratha\OneDrive - Intel Corporation\Desktop\X"
################|| Downloading open-closed-eye-0001 ||################

========== Downloading C:\Users\bbaratha\OneDrive - Intel Corporation\Desktop\X\public\open-closed-eye-0001\open-closed-eye.onnx
Traceback (most recent call last):
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 595, in urlopen
self._prepare_proxy(conn)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 816, in _prepare_proxy
conn.connect()
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 284, in connect
conn = self._new_conn()
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001ABCAFCD548>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='download.01.org', port=443): Max retries exceeded with url: /opencv/openvino_training_extensions/models/open_closed_eye/open_closed_eye.onnx (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001ABCAFCD548>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\open_model_zoo\tools\downloader\downloader.py", line 84, in try_download
chunk_iterable, continue_offset = start_download(offset=progress.size)
File "C:\Program Files (x86)\IntelSWTools\openvino_2021\deployment_tools\open_model_zoo\tools\downloader\common.py", line 329, in start_download
headers=self.http_range_headers(offset))
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Users\bbaratha\AppData\Roaming\Python\Python37\site-packages\requests\adapters.py", line 502, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='download.01.org', port=443): Max retries exceeded with url: /opencv/openvino_training_extensions/models/open_closed_eye/open_closed_eye.onnx (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001ABCAFCD548>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')))
########## Error: Download failed

FAILED:
open-closed-eye-0001

Hope you understand, thanks for trying to help, I really appreciate it, but for both our sakes, please don't waste your time and effort on something you're unable from your end.

0 포인트
Munesh_Intel
중재자
4,386 조회수

Hi Baventhiran,


Corporate networks have firewalls and other such security settings that will prevent the download of models.


As such, please try to properly configure your proxy settings for Model Downloader or download using a commercially available public non-proxied connection.


Regards,

Munesh


0 포인트
Baventhiran
직원
4,385 조회수

Hi Munesh,

Yes, exactly. Thank you for understanding. 

0 포인트
Max_L_Intel
중재자
4,367 조회수

Hi Baventhiran.

Please let us know if you need any further assistance in regards to this case or can we close it?
Thanks.

 

 
Baventhiran
직원
4,357 조회수

Hi Max,

No further assistance is needed, please feel free to close. Thanks.

0 포인트
IntelSupport
관리자
4,349 조회수

Hi Baventriran,

Thank you for your question. Since you don't need any further assistance, I will close the case and this thread is no longer monitored. If you need any additional information from Intel, please submit a new question.


Regards,

Aznie


0 포인트
응답