Interactive Tutorials (Python)¶
This collection of Python tutorials are written for running on Jupyter notebooks. The tutorials provide an introduction to the OpenVINO™ toolkit and explain how to use the Python API and tools for optimized deep learning inference. You can run the code one section at a time to see how to integrate your application with OpenVINO libraries.
Notebooks with a button can be run without installing anything. Once you have found the tutorial of your interest, just click the button next to the name of it and Binder will start it in a new tab of a browser. Binder is a free online service with limited resources (for more information about it, see the Additional Resources section).
Note
For the best performance, more control and resources, you should run the notebooks locally. Follow the Installation Guide in order to get information on how to run and manage the notebooks on your machine.
Contents:
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 with OpenVINO¶
Brief tutorials that demonstrate how to use Python API for inference in OpenVINO.
Notebook |
Description |
Preview |
---|---|---|
Classify an image with OpenVINO. |
||
Learn the OpenVINO Python API. |
||
Semantic segmentation with OpenVINO. |
||
Text detection with OpenVINO. |
Convert & Optimize¶
Tutorials that explain how to optimize and quantize models with OpenVINO tools.
Notebook |
Description |
Preview |
---|---|---|
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. |
Explore more notebooks here.
Notebook |
Description |
---|---|
Optimize and quantize a pre-trained BERT model |
|
Demonstrates how to use AUTO Device |
|
Optimize and quantize a pre-trained Data2Vec speech model |
|
Optimize and quantize a pre-trained Wav2Vec2 speech model |
|
Working with GPUs in OpenVINO™ |
|
Performance tricks in OpenVINO™ |
|
Quantize a kidney segmentation model and show live inference |
|
Migrate YOLOv5 POT API based quantization pipeline on Neural Network Compression Framework (NNCF) |
|
Use Neural Network Compression Framework (NNCF) to quantize PyTorch model in post-training mode (without model fine-tuning) |
|
Quantize mobilenet image classification |
|
Quantize Image Classification Models with POT in Simplified Mode |
|
Use Asynchronous Execution to Improve Data Pipelining |
|
Improve performance of sparse Transformer models |
|
Improve performance of sparse Transformer models |
|
Improve performance of image preprocessing step |
Model Demos¶
Demos that demonstrate inference on a particular model.
Notebook |
Description |
Preview |
---|---|---|
Remove and replace the background in an image using salient object detection. |
||
OCR for handwritten simplified Chinese and Japanese. |
||
Run inference on speech-to-text recognition model. |
||
Fill missing pixels with image in-painting. |
||
Use pre-trained models to detect and recognize vehicles and their attributes with OpenVINO. |
Explore more notebooks below.
Notebook |
Description |
Preview |
---|---|---|
Monocular depth estimation with images and video. |
||
Upscale raw images with a super resolution model. |
||
Turn 360p into 1080p video using a super resolution model. |
||
PaddlePaddle pre-trained models to read industrial meter’s value |
||
Turn an image into anime using a GAN. |
||
Upscale small images with superresolution using a PaddleGAN model. |
||
Annotate text on images using text recognition resnet. |
||
Run inference on speaker diarization pipeline |
||
Answer your questions basing on a context. |
||
Grammatical Error Correction with OpenVINO |
||
Deblur Images with DeblurGAN-v2. |
||
Optimize the knowledge graph embeddings model (ConvE) with OpenVINO |
||
Quantize the Ultralytics YOLOv5 model and check accuracy using the OpenVINO POT API |
||
Real-time translation from English to German |
||
Use pre-trained models to colorize black & white images using OpenVINO |
||
Use pretrained models to perform text prediction on an input sequence |
||
Process point cloud data and run 3D Part Segmentation with OpenVINO |
||
Text-to-image generation with Stable Diffusion method |
||
Optimize YOLOv7 using NNCF PTQ API |
||
Generate subtitles for video with OpenAI Whisper and OpenVINO |
||
Perform Zero-shot Image Classification with CLIP and OpenVINO |
||
Sequence Classification with OpenVINO |
||
Optimize YOLOv8 using NNCF PTQ API |
||
Image editing with InstructPix2Pix |
||
Language-Visual Saliency with CLIP and OpenVINO™ |
||
Visual Question Answering and Image Captioning using BLIP and OpenVINO™ |
||
Audio compression with EnCodec and OpenVINO™ |
||
A Text-to-Image Generation with ControlNet Conditioning and OpenVINO™ |
||
Text-to-Image Generation and Infinite Zoom with Stable Diffusion v2 and OpenVINO™ |
||
Prompt based object segmentation mask generation using Segment Anything and OpenVINO™ |
Model Training¶
Tutorials that include code to train neural networks.
Notebook |
Description |
Preview |
---|---|---|
Train a flower classification model from TensorFlow, then convert to OpenVINO IR. |
||
Use Post-training Optimization Tool (POT) to quantize the flowers model. |
||
Use Neural Network Compression Framework (NNCF) to quantize PyTorch model. |
||
Use Neural Network Compression Framework (NNCF) to quantize TensorFlow model. |
Live Demos¶
Live inference demos that run on a webcam or video files.
Notebook |
Description |
Preview |
---|---|---|
Object detection with a webcam or video file. |
||
Human pose estimation with a webcam or video file. |
||
Human action recognition with a webcam or video file. |
||
Style Transfer with a webcam or video file |
||
OCR with a webcam or video file |
||
3D display of human pose estimation with a webcam or video file |
||
Person tracking with a webcam or video file |
Recommended Tutorials¶
The following tutorials are guaranteed to provide a great experience with inference in OpenVINO:
Notebook |
Preview |
|
---|---|---|
Monocular depth estimation with images and video. |
||
Remove and replace the background in an image using salient object detection. |
||
Object detection with a webcam or video file. |
||
Human pose estimation with a webcam or video file. |
||
Human action recognition with a webcam or video file. |
Note
If there are any issues while running the notebooks, refer to the Troubleshooting and FAQ sections in the Installation Guide or start a GitHub discussion.