Git Product home page Git Product logo

openvino_notebooks's Introduction

English | 简体中文

📚 OpenVINO™ Notebooks

Apache License Version 2.0 CI CI

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

-----------------------------------------------------

Table of Contents

-----------------------------------------------------

📝 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.

001-hello-world
Binder
002-openvino-api
Binder
003-hello-segmentation
Binder
004-hello-detection
Binder
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.

101-tensorflow-to-openvino
Binder
102-pytorch-onnx-to-openvino 103-paddle-onnx-to-openvino
Binder
104-model-tools
Binder
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

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

Notebook Description
101-tensorflow-to-openvino
Binder
Convert TensorFlow models to OpenVINO IR
102-pytorch-onnx-to-openvino Convert PyTorch models to OpenVINO IR
103-paddle-onnx-to-openvino
Binder
Convert PaddlePaddle models to OpenVINO IR
104-model-tools
Binder
Download, convert and benchmark models from Open Model Zoo
105-language-quantize-bert Optimize and quantize a pre-trained BERT model
106-auto-device Demonstrate how to use AUTO Device
107-speech-recognition-quantization Optimize and quantize a pre-trained Wav2Vec2 speech model
110-ct-segmentation-quantize
Quantize a kidney segmentation model and show live inference
111-detection-quantization
Binder
Quantize an object detection model
112-pytorch-post-training-quantization-nncf Use Neural Network Compression Framework (NNCF) to quantize PyTorch model in post-training mode (without model fine-tuning)
113-image-classification-quantization Quantize mobilenet image classification
114-quantization-simplified-mode Quantize Image Classification Models with POT in Simplified Mode

🎯 Model Demos

Demos that demonstrate inference on a particular model.

210-ct-scan-live-inference
Binder
211-speech-to-text
Binder
213-question-answering
Binder
208-optical-character-recognition
209-handwritten-ocr
Binder
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
handwritten_simplified_chinese_test
的人不一了是他有为在责新中任自之我们

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

Notebook Description Preview
201-vision-monodepth
Binder
Monocular depth estimation with images and video
202-vision-superresolution-image
Binder
Upscale raw images with a super resolution model
202-vision-superresolution-video
Binder
Turn 360p into 1080p video using a super resolution model
204-named-entity-recognition
Binder
Perform named entity recognition on simple text
205-vision-background-removal
Binder
Remove and replace the background in an image using salient object detection
206-vision-paddlegan-anime
Binder
Turn an image into anime using a GAN
207-vision-paddlegan-superresolution
Binder
Upscale small images with superresolution using a PaddleGAN model
208-optical-character-recognition
Annotate text on images using text recognition resnet
209-handwritten-ocr
Binder
OCR for handwritten simplified Chinese and Japanese handwritten_simplified_chinese_test
的人不一了是他有为在责新中任自之我们
210-ct-scan-live-inference
Binder
Show live inference on segmentation of CT-scan data
211-speech-to-text
Binder
Run inference on speech-to-text recognition model
212-onnx-style-transfer
Binder
Transform images to five different styles with neural style transfer
213-question-answering
Binder
Answer your questions basing on a context
214-vision-paddle-classification
Binder
PaddlePaddle Image Classification with OpenVINO
215-image-inpainting
Fill missing pixels with image in-painting
216-license-plate-recognition
Recognize Chinese license plates in traffic
217-vision-deblur
Binder
Deblur Images with DeblurGAN-v2
218-vehicle-detection-and-recognition
Use pre-trained models to detect and recognize vehicles and their attributes with OpenVINO

🏃 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.

401-object-detection-webcam
Binder
402-pose-estimation-webcam
Binder
403-action-recognition-webcam
Binder
405-paddle-ocr-webcam
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 OCR with a webcam or video file

If you run into issues, please check the troubleshooting section, FAQs or start a GitHub discussion.

Notebooks with a binder logo 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 notebook notebooks/201-vision-monodepth/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.

-----------------------------------------------------

🧹 Cleaning Up

Shut Down Jupyter Kernel

To end your Jupyter session, press Ctrl-c. This will prompt you to Shutdown this Jupyter server (y/[n])? enter y and hit Enter.

Deactivate Virtual Environment

To deactivate your virtualenv, simply run deactivate from the terminal window where you activated openvino_env. This will deactivate your environment.

To reactivate your environment, run 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.

Delete Virtual Environment _(Optional)_

To remove your virtual environment, simply delete the 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 the openvino_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.

-----------------------------------------------------

openvino_notebooks's People

Contributors

adrianboguszewski avatar alexeyhorkin avatar alexkoff88 avatar dkurt avatar dmitrymalishev avatar dongseop-kim avatar helena-intel avatar ironicbo avatar jacob27 avatar kshpv avatar ljaljushkin avatar maximproshin avatar negvet avatar nikita-savelyevv avatar noktyrn avatar openvino-dev-contest avatar paularamo avatar peterchen-intel avatar rageshhajela16 avatar raymondlo84 avatar ryanloney avatar sgolebiewski-intel avatar snyk-bot avatar thanosm97 avatar thavens avatar tomdol avatar xaenalt avatar zhuo-yoyowz avatar zrainj avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.