Skip to content

Commit 75ec8ad

Browse files
Merge pull request #1636 from openvinotoolkit/release
Merge OpenVINO toolkit 2021.1 content into master
2 parents 0224f4b + 6218da6 commit 75ec8ad

File tree

1,194 files changed

+203848
-18797
lines changed

Some content is hidden

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

1,194 files changed

+203848
-18797
lines changed

.editorconfig

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
root = true
22

33
[*]
4-
end_of_line = lf
54
indent_size = 4
65
indent_style = space
76
insert_final_newline = true
87
trim_trailing_whitespace = true
9-
10-
# 4 space indentation
11-
#[*.py]
12-
#indent_style = space
13-
#indent_size = 4
14-
15-
#[{CMakeLists.txt,*.cmake}]
16-
#indent_style = space
17-
#indent_size = 4
18-
19-
#[*.{c,cpp,h,hpp}]
20-
#indent_style = space
21-
#indent_size = 4

CONTRIBUTING.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We appreciate your intention to contribute model to the OpenVINO™ Open Model Zoo (OMZ). OMZ is licensed under the Apache\* License, Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms. Note that we accept models under permissive licenses, such as **MIT**, **Apache 2.0**, and **BSD-3-Clause**. Otherwise, it might take longer time to get your model approved.
44

5-
Frameworks supported by the Open Model Zoo:
5+
Frameworks supported by the Open Model Zoo:
66
* Caffe\*
77
* Caffe2\* (via conversion to ONNX\*)
88
* TensorFlow\*
@@ -45,7 +45,7 @@ File | Destination
4545
---|---
4646
configuration file | `models/public/<model_name>/model.yml`
4747
documentation file | `models/public/<model_name>/<model_name>.md`
48-
validation configuration file|`tools/accuracy_checker/configs/<model_name>.yml`
48+
validation configuration file|`models/public/<model_name>/accuracy-check.yml`
4949
demo|`demos/<demo_name>`<br>or<br>`demos/python_demos/<demo_name>`
5050

5151
### Tests
@@ -66,13 +66,13 @@ Your PR may be rejected in some cases, for example:
6666

6767
## Configuration File
6868

69-
The model configuration file contains information about model: what it is, how to download it, and how to convert it to the IR format. This information must be specified in the `model.yml` file that must be located in the model subfolder.
69+
The model configuration file contains information about model: what it is, how to download it, and how to convert it to the IR format. This information must be specified in the `model.yml` file that must be located in the model subfolder.
7070

7171
The detailed descriptions of file entries provided below.
7272

7373
**`description`**
7474

75-
Description of the model. Must match with the description from the model [documentation](#documentation). Use [this](./ci/description_updater/documentation_updater.py) script for easy update.
75+
Description of the model. Must match with the description from the model [documentation](#documentation). Use [this](./ci/documentation_updater/documentation_updater.py) script for easy update.
7676

7777
**`task_type`**
7878

@@ -90,7 +90,7 @@ Downloadable files. Each file is described by:
9090
* `source` - sets a direct link to a file *OR* describes a file access parameters
9191

9292
> **TIP**: You can obtain a hash sum using the `sha256sum <file_name>` command on Linux\*.
93-
93+
9494
If file is located on Google Drive\*, the `source` section must contain:
9595
- `$type: google_drive`
9696
- `id` file ID on Google Drive\*
@@ -177,21 +177,21 @@ license: https://raw.githubusercontent.com/pudae/tensorflow-densenet/master/LICE
177177

178178
## Model Conversion
179179

180-
Deep Learning Inference Engine (IE) supports models in the Intermediate Representation (IR) format. A model from any supported framework can be converted to IR using the Model Optimizer tool included in the OpenVINO&trade; toolkit. Find more information about conversion in the [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html). After a successful conversion you get a model in the IR format, with the `*.xml` file representing the net graph and the `*.bin` file containing the net parameters.
180+
Deep Learning Inference Engine (IE) supports models in the Intermediate Representation (IR) format. A model from any supported framework can be converted to IR using the Model Optimizer tool included in the OpenVINO&trade; toolkit. Find more information about conversion in the [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html). After a successful conversion you get a model in the IR format, with the `*.xml` file representing the net graph and the `*.bin` file containing the net parameters.
181181

182182
> **NOTE 1**: Image preprocessing parameters (mean and scale) must be built into a converted model to simplify model usage.
183183
184184
> **NOTE 2**: If a model input is a color image, color channel order should be `BGR`.
185185
186186
## Demo
187187

188-
A demo shows the main idea of how to infer a model using IE. If your model solves one of the tasks supported by the Open Model Zoo, try to find an appropriate option from [demos](demos/README.md) or [samples](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html). Otherwise, you must provide your own demo (C++ or Python).
188+
A demo shows the main idea of how to infer a model using IE. If your model solves one of the tasks supported by the Open Model Zoo, try to find an appropriate option from [demos](demos/README.md) or [samples](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html). Otherwise, you must provide your own demo (C++ or Python).
189189

190190
The demo's name should end with `_demo` suffix to follow the convention of the project.
191191

192192
Demos are required to support the following keys:
193193

194-
- `-i "<input>"`: Required. Input to process.
194+
- `-i "<input>"`: Required. An input to process. The input can usually be a single image, a folder of images or anything that OpenCV's `VideoCapture` can process.
195195
- `-m "<path>"`: Required. Path to an .xml file with a trained model. If the demo uses several models at the same time, use other keys prefixed with `-m_`.
196196
- `-d "<device>"`: Optional. Specifies a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. Default must be CPU. If the demo uses several models at the same time, use keys prefixed with `d_` (just like keys `m_*` above) to specify device for each model.
197197
- `-no_show`: Optional. Do not visualize inference results.
@@ -206,29 +206,18 @@ Add `README.md` file, which describes demo usage. Update [demos' README.md](demo
206206

207207
Accuracy validation can be performed by the [Accuracy Checker](./tools/accuracy_checker) tool. This tool can use either IE to run a converted model, or an original framework to run an original model. Accuracy Checker supports lots of datasets, metrics and preprocessing options, which simplifies validation if a task is supported by the tool. You only need to create a configuration file that contains necessary parameters for accuracy validation (specify a dataset and annotation, pre- and post-processing parameters, accuracy metrics to compute and so on) of converted model. For details, refer to [Testing new models](./tools/accuracy_checker#testing-new-models).
208208

209-
If a model uses a dataset which is not supported by the Accuracy Checker, you also must provide the license and the link to it and mention it in the PR description.
209+
If a model uses a dataset which is not supported by the Accuracy Checker, you also must provide the license and the link to it and mention it in the PR description.
210210

211211
When the configuration file is ready, you must run the Accuracy Checker to obtain metric results. If they match your results, that means conversion was successful and the Accuracy Checker fully supports your model, metric and dataset. Otherwise, recheck the [conversion](#model-conversion) parameters or the validation configuration file.
212212

213213
### Example
214214

215-
This example uses one of the files from `tools/accuracy_checker/configs`validation configuration file for [DenseNet-121](tools/accuracy_checker/configs/densenet-121-tf.yml)\* from TensorFlow\*:
215+
This example uses validation configuration file for [DenseNet-121](models/public/densenet-121-tf/accuracy-check.yml)\* from TensorFlow\*:
216216
```
217217
models:
218218
- name: densenet-121-tf
219219
launchers:
220220
- framework: dlsdk
221-
tags:
222-
- FP32
223-
model: public/densenet-121-tf/FP32/densenet-121-tf.xml
224-
weights: public/densenet-121-tf/FP32/densenet-121-tf.bin
225-
adapter: classification
226-
227-
- framework: dlsdk
228-
tags:
229-
- FP16
230-
model: public/densenet-121-tf/FP16/densenet-121-tf.xml
231-
weights: public/densenet-121-tf/FP16/densenet-121-tf.bin
232221
adapter: classification
233222
234223
datasets:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# [OpenVINO™ Toolkit](https://01.org/openvinotoolkit) - Open Model Zoo repository
2-
[![Stable release](https://img.shields.io/badge/version-2020.4-green.svg)](https://github.com/opencv/open_model_zoo/releases/tag/2020.4)
2+
[![Stable release](https://img.shields.io/badge/version-2021.1-green.svg)](https://github.com/opencv/open_model_zoo/releases/tag/2021.1)
33
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/open_model_zoo/community)
44
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)
55

ci/check-release-readiness.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env python3
2+
3+
"""
4+
This script does various consistency checks that should pass before a release
5+
but that can't pass in every commit due to process imperfections.
6+
7+
Specifically, we publish Intel models separately from their documentation and
8+
demo support code. Because of that, we can have situations where a model's
9+
config file is added, but documentation isn't, or vice versa. These need to be
10+
rectified before a release, so the script will warn about them.
11+
12+
Also, we can only add a model to models.lst files once its configs are added.
13+
In order to not forget to do that, we can add TODO comments and the script
14+
will warn if any models.lst files contain such comments.
15+
"""
16+
17+
import re
18+
import sys
19+
20+
from pathlib import Path
21+
22+
OMZ_ROOT = Path(__file__).resolve().parent.parent
23+
24+
RE_TODO_COMMENT = re.compile(r'#.*\b(?:TODO|FIXME)\b')
25+
26+
def main():
27+
all_passed = True
28+
29+
def complain(format, *args):
30+
nonlocal all_passed
31+
print(format.format(*args), file=sys.stderr)
32+
all_passed = False
33+
34+
for model_dir in OMZ_ROOT.glob('models/*/*/'):
35+
# searching recursively, because this could be a composite model
36+
has_config = bool(list(model_dir.glob('**/model.yml')))
37+
38+
has_doc = bool(list(model_dir.glob('**/*.md')))
39+
40+
if has_config and not has_doc:
41+
complain('model {} has no documentation', model_dir.name)
42+
43+
if has_doc and not has_config:
44+
complain('model {} has no config file', model_dir.name)
45+
46+
for models_lst_path in OMZ_ROOT.glob('demos/**/models.lst'):
47+
with models_lst_path.open() as models_lst:
48+
for line in models_lst:
49+
if RE_TODO_COMMENT.search(line):
50+
complain('{} has a TODO comment', models_lst_path.relative_to(OMZ_ROOT))
51+
52+
sys.exit(0 if all_passed else 1)
53+
54+
if __name__ == '__main__':
55+
main()

ci/get-jobs-for-changes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def main():
4444
args = parser.parse_args()
4545

4646
git_diff_output = subprocess.check_output(
47-
["git", "diff", "--name-only", "-z", args.base_commit + "...HEAD"])
47+
["git", "diff", "--name-only", "--no-renames", "-z", args.base_commit + "...HEAD"])
4848
changed_files = list(map(PurePosixPath, git_diff_output.decode()[:-1].split("\0")))
4949

5050
models_dir = PurePosixPath("models")
@@ -55,6 +55,9 @@ def main():
5555
if models_dir in changed_file.parents and changed_file.name == "model.yml":
5656
if Path(changed_file).exists(): # it might've been deleted in the branch
5757
jobs.setdefault("models", []).append(changed_file.parent.name)
58+
else:
59+
# make sure no models.lst files reference the deleted model
60+
jobs["models_lst"] = True
5861

5962
git_check_attr_output = subprocess.run(
6063
["git", "check-attr", "--stdin", "-z", "--all"],

ci/requirements-ac-test.txt

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
# use update-requirements.py to update this file
22

3-
atomicwrites==1.3.0 # via -r tools/accuracy_checker/requirements-test.in
3+
atomicwrites==1.4.0 # via -r tools/accuracy_checker/requirements-test.in
44
attrs==19.3.0 # via pytest
55
cycler==0.10.0 # via matplotlib
66
decorator==4.4.2 # via networkx
77
editdistance==0.5.3 # via -r tools/accuracy_checker/requirements.in
8-
imageio==2.8.0 # via scikit-image
9-
importlib-metadata==1.6.0 # via pluggy, pytest
8+
imageio==2.9.0 # via scikit-image
9+
importlib-metadata==1.7.0 # via pluggy, pytest
1010
joblib==0.14.1 # via scikit-learn
1111
kiwisolver==1.1.0 # via matplotlib
1212
matplotlib==3.0.3 # via scikit-image
13-
more-itertools==8.2.0 # via pytest
13+
more-itertools==8.4.0 # via pytest
1414
networkx==2.4 # via scikit-image
1515
nibabel==3.0.2 # via -r tools/accuracy_checker/requirements.in
1616
numpy==1.17.5 # via -r tools/accuracy_checker/requirements-core.in, imageio, matplotlib, nibabel, pywavelets, scikit-learn, scipy
17-
packaging==20.3 # via pytest
17+
packaging==20.4 # via pytest
1818
pathlib2==2.3.5 # via pytest
19-
pillow==7.1.1 # via -r tools/accuracy_checker/requirements.in, imageio, scikit-image
19+
pillow==7.2.0 # via -r tools/accuracy_checker/requirements.in, imageio, scikit-image
2020
pluggy==0.13.1 # via pytest
2121
py-cpuinfo==4.0.0 # via -r tools/accuracy_checker/requirements.in
22-
py==1.8.1 # via pytest
23-
pydicom==1.4.2 # via -r tools/accuracy_checker/requirements.in
22+
py==1.9.0 # via pytest
23+
pydicom==2.0.0 # via -r tools/accuracy_checker/requirements.in
2424
pyparsing==2.4.7 # via matplotlib, packaging
2525
pytest-mock==2.0.0 # via -r tools/accuracy_checker/requirements-test.in
26-
pytest==5.4.1 # via -r tools/accuracy_checker/requirements-test.in, pytest-mock
26+
pytest==5.4.3 # via -r tools/accuracy_checker/requirements-test.in, pytest-mock
2727
python-dateutil==2.8.1 # via matplotlib
2828
pywavelets==1.1.1 # via scikit-image
29-
pyyaml==5.3.1 # via -r tools/accuracy_checker/requirements-core.in, yamlloader
29+
pyyaml==5.3.1 # via -r tools/accuracy_checker/requirements-core.in
3030
scikit-image==0.15.0 # via -r tools/accuracy_checker/requirements.in
3131
scikit-learn==0.22.2.post1 # via -r tools/accuracy_checker/requirements.in
3232
scipy==1.4.1 # via -r tools/accuracy_checker/requirements.in, scikit-image, scikit-learn
33-
sentencepiece==0.1.85 # via -r tools/accuracy_checker/requirements.in
33+
sentencepiece==0.1.91 # via -r tools/accuracy_checker/requirements.in
3434
shapely==1.7.0 # via -r tools/accuracy_checker/requirements.in
35-
six==1.14.0 # via packaging, pathlib2, python-dateutil
36-
tokenizers==0.7 # via -r tools/accuracy_checker/requirements.in
37-
tqdm==4.45.0 # via -r tools/accuracy_checker/requirements.in
38-
wcwidth==0.1.9 # via pytest
39-
yamlloader==0.5.5 # via -r tools/accuracy_checker/requirements.in
35+
six==1.15.0 # via packaging, pathlib2, python-dateutil
36+
tokenizers==0.8.0 # via -r tools/accuracy_checker/requirements.in
37+
tqdm==4.47.0 # via -r tools/accuracy_checker/requirements.in
38+
wcwidth==0.2.5 # via pytest
4039
zipp==1.2.0 # via importlib-metadata
4140

4241
# The following packages are considered to be unsafe in a requirements file:

ci/requirements-ac.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,28 @@
33
cycler==0.10.0 # via matplotlib
44
decorator==4.4.2 # via networkx
55
editdistance==0.5.3 # via -r tools/accuracy_checker/requirements.in
6-
imageio==2.8.0 # via scikit-image
6+
imageio==2.9.0 # via scikit-image
77
joblib==0.14.1 # via scikit-learn
88
kiwisolver==1.1.0 # via matplotlib
99
matplotlib==3.0.3 # via scikit-image
1010
networkx==2.4 # via scikit-image
1111
nibabel==3.0.2 # via -r tools/accuracy_checker/requirements.in
1212
numpy==1.17.5 # via -r tools/accuracy_checker/requirements-core.in, imageio, matplotlib, nibabel, pywavelets, scikit-learn, scipy
13-
pillow==7.1.1 # via -r tools/accuracy_checker/requirements.in, imageio, scikit-image
13+
pillow==7.2.0 # via -r tools/accuracy_checker/requirements.in, imageio, scikit-image
1414
py-cpuinfo==4.0.0 # via -r tools/accuracy_checker/requirements.in
15-
pydicom==1.4.2 # via -r tools/accuracy_checker/requirements.in
15+
pydicom==2.0.0 # via -r tools/accuracy_checker/requirements.in
1616
pyparsing==2.4.7 # via matplotlib
1717
python-dateutil==2.8.1 # via matplotlib
1818
pywavelets==1.1.1 # via scikit-image
19-
pyyaml==5.3.1 # via -r tools/accuracy_checker/requirements-core.in, yamlloader
19+
pyyaml==5.3.1 # via -r tools/accuracy_checker/requirements-core.in
2020
scikit-image==0.15.0 # via -r tools/accuracy_checker/requirements.in
2121
scikit-learn==0.22.2.post1 # via -r tools/accuracy_checker/requirements.in
2222
scipy==1.4.1 # via -r tools/accuracy_checker/requirements.in, scikit-image, scikit-learn
23-
sentencepiece==0.1.85 # via -r tools/accuracy_checker/requirements.in
23+
sentencepiece==0.1.91 # via -r tools/accuracy_checker/requirements.in
2424
shapely==1.7.0 # via -r tools/accuracy_checker/requirements.in
2525
six==1.15.0 # via python-dateutil
26-
tokenizers==0.7 # via -r tools/accuracy_checker/requirements.in
27-
tqdm==4.45.0 # via -r tools/accuracy_checker/requirements.in
28-
yamlloader==0.5.5 # via -r tools/accuracy_checker/requirements.in
26+
tokenizers==0.8.0 # via -r tools/accuracy_checker/requirements.in
27+
tqdm==4.47.0 # via -r tools/accuracy_checker/requirements.in
2928

3029
# The following packages are considered to be unsafe in a requirements file:
3130
# setuptools

0 commit comments

Comments
 (0)