Skip to content

Latest commit

 

History

History
 
 

102-pytorch-to-openvino

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

PyTorch to OpenVINO™ IR Tutorial

This tutorial demonstrates how to convert PyTorch models to OpenVINO Intermediate Representation (IR) format.

Notebook Contents

  • 102-pytorch-to-openvino shows how to convert the Pytorch model in formats torch.nn.Module and torch.jit.ScriptModule into OpenVINO Intermediate Representation. The tutorial uses RegNetY_800MF model from torchvision pre-trained on ImageNet dataset to demonstrate how to convert PyTorch models to OpenVINO Intermediate Representation using Model Converter. It also shows how to do classification inference on an image, using OpenVINO Runtime and compares the results of the PyTorch model with the OpenVINO IR model.

Colab classification_result

  • 102-pytorch-onnx-to-openvino shows how to convert the PyTorch model to OpenVINO IR with the intermediate step of exporting PyTorch model to ONNX format.

Binder Colab segmentation result

The notebook uses OpenVINO Model Converter (OVC) to convert the open-source Lite-RASPP semantic segmentation model with a MobileNet V3 Large backbone from torchvision, trained on COCO dataset images using 20 categories that are present in the Pascal VOC dataset, to OpenVINO IR. It also shows how to do segmentation inference on an image, using OpenVINO Runtime and compares the results of the PyTorch model with the OpenVINO IR model.

Installation Instructions

If you have not installed all required dependencies, follow the Installation Guide.