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 and
buttons can be run without installing anything.
Once you have found the tutorial of your interest, just click the button next to
its name and the Jupyter notebook will start it in a new tab of a browser.
Note
Binder and Google Colab are free online services with limited resources. For the best performance and more control, 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.
More examples along with additonal details regarding OpenVINO Notebooks are available in OpenVINO™ Notebooks Github Repository.
The Jupyter notebooks are categorized into following classes:
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. |
||
Learn OpenVINO model conversion API |
Explore more notebooks here.
Notebook |
Description |
---|---|
Convert PyTorch models to OpenVINO IR. |
|
Download, convert and benchmark models from Open Model Zoo. |
|
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 for latency mode in OpenVINO™. |
|
Performance tricks for throughput mode in OpenVINO™. |
|
Live inference of a kidney segmentation model and benchmark CT-scan data with 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. |
|
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. |
|
Convert TensorFlow Lite models to OpenVINO IR. |
|
Convert TensorFlow Object Detection models to OpenVINO IR |
|
Quantize Speech Recognition Models with accuracy control using NNCF PTQ API. |
|
Convert and Optimize YOLOv8 with OpenVINO™. |
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. |
||
Semantic segmentation with OpenVINO™ using Segmenter. |
||
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. |
||
Video Recognition using SlowFast and OpenVINO™ |
||
Answer your questions basing on a context. |
||
Grammatical error correction with OpenVINO. |
||
The attention center model with OpenVINO™ |
||
Deblur images with DeblurGAN-v2. |
||
Optimize the knowledge graph embeddings model (ConvE) with OpenVINO. |
||
Cross-lingual Books Alignment With Transformers and OpenVINO™ |
||
Real-time translation from English to German. |
||
Use pre-trained models to colorize black & white images using OpenVINO. |
||
Use pre-trained 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. |
||
Zero-shot Image Classification with OpenAI CLIP and OpenVINO™ |
||
Post-Training Quantization of OpenAI CLIP model with NNCF |
||
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™. |
||
Stable Diffusion v2.1 using Optimum-Intel OpenVINO and multiple Intel Hardware. |
||
Stable Diffusion v2.1 using Optimum-Intel OpenVINO. |
||
Stable Diffusion Text-to-Image Demo. |
||
Text-to-image generation with Stable Diffusion v2 and OpenVINO™. |
||
Prompt based object segmentation mask generation, using Segment Anything and OpenVINO™. |
||
Text-to-image generation with DeepFloyd IF and OpenVINO™. |
||
Binding multimodal data, using ImageBind and OpenVINO™. |
||
Instruction following using Databricks Dolly 2.0 and OpenVINO™. |
||
Text-to-Music generation using Riffusion and OpenVINO™. |
||
High-Quality Text-Free One-Shot Voice Conversion with FreeVC and OpenVINO™ |
||
Selfie Segmentation using TFLite and OpenVINO™. |
||
Named entity recognition with OpenVINO™. |
||
English Typo Detection in sentences with OpenVINO™. |
||
Monocular Visual-Inertial Depth Estimation with OpenVINO™. |
||
Identify the programming language used in an arbitrary code snippet. |
||
Image generation with Stable Diffusion XL and OpenVINO™. |
||
Universal segmentation with OneFormer and OpenVINO™. |
||
Controllable Music Generation with MusicGen and OpenVINO™. |
||
Image Generation with Tiny-SD and OpenVINO™. |
||
Image generation with FastComposer and OpenVINO™. |
||
Text-to video synthesis with ZeroScope 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 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 |
|
---|---|---|
Optimize YOLOv8, using NNCF PTQ API. |
||
Prompt based object segmentation mask generation, using Segment Anything 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™. |
||
Generate subtitles for video with OpenAI Whisper and OpenVINO. |
||
Perform Zero-shot image classification with CLIP and OpenVINO. |
||
Visual question answering and image captioning using BLIP and OpenVINO™. |
||
Image editing with InstructPix2Pix. |
||
Text-to-image generation with DeepFloyd IF and OpenVINO™. |
||
Binding multimodal data, using ImageBind and OpenVINO™. |
||
Instruction following using Databricks Dolly 2.0 and OpenVINO™. |
||
Image generation with Stable Diffusion XL and OpenVINO™. |
||
Controllable Music Generation with MusicGen and OpenVINO™. |
||
Image Generation with Tiny-SD and OpenVINO™. |
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.