openvino_notebooks
openvino_notebooks copied to clipboard
📚 Jupyter notebook tutorials for OpenVINO™
English | 简体中文
📚 OpenVINO™ Notebooks
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 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 section below. If you wish to use the previous Long Term Support (LTS) version of OpenVINO check out the 2021.4 branch.
If you need help, please start a GitHub Discussion.
Table of Contents
- ➤ 📝 Installation Guide
-
➤ 🚀 Getting Started
- First steps with OpenVINO
- Convert & Optimize
- Model Demos
- Model Training
- Live Demos
- ➤ ⚙️ System Requirements
- ➤ 💻 Run the Notebooks
- ➤ 🧹 Cleaning Up
- ➤ ⚠️ Troubleshooting
- ➤ 🧑💻 Contributors
- ➤ ❓ FAQ
📝 Installation Guide
OpenVINO Notebooks require Python and Git. To get started, select the guide for your operating system or environment:
Windows | Ubuntu | macOS | Red Hat | CentOS | Azure ML | Docker |
---|
🚀 Getting Started
The Jupyter notebooks are categorized into four classes, select one related to your needs or give them all a try. Good Luck!
💻 First steps
Brief tutorials that demonstrate how to use OpenVINO's Python API for inference.
⌚ Convert & Optimize
Tutorials that explain how to optimize and quantize models with OpenVINO tools.
More amazing notebooks here!
Click here to show complete list!
🎯 Model Demos
Demos that demonstrate inference on a particular model.
More amazing notebooks here!
Click here to show complete list!
🏃 Model Training
Tutorials that include code to train neural networks.
Notebook | Description | Preview |
---|---|---|
301-tensorflow-training-openvino | Train a flower classification model from TensorFlow, then convert to OpenVINO IR | ![]() |
301-tensorflow-training-openvino-pot | Use Post-training Optimization Tool (POT) to quantize the flowers model | |
302-pytorch-quantization-aware-training | Use Neural Network Compression Framework (NNCF) to quantize PyTorch model | |
305-tensorflow-quantization-aware-training | Use Neural Network Compression Framework (NNCF) to quantize TensorFlow model |
📺 Live Demos
Live inference demos that run on a webcam or video files.
If you run into issues, please check the troubleshooting section, FAQs or start a GitHub discussion.
Notebooks with a button can be run without installing anything. Binder is a free online service with limited resources. For the best performance, please follow the Installation Guide and run the notebooks locally.
You will have a lot of fun with this section:
Vision-monodepth | CT-scan-live-inference | Object-detection-webcam | Pose-estimation-webcam | Action-recognition-webcam |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
⚙️ System Requirements
The notebooks run almost anywhere — your laptop, a cloud VM, or even a Docker container. The table below lists the supported operating systems and Python versions. Note: Python 3.10 is not supported yet.
Supported Operating System | Python Version (64-bit) |
---|---|
Ubuntu 18.04 LTS, 64-bit | 3.6, 3.7, 3.8, 3.9 |
Ubuntu 20.04 LTS, 64-bit | 3.6, 3.7, 3.8, 3.9 |
Red Hat Enterprise Linux 8, 64-bit | 3.6, 3.8, 3.9 |
CentOS 7, 64-bit | 3.6, 3.7, 3.8, 3.9 |
macOS 10.15.x versions | 3.6, 3.7, 3.8, 3.9 |
Windows 10, 64-bit Pro, Enterprise or Education editions | 3.6, 3.7, 3.8, 3.9 |
Windows Server 2016 or higher | 3.6, 3.7, 3.8, 3.9 |
💻 Run the Notebooks
To Launch a Single Notebook
If you wish to launch only one notebook, like the Monodepth notebook, run the command below.
jupyter 201-vision-monodepth.ipynb
To Launch all Notebooks
jupyter lab notebooks
In your browser, select a notebook from the file browser in Jupyter Lab using the left sidebar. Each tutorial is located in a subdirectory within the notebooks
directory.
![](https://user-images.githubusercontent.com/15709723/120527271-006fd200-c38f-11eb-9935-2d36d50bab9f.gif)
🧹 Cleaning Up
To end your Jupyter session, press Shut Down Jupyter Kernel
Ctrl-c
. This will prompt you to Shutdown this Jupyter server (y/[n])?
enter y
and hit Enter
.
To deactivate your virtualenv, simply run To reactivate your environment, run Deactivate Virtual Environment
deactivate
from the terminal window where you activated openvino_env
. This will deactivate your environment.source openvino_env/bin/activate
on Linux or openvino_env\Scripts\activate
on Windows, then type jupyter lab
or jupyter notebook
to launch the notebooks again.
To remove your virtual environment, simply delete the Delete Virtual Environment _(Optional)_
openvino_env
directory:
On Linux and macOS:
rm -rf openvino_env
On Windows:
rmdir /s openvino_env
Remove openvino_env Kernel from Jupyter
jupyter kernelspec remove openvino_env
⚠️ Troubleshooting
If these tips do not solve your problem, please open a discussion topic or create an issue!
- To check some common installation problems, run
python check_install.py
. This script is located in the openvino_notebooks directory. Please run it after activating theopenvino_env
virtual environment. - If you get an
ImportError
, doublecheck that you installed the Jupyter kernel. If necessary, choose the openvino_env kernel from the Kernel->Change Kernel menu) in Jupyter Lab or Jupyter Notebook - If OpenVINO is installed globally, do not run installation commands in a terminal where setupvars.bat or setupvars.sh are sourced.
- For Windows installation, we recommend using Command Prompt (cmd.exe), not PowerShell.
🧑💻 Contributors
Made with contributors-img.
❓ FAQ
- Which devices does OpenVINO support?
- What is the first CPU generation you support with OpenVINO?
- Are there any success stories about deploying real-world solutions with OpenVINO?
* Other names and brands may be claimed as the property of others.