• Stars
    star
    1,120
  • Rank 40,142 (Top 0.9 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated 20 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Train, Evaluate, Optimize, Deploy Computer Vision Models via OpenVINO™

OpenVINO™ Training Extensions


Key FeaturesInstallationDocumentationLicense

PyPI

python pytorch openvino

Codecov Pre-Merge Test Nightly Test Build Docs License Downloads


Introduction

OpenVINO™ Training Extensions is a low-code transfer learning framework for Computer Vision. The CLI commands of the framework allows users to train, infer, optimize and deploy models easily and quickly even with low expertise in the deep learning field. OpenVINO™ Training Extensions offers diverse combinations of model architectures, learning methods, and task types based on PyTorch and OpenVINO™ toolkit.

OpenVINO™ Training Extensions provides a "model template" for every supported task type, which consolidates necessary information to build a model. Model templates are validated on various datasets and serve one-stop shop for obtaining the best models in general. If you are an experienced user, you can configure your own model based on torchvision, pytorchcv, mmcv and OpenVINO Model Zoo (OMZ).

Furthermore, OpenVINO™ Training Extensions provides automatic configuration of task types and hyperparameters. The framework will identify the most suitable model template based on your dataset, and choose the best hyperparameter configuration. The development team is continuously extending functionalities to make training as simple as possible so that single CLI command can obtain accurate, efficient and robust models ready to be integrated into your project.

Key Features

OpenVINO™ Training Extensions supports the following computer vision tasks:

  • Classification, including multi-class, multi-label and hierarchical image classification tasks.
  • Object detection including rotated bounding box support
  • Semantic segmentation
  • Instance segmentation including tiling algorithm support
  • Action recognition including action classification and detection
  • Anomaly recognition tasks including anomaly classification, detection and segmentation

OpenVINO™ Training Extensions supports the following learning methods:

  • Supervised, incremental training, which includes class incremental scenario and contrastive learning for classification and semantic segmentation tasks
  • Semi-supervised learning
  • Self-supervised learning

OpenVINO™ Training Extensions will provide the following features in coming releases:

  • Distributed training to accelerate the training process when you have multiple GPUs
  • Half-precision training to save GPUs memory and use larger batch sizes
  • Integrated, efficient hyper-parameter optimization module (HPO). Through dataset proxy and built-in hyper-parameter optimizer, you can get much faster hyper-parameter optimization compared to other off-the-shelf tools. The hyperparameter optimization is dynamically scheduled based on your resource budget.
  • OpenVINO™ Training Extensions uses Datumaro as the backend to hadle datasets. Thanks to that, OpenVINO™ Training Extensions supports the most common academic field dataset formats for each task. We constantly working to extend supported formats to give more freedom of datasets format choice.
  • Auto-configuration functionality. OpenVINO™ Training Extensions analyzes provided dataset and selects the proper task and model template to provide the best accuracy/speed trade-off. It will also make a random auto-split of your dataset if there is no validation set provided.

Getting Started

Installation

Please refer to the installation guide for installing it using Python venv (virtual environment), or use the following steps to run it in a containerised environment:

$ docker build \
    -t trainer \ # image tag, required
    --build-arg UBUNTU_VER=20.04 \ # default Ubunutu version, optional
    --build-arg PYTHON_VER=3.9 \ # default Python version, optional
    --build-arg SOURCE=https://download.pytorch.org/whl/cpu \ # default (CPU) deps, optional
    . # training_extensions/
$ docker run \
    -it \ # enter interactive terminal
    --rm \ # remove container after use
    -v "$(pwd)/shared:/mnt/shared:rw" \ # shared volume to host machine
    --shm-size=4g \ # increase mounted shared memory
    trainer
trainer$ otx # ... installed on Ubuntu 20.04 with /mnt/shared as shared directory

Note: Python 3.8 and 3.9 were tested, along with Ubuntu 18.04 and 20.04.

OpenVINO™ Training Extensions CLI Commands

  • otx find helps you quickly find the best pre-configured models templates as well as a list of supported backbones
  • otx build creates the workspace folder with all necessary components to start training. It can help you configure your own model with any supported backbone and even prepare a custom split for your dataset
  • otx train actually starts training on your dataset
  • otx eval runs evaluation of your trained model in PyTorch or OpenVINO™ IR format
  • otx optimize runs an optimization algorithm to quantize and prune your deep learning model with help of NNCF and POT tools.
  • otx export starts exporting your model to the OpenVINO™ IR format
  • otx deploy outputs the exported model together with the self-contained python package, a demo application to port and infer it outside of this repository.
  • otx demo allows one to apply a trained model on the custom data or the online footage from a web camera and see how it will work in a real-life scenario.
  • otx explain runs explain algorithm on the provided data and outputs images with the saliency maps to show how your model makes predictions.

You can find more details with examples in the CLI command intro.


Updates

v1.3.0 (2Q23)

  • Support direct annotation input for COCO format (#1921)
  • Action task supports multi GPU training. (#2057)
  • Support storage cache in Apache Arrow using Datumaro for action tasks (#2087)
  • Add a simplified greedy labels postprocessing for hierarchical classification (#2064).
  • Support auto adapting batch size (#2119)
  • Support auto adapting num_workers (#2165)

Release History

Please refer to the CHANGELOG.md


Branches

  • develop
    • Mainly maintained branch for developing new features for the future release
  • misc
    • Previously developed models can be found on this branch

License

OpenVINO™ Toolkit is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.


Issues / Discussions

Please use Issues tab for your bug reporting, feature requesting, or any questions.


Known limitations

misc branch contains training, evaluation, and export scripts for models based on TensorFlow and PyTorch. These scripts are not ready for production. They are exploratory and have not been validated.


More Repositories

1

openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
C++
6,042
star
2

open_model_zoo

Pre-trained Deep Learning models and demos (high quality and extremely fast)
Python
3,942
star
3

anomalib

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.
Python
3,175
star
4

openvino_notebooks

📚 Jupyter notebook tutorials for OpenVINO™
Jupyter Notebook
1,966
star
5

nncf

Neural Network Compression Framework for enhanced OpenVINO™ inference
Python
788
star
6

model_server

A scalable inference server for models optimized with OpenVINO™
C++
635
star
7

datumaro

Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.
Python
485
star
8

openvino_tensorflow

OpenVINO™ integration with TensorFlow
C++
178
star
9

openvino_contrib

Repository for OpenVINO's extra modules
C++
97
star
10

awesome-openvino

A curated list of OpenVINO based AI projects
65
star
11

geti-sdk

Software Development Kit (SDK) for the Intel® Geti™ platform for Computer Vision AI model training.
Jupyter Notebook
63
star
12

openvino.genai

Run Generative AI models using native OpenVINO C++ API
Python
60
star
13

docker_ci

The framework to generate a Dockerfile, build, test, and deploy a docker image with OpenVINO™ toolkit.
Python
57
star
14

training_toolbox_caffe

Training Toolbox for Caffe
Jupyter Notebook
49
star
15

workbench

TypeScript
28
star
16

npu_plugin

OpenVINO NPU Plugin
C++
25
star
17

model_api

C++
22
star
18

model_preparation_algorithm

Model Preparation Algorithm: a Transfer Learning Framework
Python
21
star
19

security_addon

OpenVINO™ Security Add-on to control access to inferencing models.
C
14
star
20

model_analyzer

Model Analyzer is the Network Statistic Information tool
Python
12
star
21

operator

OpenVINO operator for OpenShift and Kubernetes
Go
12
star
22

openvino_tokenizers

OpenVINO Tokenizers extension
C++
12
star
23

workbench_aux

OpenVINO™ Toolkit - Deep Learning Workbench repository Auxuliary Assets
Python
10
star
24

hyper_parameter_optimization

Python library of automatic hyper-parameter optimization
Python
6
star
25

mlas

Assembly
4
star
26

openvino_docs

OpenVINO™ Toolkit documentation repository
Python
3
star
27

npu_plugin_btc

C++
1
star
28

MLPerf

C++
1
star
29

cpu_extensions

1
star