Skip to content

Commit b602081

Browse files
author
Julia Kamelina
authored
tools/downloader: align namespace (openvinotoolkit#2723)
* rename folder structure * rame scripts * update entry points * fix readme * update installation section * update installation section * rename package * rename downloader folder to model_tools * add __init__.py file * use build_py instead build * update readme for yolox * update models readmes
1 parent 227c0e1 commit b602081

File tree

265 files changed

+819
-811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+819
-811
lines changed

.gitattributes

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/demos/build_demos.sh omz.package=l,m
1717
/demos/build_demos_msvc.bat omz.package=w
1818
/demos/tests/** -omz.package
19-
/tools/downloader/tests/** -omz.package
19+
/tools/model_tools/tests/** -omz.package
2020

2121
* omz.package.component=dev
2222
/LICENSE omz.package.component=tools
@@ -38,6 +38,6 @@
3838

3939
/tools/accuracy_checker/** omz.ci.job-for-change.ac
4040
/tools/accuracy_checker/configs/*.yml -omz.ci.job-for-change.ac
41-
/tools/downloader/** omz.ci.job-for-change.downloader
41+
/tools/model_tools/** omz.ci.job-for-change.downloader
4242

4343
*.md omz.ci.job-for-change.documentation -omz.ci.job-for-change.ac -omz.ci.job-for-change.demos -omz.ci.job-for-change.downloader

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ demo|`demos/<demo_name>`<br>or<br>`demos/python_demos/<demo_name>`
5151
### Tests
5252

5353
Your PR must pass next tests:
54-
* Model is downloadable by the `tools/downloader/downloader.py` script. See [Configuration file](#configuration-file) for details.
55-
* Model is convertible by the `tools/downloader/converter.py` script. See [Model conversion](#model-conversion) for details.
54+
* Model is downloadable by the `tools/model_tools/downloader.py` script. See [Configuration file](#configuration-file) for details.
55+
* Model is convertible by the `tools/model_tools/converter.py` script. See [Model conversion](#model-conversion) for details.
5656
* Model is usable by demo or sample and provides adequate results. See [Demo](#demo) for details.
5757
* Model passes accuracy validation. See [Accuracy validation](#accuracy-validation) for details.
5858

@@ -76,7 +76,7 @@ Description of the model. Must match with the description from the model [docume
7676

7777
**`task_type`**
7878

79-
[Model task type](tools/downloader/README.md#model-information-dumper-usage). If there is no task type of your model, add a new one to the list `KNOWN_TASK_TYPES` of the [`open_model_zoo.model_tools._common`](tools/downloader/src/open_model_zoo/model_tools/_common.py) module.
79+
[Model task type](tools/model_tools/README.md#model-information-dumper-usage). If there is no task type of your model, add a new one to the list `KNOWN_TASK_TYPES` of the [`openvino.model_zoo._common`](tools/model_tools/src/openvino/model_zoo/_common.py) module.
8080

8181
**`files`**
8282

@@ -135,7 +135,7 @@ Conversion parameters (learn more in the [Model conversion](#model-conversion) s
135135
136136
**`framework`**
137137

138-
Framework of the original model (see [here](tools/downloader/README.md#model-information-dumper-usage) for details).
138+
Framework of the original model (see [here](tools/model_tools/README.md#model-information-dumper-usage) for details).
139139

140140
**`license`**
141141

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Intel is committed to the respect of human rights and avoiding complicity in hum
1010
## Repository Components:
1111
* [Intel Pre-Trained Models](models/intel/index.md)
1212
* [Public Pre-Trained Models](models/public/index.md)
13-
* [Model Downloader](tools/downloader/README.md) and other automation tools
13+
* [Model Downloader](tools/model_tools/README.md) and other automation tools
1414
* [Demos](demos/README.md) that demonstrate models usage with Deep Learning Deployment Toolkit
1515
* [Accuracy Checker](tools/accuracy_checker/README.md) tool for models accuracy validation
1616

ci/prepare-documentation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def main():
353353
add_accuracy_checker_pages(output_root, navindex_element)
354354

355355
downloader_element = add_page(output_root, navindex_element,
356-
id='omz_tools_downloader', path='tools/downloader/README.md', title='Model Downloader')
356+
id='omz_tools_downloader', path='tools/model_tools/README.md', title='Model Downloader')
357357
downloader_element.attrib[XML_ID_ATTRIBUTE] = 'omz_tools_downloader'
358358

359359
trained_models_group_element = add_page(output_root, navindex_element,

ci/prepare-openvino-content.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def file_is_in_current_package(path):
119119
compat_symlinks = [
120120
('deployment_tools/intel_models', 'open_model_zoo/models/intel'),
121121
('deployment_tools/open_model_zoo/intel_models', 'models/intel'),
122-
('deployment_tools/tools/model_downloader', '../open_model_zoo/tools/downloader'),
122+
('deployment_tools/tools/model_downloader', '../open_model_zoo/tools/model_tools'),
123123
('deployment_tools/inference_engine/demos', '../open_model_zoo/demos'),
124124
]
125125

ci/requirements-conversion.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defusedxml==0.7.1
2727
flatbuffers==1.12
2828
# via tensorflow
2929
future==0.18.2
30-
# via -r tools/downloader/requirements-caffe2.in
30+
# via -r tools/model_tools/requirements-caffe2.in
3131
gast==0.3.3
3232
# via tensorflow
3333
google-auth==1.35.0
@@ -84,8 +84,8 @@ oauthlib==3.1.1
8484
onnx==1.10.1
8585
# via
8686
# -r ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/requirements_onnx.txt
87-
# -r tools/downloader/requirements-caffe2.in
88-
# -r tools/downloader/requirements-pytorch.in
87+
# -r tools/model_tools/requirements-caffe2.in
88+
# -r tools/model_tools/requirements-pytorch.in
8989
opt-einsum==3.3.0
9090
# via tensorflow
9191
pillow==8.3.2
@@ -118,7 +118,7 @@ requests-oauthlib==1.3.0
118118
rsa==4.7.2
119119
# via google-auth
120120
scipy==1.5.4
121-
# via -r tools/downloader/requirements-pytorch.in
121+
# via -r tools/model_tools/requirements-pytorch.in
122122
six==1.15.0
123123
# via
124124
# absl-py
@@ -140,18 +140,18 @@ tensorboard-plugin-wit==1.8.0
140140
tensorflow==2.4.3
141141
# via
142142
# -r ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/requirements_tf2.txt
143-
# -r tools/downloader/requirements-tensorflow.in
143+
# -r tools/model_tools/requirements-tensorflow.in
144144
tensorflow-estimator==2.4.0
145145
# via tensorflow
146146
termcolor==1.1.0
147147
# via tensorflow
148148
torch==1.8.1
149149
# via
150-
# -r tools/downloader/requirements-caffe2.in
151-
# -r tools/downloader/requirements-pytorch.in
150+
# -r tools/model_tools/requirements-caffe2.in
151+
# -r tools/model_tools/requirements-pytorch.in
152152
# torchvision
153153
torchvision==0.9.1
154-
# via -r tools/downloader/requirements-pytorch.in
154+
# via -r tools/model_tools/requirements-pytorch.in
155155
typing-extensions==3.7.4.3
156156
# via
157157
# importlib-metadata
@@ -172,7 +172,7 @@ wheel==0.37.0
172172
wrapt==1.12.1
173173
# via tensorflow
174174
yacs==0.1.8
175-
# via -r tools/downloader/requirements-pytorch.in
175+
# via -r tools/model_tools/requirements-pytorch.in
176176
zipp==3.5.0
177177
# via importlib-metadata
178178

ci/requirements-downloader.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ charset-normalizer==2.0.4
77
idna==3.2
88
# via requests
99
pyyaml==5.4.1
10-
# via -r tools/downloader/requirements.in
10+
# via -r tools/model_tools/requirements.in
1111
requests==2.26.0
12-
# via -r tools/downloader/requirements.in
12+
# via -r tools/model_tools/requirements.in
1313
urllib3==1.26.6
1414
# via requests

ci/update-requirements.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ def pc(target, *sources):
7171
pc('ci/requirements-check-basics.txt',
7272
'ci/requirements-check-basics.in', 'ci/requirements-documentation.in')
7373
pc('ci/requirements-conversion.txt',
74-
*(f'tools/downloader/requirements-{suffix}.in' for suffix in ['caffe2', 'pytorch', 'tensorflow']),
74+
*(f'tools/model_tools/requirements-{suffix}.in' for suffix in ['caffe2', 'pytorch', 'tensorflow']),
7575
*(openvino_dir / f'deployment_tools/model_optimizer/requirements_{suffix}.txt'
7676
for suffix in ['caffe', 'mxnet', 'onnx', 'tf2']))
7777
pc('ci/requirements-demos.txt',
7878
'demos/requirements.txt', openvino_dir / 'python/requirements.txt')
7979
pc('ci/requirements-downloader.txt',
80-
'tools/downloader/requirements.in')
80+
'tools/model_tools/requirements.in')
8181
pc('ci/requirements-quantization.txt',
8282
'tools/accuracy_checker/requirements-core.in', 'tools/accuracy_checker/requirements.in',
8383
openvino_dir / 'deployment_tools/tools/post_training_optimization_toolkit/setup.py',

demos/3d_segmentation_demo/python/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ python3 -mpip install --user -r <omz_dir>/demos/3d_segmentation_demo/python/requ
1818

1919
For demo input image or video files, refer to the section **Media Files Available for Demos** in the [Open Model Zoo Demos Overview](../../README.md).
2020
The list of models supported by the demo is in `<omz_dir>/demos/3d_segmentation_demo/python/models.lst` file.
21-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
21+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
2222

2323
An example of using the Model Downloader:
2424

2525
```sh
26-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
26+
omz_downloader --list models.lst
2727
```
2828

2929
An example of using the Model Converter:
3030

3131
```sh
32-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
32+
omz_converter --list models.lst
3333
```
3434

3535
### Supported Models
@@ -124,4 +124,4 @@ The demo reports
124124

125125
* [Open Model Zoo Demos](../../README.md)
126126
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
127-
* [Model Downloader](../../../tools/downloader/README.md)
127+
* [Model Downloader](../../../tools/model_tools/README.md)

demos/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ To run the demo applications, you can use images and videos from the media files
7474

7575
> **NOTE:** Inference Engine HDDL plugin is available in [proprietary](https://software.intel.com/en-us/openvino-toolkit) distribution only.
7676
77-
You can download the [Intel pre-trained models](../models/intel/index.md) or [public pre-trained models](../models/public/index.md) using the OpenVINO [Model Downloader](../tools/downloader/README.md).
77+
You can download the [Intel pre-trained models](../models/intel/index.md) or [public pre-trained models](../models/public/index.md) using the OpenVINO [Model Downloader](../tools/model_tools/README.md).
7878

7979
## Build the Demo Applications
8080

demos/action_recognition_demo/python/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ You can change the value of `num_requests` in `action_recognition_demo.py` to fi
3838

3939
For demo input image or video files, refer to the section **Media Files Available for Demos** in the [Open Model Zoo Demos Overview](../../README.md).
4040
The list of models supported by the demo is in `<omz_dir>/demos/action_recognition_demo/python/models.lst` file.
41-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
41+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
4242

4343
An example of using the Model Downloader:
4444

4545
```sh
46-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
46+
omz_downloader --list models.lst
4747
```
4848

4949
An example of using the Model Converter:
5050

5151
```sh
52-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
52+
omz_converter --list models.lst
5353
```
5454

5555
### Supported Models
@@ -151,4 +151,4 @@ The application uses OpenCV to display the real-time action recognition results
151151

152152
* [Open Model Zoo Demos](../../README.md)
153153
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
154-
* [Model Downloader](../../../tools/downloader/README.md)
154+
* [Model Downloader](../../../tools/model_tools/README.md)

demos/bert_named_entity_recognition_demo/python/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ The text is then used to search named entities.
1111
## Preparing to Run
1212

1313
The list of models supported by the demo is in `<omz_dir>/demos/bert_named_entity_recognition_demo/python/models.lst` file.
14-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
14+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
1515

1616
An example of using the Model Downloader:
1717

1818
```sh
19-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
19+
omz_downloader --list models.lst
2020
```
2121

2222
An example of using the Model Converter:
2323

2424
```sh
25-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
25+
omz_converter --list models.lst
2626
```
2727

2828
### Supported Models
@@ -84,7 +84,7 @@ The application reports
8484
## Example Demo Cmd-Line
8585

8686
You can use the following command to try the demo (assuming the model from the Open Model Zoo, downloaded and converted with the
87-
[Model Downloader](../../../tools/downloader/README.md) executed with "--name bert*"):
87+
[Model Downloader](../../../tools/model_tools/README.md) executed with "--name bert*"):
8888

8989
```sh
9090
python3 bert_named_entity_recognition_demo.py.py
@@ -103,5 +103,5 @@ Notice that when the original "context" (text from the url) do not fit the model
103103

104104
* [Open Model Zoo Demos](../../README.md)
105105
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
106-
* [Model Downloader](../../../tools/downloader/README.md)
106+
* [Model Downloader](../../../tools/model_tools/README.md)
107107
* [Benchmark C++ Sample](https://docs.openvinotoolkit.org/latest/_inference_engine_samples_benchmark_app_README.html)

demos/bert_question_answering_demo/python/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ The text is then used to search answers for user-provided questions.
1111
## Preparing to Run
1212

1313
The list of models supported by the demo is in `<omz_dir>/demos/bert_question_answering_demo/python/models.lst` file.
14-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
14+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
1515

1616
An example of using the Model Downloader:
1717

1818
```sh
19-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
19+
omz_downloader --list models.lst
2020
```
2121

2222
An example of using the Model Converter:
2323

2424
```sh
25-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
25+
omz_converter --list models.lst
2626
```
2727

2828
### Supported Models
@@ -148,5 +148,5 @@ Thus, for the long texts, the network is called multiple times. The results are
148148

149149
* [Open Model Zoo Demos](../../README.md)
150150
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
151-
* [Model Downloader](../../../tools/downloader/README.md)
151+
* [Model Downloader](../../../tools/model_tools/README.md)
152152
* [Benchmark C++ Sample](https://docs.openvinotoolkit.org/latest/_inference_engine_samples_benchmark_app_README.html)

demos/bert_question_answering_embedding_demo/python/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ If second (conventional SQuAD-tuned) Bert model is provided as well, it is used
2020
## Preparing to Run
2121

2222
The list of models supported by the demo is in `<omz_dir>/demos/bert_question_answering_embedding_demo/python/models.lst` file.
23-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
23+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
2424

2525
An example of using the Model Downloader:
2626

2727
```sh
28-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
28+
omz_downloader --list models.lst
2929
```
3030

3131
An example of using the Model Converter:
3232

3333
```sh
34-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
34+
omz_converter --list models.lst
3535
```
3636

3737
### Supported Models
@@ -159,5 +159,5 @@ Thus, for the long paragraph texts, the network is called multiple times as for
159159

160160
* [Open Model Zoo Demos](../../README.md)
161161
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
162-
* [Model Downloader](../../../tools/downloader/README.md)
162+
* [Model Downloader](../../../tools/model_tools/README.md)
163163
* [Benchmark C++ Sample](https://docs.openvinotoolkit.org/latest/_inference_engine_samples_benchmark_app_README.html)

demos/classification_demo/cpp/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ You can stop the demo by pressing "Esc" or "Q" button. After that, the average m
1717
## Preparing to Run
1818

1919
The list of models supported by the demo is in `<omz_dir>/demos/classification_demo/cpp/models.lst` file.
20-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
20+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
2121

2222
An example of using the Model Downloader:
2323

2424
```sh
25-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
25+
omz_downloader --list models.lst
2626
```
2727

2828
An example of using the Model Converter:
2929

3030
```sh
31-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
31+
omz_converter --list models.lst
3232
```
3333

3434
### Supported Models
@@ -205,4 +205,4 @@ You can use these metrics to measure application-level performance.
205205

206206
* [Open Model Zoo Demos](../../README.md)
207207
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
208-
* [Model Downloader](../../../tools/downloader/README.md)
208+
* [Model Downloader](../../../tools/model_tools/README.md)

demos/colorization_demo/python/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ On startup, the application reads command-line parameters and loads one network
1414

1515
For demo input image or video files, refer to the section **Media Files Available for Demos** in the [Open Model Zoo Demos Overview](../../README.md).
1616
The list of models supported by the demo is in `<omz_dir>/demos/colorization_demo/python/models.lst` file.
17-
This file can be used as a parameter for [Model Downloader](../../../tools/downloader/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
17+
This file can be used as a parameter for [Model Downloader](../../../tools/model_tools/README.md) and Converter to download and, if necessary, convert models to OpenVINO Inference Engine format (\*.xml + \*.bin).
1818

1919
An example of using the Model Downloader:
2020

2121
```sh
22-
python3 <omz_dir>/tools/downloader/downloader.py --list models.lst
22+
omz_downloader --list models.lst
2323
```
2424

2525
An example of using the Model Converter:
2626

2727
```sh
28-
python3 <omz_dir>/tools/downloader/converter.py --list models.lst
28+
omz_converter --list models.lst
2929
```
3030

3131
### Supported Models
@@ -97,4 +97,4 @@ You can use both of these metrics to measure application-level performance.
9797

9898
* [Open Model Zoo Demos](../../README.md)
9999
* [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
100-
* [Model Downloader](../../../tools/downloader/README.md)
100+
* [Model Downloader](../../../tools/model_tools/README.md)

0 commit comments

Comments
 (0)