Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Model chaining allows you to combine multiple AI models in a single pipeline to

##### Prerequisites

By default, only a limited number of models is downloaded during helm chart installation, which limits the possibilities of model chaining. To enable the full set of models:
By default, only a limited number of models is downloaded during helm chart installation, which limits the possibilities of model chaining. To enable all models supported by SceneScape model installer:

1. Set `initModels.modelType=all` in `kubernetes/scenescape-chart/values.yaml`.
2. Configure desired model precisions (e.g., `initModels.modelPrecisions=FP16`) in `kubernetes/scenescape-chart/values.yaml`.
Expand All @@ -50,28 +50,14 @@ By default, only a limited number of models is downloaded during helm chart inst

Use the following short names to refer to each model in the chain:

| Category | Full Model Name | Short Name | Description |
| --------------------- | -------------------------------------------- | ----------- | ----------------------------------------- |
| **Person Detection** | person-detection-retail-0013 | retail | General person detection |
| | pedestrian-and-vehicle-detector-adas-0001 | pedveh | Pedestrian and vehicle detection |
| **Person Analysis** | person-reidentification-retail-0277 | reid | Person re-identification |
| | person-attributes-recognition-crossroad-0238 | personattr | Person attributes (age, gender, clothing) |
| | age-gender-recognition-retail-0013 | agegender | Age and gender classification |
| | human-pose-estimation-0001 | pose | Human pose estimation |
| **Vehicle Detection** | vehicle-detection-0200 | veh0200 | Vehicle detection (newer model) |
| | vehicle-detection-0201 | veh0201 | Vehicle detection (alternative) |
| | vehicle-detection-0202 | veh0202 | Vehicle detection (alternative) |
| | vehicle-detection-adas-0002 | vehadas | ADAS vehicle detection |
| | person-vehicle-bike-detection-2000 | pvb2000 | Multi-class detection |
| | person-vehicle-bike-detection-2001 | pvb2001 | Multi-class detection (v2) |
| | person-vehicle-bike-detection-2002 | pvb2002 | Multi-class detection (v3) |
| | person-vehicle-bike-detection-crossroad-0078 | pvbcross78 | Crossroad detection |
| | person-vehicle-bike-detection-crossroad-1016 | pvbcross16 | Crossroad detection (v2) |
| **Vehicle Analysis** | vehicle-attributes-recognition-barrier-0042 | vehattr | Vehicle attributes (color, type) |
| | vehicle-license-plate-detection-barrier-0106 | platedetect | License plate detection |
| **Text Analysis** | horizontal-text-detection-0001 | textdetect | Text detection |
| | text-recognition-0012 | textrec | Text recognition |
| | text-recognition-resnet-fc | textresnet | ResNet-based text recognition |
| Category | Full Model Name | Short Name | Description |
| -------------------- | -------------------------------------------- | ---------- | ----------------------------------------- |
| **Person Detection** | person-detection-retail-0013 | retail | General person detection |
| | person-vehicle-bike-detection-crossroad-1016 | pvbcross16 | Crossroad multi-class detection |
| **Person Analysis** | person-reidentification-retail-0277 | reid | Person re-identification |
| | person-attributes-recognition-crossroad-0238 | personattr | Person attributes (age, gender, clothing) |
| | age-gender-recognition-retail-0013 | agegender | Age and gender classification |
| **Vehicle Analysis** | vehicle-attributes-recognition-barrier-0042 | vehattr | Vehicle attributes (color, type) |

##### Common Chaining Patterns

Expand All @@ -93,23 +79,20 @@ retail=GPU+agegender=GPU

```
# Vehicle detection with re-identification
veh0200=GPU+reid=GPU
pvbcross16=GPU+reid=GPU

# Vehicle detection with attributes
veh0200+vehattr

# Vehicle detection with license plate detection
veh0200+platedetect
pvbcross16+vehattr
```

**Multi-Class Detection:**

```
# Detect people, vehicles, and bikes
pvb2000=GPU
pvbcross16=GPU

# Multi-class detection with re-identification
pvb2000=GPU+reid=GPU
pvbcross16=GPU+reid=GPU
```

#### Advanced Configuration
Expand Down
8 changes: 4 additions & 4 deletions model_installer/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ The models and configuration files are downloaded into a models volume that is a

Model installer can be configured to download a specific set of models using the following parameters:

| Parameter | Allowed Values | Format | Description |
| ------------ | ----------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `models` | `default`, `ocr`, `all` | Single value | Specifies which set of models to download. `default` includes person detection, re-identification, and pose estimation models. `ocr` includes text detection and recognition models. `all` downloads both default and OCR models. |
| `precisions` | `FP32`, `FP16`, `INT8` | Comma-separated list | Model precision formats to download. Multiple precisions can be specified for the same model (e.g., `FP16,FP32`). The first one will be used as preferred when generating `model-config.json` |
| Parameter | Allowed Values | Format | Description |
| ------------ | ----------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `models` | `default`, `ocr`, `all` | Single value | Specifies which set of models to download. All values currently resolve to the same supported model set for compatibility: `person-detection-retail-0013`, `person-vehicle-bike-detection-crossroad-1016`, `person-reidentification-retail-0277`, `age-gender-recognition-retail-0013`, `person-attributes-recognition-crossroad-0238`, `vehicle-attributes-recognition-barrier-0042`. |
| `precisions` | `FP32`, `FP16`, `INT8` | Comma-separated list | Model precision formats to download. Multiple precisions can be specified for the same model (e.g., `FP16,FP32`). The first one will be used as preferred when generating `model-config.json` |

For Kubernetes deployment refer to the `initModels` section in [Helm chart values](../../kubernetes/scenescape-chart/values.yaml), for example use `--set initModels.modelType=all --set initModels.modelPrecisions=FP16,FP32` when installing the Helm chart.

Expand Down
15 changes: 0 additions & 15 deletions model_installer/src/generate_model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,11 @@
_MODEL_NAME_MAP = {
# Intel models
"age-gender-recognition-retail-0013": "agegender",
"horizontal-text-detection-0001": "textdetect",
"human-pose-estimation-0001": "pose",
"pedestrian-and-vehicle-detector-adas-0001": "pedveh",
"person-attributes-recognition-crossroad-0238": "personattr",
"person-detection-retail-0013": "retail",
"person-reidentification-retail-0277": "reid",
"person-vehicle-bike-detection-2000": "pvb2000",
"person-vehicle-bike-detection-2001": "pvb2001",
"person-vehicle-bike-detection-2002": "pvb2002",
"person-vehicle-bike-detection-crossroad-0078": "pvbcross78",
"person-vehicle-bike-detection-crossroad-1016": "pvbcross16",
"text-recognition-0012": "textrec",
"vehicle-license-plate-detection-barrier-0106": "platedetect",
"vehicle-attributes-recognition-barrier-0042": "vehattr",
"vehicle-detection-0200": "veh0200",
"vehicle-detection-0201": "veh0201",
"vehicle-detection-0202": "veh0202",
"vehicle-detection-adas-0002": "vehadas",
# Public models
"text-recognition-resnet-fc": "textresnet",
}


Expand Down
37 changes: 8 additions & 29 deletions model_installer/src/install-omz-models
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,26 @@ OVMS_MODEL_DIR = os.path.join(MODEL_DIR, "ovms")
MODEL_CACHE_DIR = os.path.join(OVMS_MODEL_DIR, "cache")
OVMS_CONFIGFILE = f"{MODEL_DIR}/ovms-config.json"
OMZ_BASE_URL = "https://storage.openvinotoolkit.org/repositories/open_model_zoo/2023.0/models_bin/1"
# Special case: some public models have a different base URL
MODEL_BASE_URLS = {
"text-recognition-resnet-fc": "https://storage.openvinotoolkit.org/repositories/open_model_zoo/public/text-recognition-resnet-fc"
}
# Special case: some public models may have a different base URL
MODEL_BASE_URLS = {}
MODEL_PROC_FOLDER_URL = "https://raw.githubusercontent.com/open-edge-platform/edge-ai-libraries/refs/heads/release-2025.2.0/libraries/dl-streamer/samples/gstreamer/model_proc/intel/"

_DEFAULT_MODELS = [
'person-detection-retail-0013',
'person-vehicle-bike-detection-crossroad-1016',
'person-reidentification-retail-0277',
'human-pose-estimation-0001',
'age-gender-recognition-retail-0013',
'person-attributes-recognition-crossroad-0238',
'vehicle-attributes-recognition-barrier-0042',
]

_OCR_MODELS = [
'horizontal-text-detection-0001',
'text-recognition-resnet-fc',
'text-recognition-0012'
]
_OCR_MODELS = _DEFAULT_MODELS
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_OCR_MODELS = _DEFAULT_MODELS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file needs to be cleaned up. Lot of unused variables.


_ALL_MODELS = _DEFAULT_MODELS + _OCR_MODELS + [
'pedestrian-and-vehicle-detector-adas-0001',
'person-vehicle-bike-detection-2000',
'person-vehicle-bike-detection-2001',
'person-vehicle-bike-detection-2002',
'person-vehicle-bike-detection-crossroad-0078',
'person-vehicle-bike-detection-crossroad-1016',
'person-attributes-recognition-crossroad-0238',
'age-gender-recognition-retail-0013',
'vehicle-detection-0200',
'vehicle-detection-0201',
'vehicle-detection-0202',
'vehicle-detection-adas-0002',
'vehicle-license-plate-detection-barrier-0106',
'vehicle-attributes-recognition-barrier-0042'
]
_ALL_MODELS = _DEFAULT_MODELS

# TODO: use download_public_models.sh for downloading supported models
# see: https://github.com/open-edge-platform/edge-ai-libraries/tree/main/libraries/dl-streamer/samples
_PUBLIC_MODELS = [
# This is 1-channel model that is not supported by DLStreamer
# TODO: use ch_PP-OCRv4_rec_infer
'text-recognition-resnet-fc',
]

def _build_argparser():
Expand Down
Loading