Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Develop] updated documents #1383

Merged
merged 7 commits into from
Nov 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
updated documents
Signed-off-by: Yunchu Lee <yunchu.lee@intel.com>
  • Loading branch information
yunchu committed Nov 21, 2022

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 6fad9f219dd472c0b35242d7c3d6918a808b16b8
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ __pycache__
.vscode/
*.iml

venv
*venv*/
env
.env
.tox
462 changes: 223 additions & 239 deletions QUICK_START_GUIDE.md

Large diffs are not rendered by default.

81 changes: 64 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,45 +5,92 @@
[![mypy](https://img.shields.io/badge/%20type_checker-mypy-%231674b1?style=flat)]()
[![openvino](https://img.shields.io/badge/openvino-2021.4-purple)]()

OpenVINO™ Training Extensions provide a convenient environment to train
Deep Learning models and convert them using the [OpenVINO™
toolkit](https://software.intel.com/en-us/openvino-toolkit) for optimized
inference.
> **_DISCLAIMERS_**: Some features described below are under development. You can find more detailed estimation from the [Roadmap](#roadmap) section below.
yunchu marked this conversation as resolved.
Show resolved Hide resolved

## Prerequisites
## Overview

- Ubuntu 18.04 / 20.04
- Python 3.8+
- [CUDA Toolkit 11.1](https://developer.nvidia.com/cuda-11.1.1-download-archive) - for training on GPU
OpenVINO™ Training Extensions (OTE) is command-line interface (CLI) framework designed for low-code deep learning model training. OTE lets developers train/inference/optimize models with a diverse combination of model architectures and learning methods using the [OpenVINO™
toolkit](https://software.intel.com/en-us/openvino-toolkit). For example, users can train a ResNet18-based SSD ([Single Shot Detection](https://arxiv.org/abs/1512.02325)) model in a semi-supervised manner without worrying about setting a configuration manually. `ote build` and `ote train` commands will automatically analyze users' dataset and do necessary tasks for training the model with best configuration. OTE provides the following features:

## Repository components
- Provide a set of pre-configured models for quick start
- `ote find` helps you quickly finds the best pre-configured models for common task types like classification, detection, segmentation, and anomaly analysis.
- Configure and train a model from torchvision, [OpenVINO Model Zoo (OMZ)](https://github.com/openvinotoolkit/open_model_zoo)
- `ote build` can help you configure your own model based on torchvision and OpenVINO Model Zoo models. You can replace backbones, necks and heads for your own preference (Currently only backbones are supported).
- Provide several learning methods including supervised, semi-supervised, imbalanced-learn, class-incremental, self-supervised representation learning
- `ote build` helps you automatically identify the best learning methods for your data and model. All you need to do is to set your data in the supported format. If you don't specify a model, the framework will automatically sets the best model for you. For example, if your dataset has long-tailed and partially-annotated bounding box annotations, OTE auto-configurator will choose a semi-supervised imbalanced-learning method and an appropriate model with the best parameters.
- Integrated efficient hyper-parameter optimization
- OTE has an integrated, efficient hyper-parameter optimization module. So, you don't need to worry about searching right hyper-parameters. 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.
- Support widely-used annotation formats
- OTE uses [datumaro](https://github.com/openvinotoolkit/datumaro), which is designed for dataset building and transformation, as a default interface for dataset management. All supported formats by datumaro are also consumable by OTE without the need of explicit data conversion. If you want to build your own custom dataset format, you can do this via datumaro CLI and API.
sungmanc marked this conversation as resolved.
Show resolved Hide resolved

- [OTE SDK](ote_sdk)
- [OTE CLI](ote_cli)
- [OTE Algorithms](external)
---

## Roadmap

### v0.4.0 (4Q22)

- New algorithms

### v1.0.0 (1Q22)

- Installation through PyPI
- Package will be renamed as OTX (OpenVINO Training eXtension)
- CLI update
- Update `find` command to find configurations of tasks/algorithms
- Introduce `build` command to customize task or model configurations
- Automatic algorihm selection for the `train` command using the given input dataset
- Adaptation of [Datumaro](https://github.com/openvinotoolkit/datumaro) component as a dataset interface

### v1.1.0 (2Q22)

- Structural update
- Integrate hyper-parameter optimizations

---

## Repository

- Components
- [OTE SDK](ote_sdk)
- [OTE CLI](ote_cli)
- [OTE Algorithms](external)
- Branches
- [develop](https://github.com/openvinotoolkit/training_extensions/tree/develop)
- Mainly maintained branch for releasing new features in the future
- [misc](https://github.com/openvinotoolkit/training_extensions/tree/misc)
- Previously developed models can be found on this branch

---

## Quick start guide

In order to get started with OpenVINO™ Training Extensions see [the quick-start guide](QUICK_START_GUIDE.md).

## GitHub Repository

The project files can be found in [OpenVINO™ Training Extensions](https://github.com/openvinotoolkit/training_extensions).
Previously developed models can be found on the [misc branch](https://github.com/openvinotoolkit/training_extensions/tree/misc).
---

## License

Deep Learning Deployment Toolkit is licensed under [Apache License Version 2.0](LICENSE).
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](https://github.com/openvinotoolkit/training_extensions/issues/new/choose) tab for your bug reporting, feature requesting, or any questions.

---

## Contributing

Please read the [Contribution guide](CONTRIBUTING.md) before starting work on a pull request.

---

## Known limitations

Training, export, and evaluation scripts for TensorFlow- and most PyTorch-based models from the [misc](#misc) branch are, currently, not production-ready. They serve exploratory purposes and are not validated.
Training, export, and evaluation scripts for TensorFlow- and most PyTorch-based models from the [misc](https://github.com/openvinotoolkit/training_extensions/tree/misc) branch are, currently, not production-ready. They serve exploratory purposes and are not validated.

---

yunchu marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 10 additions & 1 deletion ote_cli/ote_cli/tools/demo.py
Original file line number Diff line number Diff line change
@@ -50,6 +50,15 @@ def parse_args():

pre_parser = argparse.ArgumentParser(add_help=False)
pre_parser.add_argument("template")
# WA: added all available args to correctly parsing "template" positional arg
# to get the available hyper-parameters
pre_parser.add_argument("-i", "--input")
pre_parser.add_argument("--load-weights")
pre_parser.add_argument("--fit-to-size")
pre_parser.add_argument("--loop")
pre_parser.add_argument("--delay")
pre_parser.add_argument("--display-perf")

parsed, _ = pre_parser.parse_known_args()
# Load template.yaml file.
template = find_and_parse_model_template(parsed.template)
@@ -68,7 +77,7 @@ def parse_args():
parser.add_argument(
"--load-weights",
required=True,
help="Load only weights from previously saved checkpoint",
help="Load weights to run the evaluation. It could be a trained/optimized model or exported model.",
)
parser.add_argument(
"--fit-to-size",
2 changes: 1 addition & 1 deletion ote_cli/ote_cli/tools/deploy.py
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ def parse_args():
parser.add_argument(
"--load-weights",
required=True,
help="Load only weights from previously saved checkpoint.",
help="Load model's weights from.",
)
parser.add_argument(
"--save-model-to",
9 changes: 8 additions & 1 deletion ote_cli/ote_cli/tools/eval.py
Original file line number Diff line number Diff line change
@@ -44,6 +44,13 @@ def parse_args():

pre_parser = argparse.ArgumentParser(add_help=False)
pre_parser.add_argument("template")
# WA: added all available args to correctly parsing "template" positional arg
# to get the available hyper-parameters
pre_parser.add_argument("--test-ann-files")
pre_parser.add_argument("--test-data-roots")
pre_parser.add_argument("--load-weights")
pre_parser.add_argument("--save-performance")

parsed, _ = pre_parser.parse_known_args()
# Load template.yaml file.
template = find_and_parse_model_template(parsed.template)
@@ -66,7 +73,7 @@ def parse_args():
parser.add_argument(
"--load-weights",
required=True,
help="Load only weights from previously saved checkpoint",
help="Load weights to run the evaluation. It could be a trained/optimized model or exported model.",
)
parser.add_argument(
"--save-performance",
2 changes: 1 addition & 1 deletion ote_cli/ote_cli/tools/export.py
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ def parse_args():
parser.add_argument(
"--load-weights",
required=True,
help="Load only weights from previously saved checkpoint",
help="Load weights from saved checkpoint for exporting",
)
parser.add_argument(
"--save-model-to",
12 changes: 11 additions & 1 deletion ote_cli/ote_cli/tools/optimize.py
Original file line number Diff line number Diff line change
@@ -47,6 +47,16 @@ def parse_args():

pre_parser = argparse.ArgumentParser(add_help=False)
pre_parser.add_argument("template")
# WA: added all available args to correctly parsing "template" positional arg
# to get the available hyper-parameters
pre_parser.add_argument("--train-ann-files")
pre_parser.add_argument("--train-data-roots")
pre_parser.add_argument("--val-ann-files")
pre_parser.add_argument("--val-data-roots")
pre_parser.add_argument("--load-weights")
pre_parser.add_argument("--save-model-to")
pre_parser.add_argument("--save-performance")

parsed, _ = pre_parser.parse_known_args()
# Load template.yaml file.
template = find_and_parse_model_template(parsed.template)
@@ -79,7 +89,7 @@ def parse_args():
parser.add_argument(
"--load-weights",
required=True,
help="Load weights of trained model",
help="Load weights of trained model (for NNCF) or exported OpenVINO model (for POT)",
)
parser.add_argument(
"--save-model-to",
11 changes: 11 additions & 0 deletions ote_cli/ote_cli/tools/train.py
Original file line number Diff line number Diff line change
@@ -54,6 +54,17 @@ def parse_args():

pre_parser = argparse.ArgumentParser(add_help=False)
pre_parser.add_argument("template")
# WA: added all available args to correctly parsing "template" positional arg
# to get the available hyper-parameters
pre_parser.add_argument("--train-ann-files")
pre_parser.add_argument("--train-data-roots")
pre_parser.add_argument("--val-ann-files")
pre_parser.add_argument("--val-data-roots")
pre_parser.add_argument("--load-weights")
pre_parser.add_argument("--save-model-to")
pre_parser.add_argument("--enable-hpo")
pre_parser.add_argument("--hpo-time-ratio")

parsed, _ = pre_parser.parse_known_args()
# Load template.yaml file.
template = find_and_parse_model_template(parsed.template)