Skip to content

Commit 0d8cb49

Browse files
authored
Update readme file (#281)
* Delete outdated information from README * Update links * Quote OTX as a models source * Update config for docs
1 parent 2294c06 commit 0d8cb49

File tree

6 files changed

+45
-74
lines changed

6 files changed

+45
-74
lines changed

README.md

Lines changed: 33 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# OpenVINO Model API
22

3-
Model API is a set of wrapper classes for particular tasks and model architectures, simplifying data preprocess and postprocess as well as routine procedures (model loading, asynchronous execution, etc.). It is aimed at simplifying end-to-end model inference for different deployment scenarious, including local execution and serving. The Model API is based on the OpenVINO inference API.
3+
Model API is a set of wrapper classes for particular tasks and model architectures, simplifying data preprocess and postprocess as well as routine procedures (model loading, asynchronous execution, etc.). It is aimed at simplifying end-to-end model inference for different deployment scenarios, including local execution and serving. The Model API is based on the OpenVINO inference API.
44

55
## How it works
66

77
Model API searches for additional information required for model inference, data, pre/postprocessing, label names, etc. directly in OpenVINO Intermediate Representation. This information is used to prepare the inference data, process and output the inference results in a human-readable format.
88

9+
Currently, ModelAPI supports models trained in [OpenVINO Training Extensions](https://github.com/openvinotoolkit/training_extensions) framework.
10+
Training Extensions embed all the metadata required for inference into model file. For models coming from other than Training Extensions frameworks metadata generation step is required before using ModelAPI.
11+
12+
## Supported model formats
13+
14+
- [OpenVINO IR](https://docs.openvino.ai/2025/documentation/openvino-ir-format.html)
15+
- [ONNX](https://onnx.ai)
16+
917
## Features
1018

1119
- Python and C++ API
12-
- Automatic prefetch of public models from [OpenVINO Model Zoo](https://github.com/openvinotoolkit/open_model_zoo) (Python only)
1320
- Synchronous and asynchronous inference
1421
- Local inference and serving through the rest API (Python only)
1522
- Model preprocessing embedding for faster inference
@@ -18,17 +25,15 @@ Model API searches for additional information required for model inference, data
1825

1926
### Python
2027

21-
- Clone this repository
22-
- Navigate to `model_api/python` folder
23-
- Run `pip install .`
28+
`pip install openvino-model-api`
2429

2530
### C++
2631

2732
- Install dependencies. For installation on Ubuntu, you can use the following script:
2833

2934
```bash
30-
chmod +x model_api/cpp/install_dependencies.sh
31-
sudo model_api/cpp/install_dependencies.sh
35+
chmod +x src/cpp/install_dependencies.sh
36+
sudo src/cpp/install_dependencies.sh
3237
```
3338

3439
- Build library:
@@ -45,44 +50,48 @@ Model API searches for additional information required for model inference, data
4550
cmake ../model_api/cpp -DOpenCV_DIR=<OpenCV cmake dir> -DOpenVINO_DIR=<OpenVINO cmake dir>
4651
```
4752

48-
- Build:
53+
`OpenCV` and `OpenVINO` locations are optional. In most cases, system these dependencies are discovered by cmake without extra guidance.
4954

50-
```bash
51-
cmake --build . -j
52-
```
55+
- Build:
5356

54-
- To build a `.tar.gz` package with the library, run:
57+
```bash
58+
cmake --build . -j
59+
```
5560

56-
```bash
57-
cmake --build . --target package -j
58-
```
61+
- To build a `.tar.gz` package with the library, run:
62+
63+
```bash
64+
cmake --build . --target package -j
65+
```
5966

6067
## Usage
6168

6269
### Python
6370

6471
```python
65-
from model_api.models import DetectionModel
72+
from model_api.models import Model
6673

67-
# Create a model (downloaded and cached automatically for OpenVINO Model Zoo models)
68-
# Use URL to work with served model, e.g. "localhost:9000/models/ssdlite_mobilenet_v2"
69-
ssd = DetectionModel.create_model("ssdlite_mobilenet_v2")
74+
# Create a model wrapper from a compatible model generated by OpenVINO Training Extensions
75+
# Use URL to work with OVMS-served model, e.g. "localhost:9000/models/ssdlite_mobilenet_v2"
76+
model = Model.create_model("model.xml")
7077

7178
# Run synchronous inference locally
72-
detections = ssd(image) # image is numpy.ndarray
79+
result = model(image) # image is numpy.ndarray
7380

74-
# Print the list of Detection objects with box coordinates, confidence and label string
75-
print(f"Detection results: {detections}")
81+
# Print results in model-specific format
82+
print(f"Inference result: {result}")
7683
```
7784

7885
### C++
7986

87+
In C++ we have to specify model type in advance, let's set it to detection model.
88+
8089
```cpp
8190
#include <models/detection_model.h>
8291
#include <models/results.h>
8392

84-
// Load the model fetched using Python API
85-
auto model = DetectionModel::create_model("~/.cache/omz/public/ssdlite_mobilenet_v2/FP16/ssdlite_mobilenet_v2.xml");
93+
// Load the model
94+
auto model = Model::create_model("model.xml");
8695

8796
// Run synchronous inference locally
8897
auto result = model->infer(image); // image is cv::Mat
@@ -125,41 +134,3 @@ auto model = DetectionModel::create_model(adapter);
125134
```
126135
127136
For more details please refer to the [examples](https://github.com/openvinotoolkit/model_api/tree/master/examples) of this project.
128-
129-
## Supported models
130-
131-
### Python
132-
133-
- Image Classification:
134-
- [OpenVINO Model Zoo models](https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/index.md#classification-models)
135-
- Object Detection:
136-
- [OpenVINO Model Zoo models](https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/index.md#object-detection-models):
137-
- SSD-based models (e.g. "ssdlite_mobilenet_v2", etc.)
138-
- YOLO-based models (e.g. "yolov3", "yolov4", etc.)
139-
- CTPN: "ctpn"
140-
- DETR: "detr-resnet50"
141-
- CenterNet: "ctdet_coco_dlav0_512"
142-
- FaceBoxes: "faceboxes-pytorch"
143-
- RetinaFace: "retinaface-resnet50-pytorch"
144-
- Ultra Lightweight Face Detection: "ultra-lightweight-face-detection-rfb-320" and "ultra-lightweight-face-detection-slim-320"
145-
- NanoDet with ShuffleNetV2: "nanodet-m-1.5x-416"
146-
- NanoDet Plus with ShuffleNetV2: "nanodet-plus-m-1.5x-416"
147-
- Semantic Segmentation:
148-
- [OpenVINO Model Zoo models](https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/index.md#semantic-segmentation-models)
149-
- Instance Segmentation:
150-
- [OpenVINO Model Zoo models](https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/index.md#instance-segmentation-models)
151-
152-
### C++
153-
154-
- Image Classification:
155-
- [OpenVINO Model Zoo models](https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/index.md#classification-models)
156-
- Object Detection:
157-
- SSD-based models (e.g. "ssdlite_mobilenet_v2", etc.)
158-
- YOLO-based models (e.g. "yolov3", "yolov4", etc.)
159-
- CenterNet: "ctdet_coco_dlav0_512"
160-
- FaceBoxes: "faceboxes-pytorch"
161-
- RetinaFace: "retinaface-resnet50-pytorch"
162-
- Semantic Segmentation:
163-
- [OpenVINO Model Zoo models](https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/index.md#semantic-segmentation-models)
164-
165-
[Model configuration](https://github.com/openvinotoolkit/model_api/blob/master/docs/model-configuration.md) discusses possible configurations.

docs/source/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
from pathlib import Path
1111

1212
# Define the path to your module using Path
13-
module_path = Path(__file__).parent.parent / "model_api" / "python"
13+
module_path = Path(__file__).parent.parent / "src" / "python"
1414

1515
# Insert the path to sys.path
1616
sys.path.insert(0, str(module_path.resolve()))
1717

18-
project = "InferenceSDK"
19-
copyright = "2024, Intel OpenVINO"
20-
author = "Intel OpenVINO"
21-
release = "2024"
18+
project = "ModelAPI"
19+
copyright = "2025, Intel"
20+
author = "Intel"
21+
release = "2025"
2222

2323
# -- General configuration ---------------------------------------------------
2424
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/source/cpp/models/anomaly_model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Anomaly Model
22

3-
The `AnomalyModel` is a generic OpenVINO model that aims to provide a single interface for all the exported models based on [Anomalib](https://github.com/openvinotoolkit/anomalib).
3+
The `AnomalyModel` is a generic OpenVINO model that aims to provide a single interface for all the exported models based on [Anomalib](https://github.com/open-edge-platform/anomalib).
44

55
Currently, the `AnomalyModel` supports the following models:
66

docs/source/python/models/anomaly.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Anomaly
22

3-
The `AnomalyModel` is a generic OpenVINO model that aims to provide a single interface for all the exported models based on [Anomalib](https://github.com/openvinotoolkit/anomalib).
3+
The `AnomalyModel` is a generic OpenVINO model that aims to provide a single interface for all the exported models based on [Anomalib](https://github.com/open-edge-platform/anomalib).
44

55
Currently, the `AnomalyModel` supports the following models:
66

src/python/docs/visual_prompting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ Decoder OV model should have the following named inputs:
5858

5959
## How to use
6060

61-
See demos: [VPT](https://github.com/openvinotoolkit/model_api/tree/master/examples/python/visual_prompting)
62-
and [ZSL-VPT](https://github.com/openvinotoolkit/model_api/tree/master/examples/python/zsl_visual_prompting)
61+
See demos: [VPT](https://github.com/open-edge-platform/model_api/tree/master/examples/python/visual_prompting)
62+
and [ZSL-VPT](https://github.com/open-edge-platform/model_api/tree/master/examples/python/zsl_visual_prompting)

src/python/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ build = [
6363
full = ["openvino_model_api[dependencies, ovms, tests, docs, build]"]
6464

6565
[project.urls]
66-
Homepage = "https://github.com/openvinotoolkit/model_api"
67-
Documentation = "https://github.com/openvinotoolkit/model_api/blob/master/README.md"
68-
Repository = "https://github.com/openvinotoolkit/model_api.git"
66+
Homepage = "https://github.com/open-edge-platform/model_api"
67+
Documentation = "https://github.com/open-edge-platform/model_api/blob/master/README.md"
68+
Repository = "https://github.com/open-edge-platform/model_api.git"
6969

7070
[tool.setuptools.packages.find]
7171
include = ["model_api*"]

0 commit comments

Comments
 (0)