Skip to content

Commit

Permalink
Merge branch 'main' into facies_segmentation_demo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyhorkin authored Apr 4, 2022
2 parents 1190b9a + 759fcdc commit f514e9f
Show file tree
Hide file tree
Showing 38 changed files with 681 additions and 311 deletions.
2 changes: 1 addition & 1 deletion .docker/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ monai = "*"
nbval = "*"
nltk = ">=3.6.4"
nncf = {extras = ["torch", "tf"], version = ">=2.1.0"}
openvino-dev = {extras = ["onnx"], version = "==2022.1.0.dev20220316"}
openvino-dev = {extras = ["onnx"], version = "==2022.1.0"}
ovmsclient = "*"
paddle2onnx = ">=0.6"
paddlehub = "*"
Expand Down
48 changes: 24 additions & 24 deletions .docker/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PIP_CACHE_KEY=cache-pip-2022.1.0.dev20220302
FILES_CACHE_KEY=files-cache-2022-02-12
USER_CACHE_KEY=user-cache-2022-02-12
PIP_CACHE_KEY=cache-pip-2022.1.0
FILES_CACHE_KEY=files-cache-2022-03-23
USER_CACHE_KEY=user-cache-2022-03-23
HUB_HOME=/tmp/paddlehub
5 changes: 4 additions & 1 deletion .github/workflows/nbval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'requirements.txt'
- '.ci/*'
- '.github/workflows/nbval.yml'
- '.github/workflows/.env'
push:
branches:
- 'main'
Expand All @@ -22,11 +23,12 @@ on:
- 'requirements.txt'
- '.ci/*'
- '.github/workflows/nbval.yml'
- '.github/workflows/.env'
schedule:
- cron: '30 8 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -195,3 +197,4 @@ jobs:
ls -laR ${{ env.CACHE_DIR }}
du -sh ${{ env.CACHE_DIR }}
if: runner.os != 'Windows'

5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To do this, there are a few requirements that all notebooks need to pass.

1. The notebooks work on Windows, macOS and Linux (see [supported operating
systems](https://github.com/openvinotoolkit/openvino_notebooks#%EF%B8%8F-system-requirements))
with Python 3.6, 3.7 and 3.8.
with Python 3.6, 3.7, 3.8 and 3.9.
2. As a rule, the notebooks do not require installation of additional software that is not installable by
`pip`. We do not assume that users have installed XCode Dev Tools, Visual C++ redistributable,
cmake, etc. Please discuss if your notebook does need C++ - there are exceptions to this rule.
Expand All @@ -71,6 +71,9 @@ To do this, there are a few requirements that all notebooks need to pass.
not just to show the output of a model, but to teach how OpenVINO works, by interacting with it.
Not all notebooks need to be full-fledged tutorials, but it is always good to explain steps and
add comments.
8. Respect for human rights is rooted in our [values at Intel](https://www.intel.com/content/www/us/en/policy/policy-human-rights.html).
We will not accept contributions that perform facial recognition or analyze demographics like age
and gender.

### Implementation choices

Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ English | [简体中文](README_cn.md)

A collection of ready-to-run Jupyter notebooks for learning and experimenting with the OpenVINO™ Toolkit. The notebooks provide an introduction to OpenVINO basics and teach developers how to leverage our API for optimized deep learning inference.

**NOTE: The main branch of this repository was updated to the latest pre-release of OpenVINO (2022.1).** To use the pre-release version please run `pip install --upgrade -r requirements.txt` in your `openvino_env` virtual environment. To install for the first time, see the [Installation Guide](#-installation-guide) below. To use the stable LTS version check out the [2021.4 branch](https://github.com/openvinotoolkit/openvino_notebooks/tree/2021.4).
**NOTE: The main branch of this repository was updated to support the new OpenVINO 2022.1 release.** To upgrade to the new release version, please run `pip install --upgrade -r requirements.txt` in your `openvino_env` virtual environment. If you need to install for the first time, see the [Installation Guide](#-installation-guide) section below. If you wish to use the previous Long Term Support (LTS) version of OpenVINO check out the [2021.4 branch](https://github.com/openvinotoolkit/openvino_notebooks/tree/2021.4).

If you need help, please start a GitHub [Discussion](https://github.com/openvinotoolkit/openvino_notebooks/discussions).

<details>
<summary>📖 Table of Contents</summary>
Expand Down Expand Up @@ -46,7 +48,7 @@ A collection of ready-to-run Jupyter notebooks for learning and experimenting wi

## 📝 Installation Guide

OpenVINO Notebooks require Python and Git. Select a guide for your operating system or environment:
OpenVINO Notebooks require Python and Git. To get started, select the guide for your operating system or environment:

| [Windows](https://github.com/openvinotoolkit/openvino_notebooks/wiki/Windows) | [Ubuntu](https://github.com/openvinotoolkit/openvino_notebooks/wiki/Ubuntu) | [macOS](https://github.com/openvinotoolkit/openvino_notebooks/wiki/macOS) | [Red Hat](https://github.com/openvinotoolkit/openvino_notebooks/wiki/Red-Hat-and-CentOS) | [CentOS](https://github.com/openvinotoolkit/openvino_notebooks/wiki/Red-Hat-and-CentOS) | [Azure ML](https://github.com/openvinotoolkit/openvino_notebooks/wiki/AzureML) | [Docker](https://github.com/openvinotoolkit/openvino_notebooks/wiki/Docker) |
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
Expand All @@ -56,7 +58,7 @@ OpenVINO Notebooks require Python and Git. Select a guide for your operating sys

## 🚀 Getting Started

Here you will fine a collection of notebooks categorized into four classes, select the one is more related with your need or test all if you want. Good Luck!
The Jupyter notebooks are categorized into four classes, select one related to your needs or give them all a try. Good Luck!

<div id='first-steps'/>

Expand Down Expand Up @@ -88,7 +90,7 @@ Tutorials that explain how to optimize and quantize models with OpenVINO tools.
| Convert TensorFlow models to OpenVINO IR | Convert PyTorch models to OpenVINO IR | Convert PaddlePaddle models to OpenVINO IR | Download, convert and benchmark models from Open Model Zoo |
| <img src="https://user-images.githubusercontent.com/15709723/127779167-9d33dcc6-9001-4d74-a089-8248310092fe.png" width=250> | <img src="https://user-images.githubusercontent.com/15709723/127779246-32e7392b-2d72-4a7d-b871-e79e7bfdd2e9.png" width=300 > | <img src="https://user-images.githubusercontent.com/15709723/127779326-dc14653f-a960-4877-b529-86908a6f2a61.png" width=300> | <img src="https://user-images.githubusercontent.com/10940214/157541917-c5455105-b0d9-4adf-91a7-fbc142918015.png" width=150> |

More amazing notebooks here! Please take a look of the complete list.
More amazing notebooks here! Please take a look at the complete list.

| Notebook | Description |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -117,7 +119,7 @@ Demos that demonstrate inference on a particular model.
| Show live inference on segmentation of CT-scan data | Run inference on speech-to-text recognition model | Answer your questions basing on a context | Annotate text on images using text recognition resnet | OCR for handwritten simplified Chinese and Japanese |
|<img src="https://user-images.githubusercontent.com/15709723/134784204-cf8f7800-b84c-47f5-a1d8-25a9afab88f8.gif" width=225>| <img src="https://user-images.githubusercontent.com/36741649/140987347-279de058-55d7-4772-b013-0f2b12deaa61.png" width=225> | <img src="https://user-images.githubusercontent.com/4547501/152571639-ace628b2-e3d2-433e-8c28-9a5546d76a86.gif" width=225> | <img src="https://user-images.githubusercontent.com/36741649/129315292-a37266dc-dfb2-4749-bca5-2ac9c1e93d64.jpg" width=225> | <img width="425" alt="handwritten_simplified_chinese_test" src="https://user-images.githubusercontent.com/36741649/132660640-da2211ec-c389-450e-8980-32a75ed14abb.png"> <br> 的人不一了是他有为在责新中任自之我们 |

More amazing notebooks here! Please take a look of the complete list.
More amazing notebooks here! Please take a look at the complete list.

| Notebook | Description | Preview |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
Expand All @@ -133,6 +135,7 @@ More amazing notebooks here! Please take a look of the complete list.
| [211-speech-to-text](notebooks/211-speech-to-text/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F211-speech-to-text%2F211-speech-to-text.ipynb) | Run inference on speech-to-text recognition model | <img src="https://user-images.githubusercontent.com/36741649/140987347-279de058-55d7-4772-b013-0f2b12deaa61.png" width=225>|
| [212-onnx-style-transfer](notebooks/212-onnx-style-transfer/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F212-onnx-style-transfer%2F212-onnx-style-transfer.ipynb) | Transform images to five different styles with neural style transfer | <img src="https://user-images.githubusercontent.com/77325899/147358090-ff5b21f5-0efb-4aff-8444-9d07add49b92.png" width=100>→<img src="https://user-images.githubusercontent.com/77325899/147358009-0cf10d51-3150-40cb-a776-074558b98da5.png" width=100>|
| [213-question-answering](notebooks/213-question-answering/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F213-question-answering%2F213-question-answering.ipynb) | Answer your questions basing on a context | <img src="https://user-images.githubusercontent.com/4547501/152571639-ace628b2-e3d2-433e-8c28-9a5546d76a86.gif" width=225> |
| [214-vision-paddle-classification](notebooks/214-vision-paddle-classification/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F214-vision-paddle-classification%2F214-vision-paddle-classification.ipynb) | PaddlePaddle Image Classification with OpenVINO| |

</details>
</p>
Expand Down Expand Up @@ -171,7 +174,7 @@ Live inference demos that run on a webcam or video files.
</p>


If you have some problems please check the [troubleshooting section](#troubleshooting) or the [FAQ section](#faq)
If you run into issues, please check the [troubleshooting section](#troubleshooting), [FAQs](#faq) or start a GitHub [discussion](https://github.com/openvinotoolkit/openvino_notebooks/discussions).

Notebooks with a ![binder logo](https://mybinder.org/badge_logo.svg) button can be run without installing anything. [Binder](https://mybinder.org/) is a free online service with limited resources. For the best performance, please follow the [Installation Guide](#installation) and run the notebooks locally.

Expand Down
5 changes: 2 additions & 3 deletions notebooks/001-hello-world/001-hello-world.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
"model = ie.read_model(model=\"model/v3-small_224_1.0_float.xml\")\n",
"compiled_model = ie.compile_model(model=model, device_name=\"CPU\")\n",
"\n",
"output_layer = next(iter(compiled_model.outputs))\n",
"input_layer = next(iter(compiled_model.inputs))"
"output_layer = compiled_model.output(0)"
]
},
{
Expand Down Expand Up @@ -97,7 +96,7 @@
"metadata": {},
"outputs": [],
"source": [
"result_infer = compiled_model(inputs=[input_image])[output_layer]\n",
"result_infer = compiled_model([input_image])[output_layer]\n",
"result_index = np.argmax(result_infer)"
]
},
Expand Down
Loading

0 comments on commit f514e9f

Please sign in to comment.