Skip to content

Commit fdb3a46

Browse files
authored
Merge branch 'release-2025.2' into mapping_service_helm_chart_deployment
2 parents 1896605 + 319c958 commit fdb3a46

File tree

58 files changed

+2004
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2004
-743
lines changed

autocalibration/src/auto_camera_calibration_controller.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,20 @@ def isMapProcessed(self, sceneobj):
7272
7373
@return True/False
7474
"""
75-
return (sceneobj.map_processed < datetime.fromtimestamp(os.path.getmtime(sceneobj.map),
76-
tz=timezone(TIMEZONE)))
75+
if not sceneobj.map or not getattr(sceneobj.map, 'path', None):
76+
return False
77+
78+
try:
79+
map_path = sceneobj.map.path
80+
map_mtime = datetime.fromtimestamp(os.path.getmtime(map_path), tz=timezone(TIMEZONE))
81+
except (FileNotFoundError, ValueError, TypeError) as e:
82+
log.warning(f"Map file missing or invalid for scene {sceneobj.id}: {e}")
83+
return False
84+
85+
if sceneobj.map_processed is None:
86+
return False
87+
88+
return sceneobj.map_processed < map_mtime
7789

7890
def saveToDatabase(self, scene):
7991
"""! Function stores baseapriltag data into db.

autocalibration/src/auto_camera_calibration_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from scene_common.timestamp import get_datetime_from_string
77
from scene_common.transform import CameraIntrinsics
88

9-
109
class CalibrationScene:
10+
_MEDIA_PATH = "/home/scenescape/SceneScape/media/"
1111
#FIXME: should be defined in common location accessible to both models and camcalibration
1212
DEFAULTS = {
1313
'rotation_x': 0.0,
@@ -48,15 +48,15 @@ def __init__(self, uid, name):
4848
@classmethod
4949
def deserialize(cls, data):
5050
scene = cls(data['uid'], data['name'])
51-
scene.map = "/workspace/media/" + data['map'].split('/')[-1] if 'map' in data else scene.DEFAULTS['map']
51+
scene.map = cls._MEDIA_PATH + data['map'].split('/')[-1] if 'map' in data else scene.DEFAULTS['map']
5252
scene.scale = data.get('scale', scene.DEFAULTS['scale'])
5353
scene.mesh_rotation = data.get('mesh_rotation', scene.mesh_rotation)
5454
scene.mesh_translation = data.get('mesh_translation', scene.mesh_translation)
5555
scene.mesh_scale = data.get('mesh_scale', scene.mesh_scale)
5656
scene.apriltag_size = data.get('apriltag_size', scene.DEFAULTS['apriltag_size'])
5757
scene.map_processed = get_datetime_from_string(data['map_processed']) if 'map_processed' in data else scene.DEFAULTS['map_processed']
5858
scene.camera_calibration = data.get('camera_calibration', scene.DEFAULTS['camera_calibration'])
59-
scene.polycam_data = "/workspace/media/" + data['polycam_data'].split('/')[-1] if 'polycam_data' in data else scene.DEFAULTS['polycam_data']
59+
scene.polycam_data = cls._MEDIA_PATH + data['polycam_data'].split('/')[-1] if 'polycam_data' in data else scene.DEFAULTS['polycam_data']
6060
scene.number_of_localizations = data.get('number_of_localizations', scene.DEFAULTS['number_of_localizations'])
6161
scene.global_feature = data.get('global_feature', scene.DEFAULTS['global_feature'])
6262
scene.local_feature = data.get('local_feature', scene.DEFAULTS['local_feature'])

controller/src/schema/metadata.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@
207207
},
208208
"age": {
209209
"title": "Age",
210-
"type": "integer",
210+
"type": "string",
211211
"description": "The age in years of a detection, such as the result of a DL-based age detector.",
212-
"examples": [21, 33, 65]
212+
"examples": ["21", "33", "65"]
213213
},
214214
"hat": {
215215
"title": "Hat",

dlstreamer-pipeline-server/model_config.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
"model": "intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml",
66
"model_proc": "object_detection/person/person-detection-retail-0013.json"
77
},
8-
"input-format": {
9-
"color-space": "BGR"
10-
},
118
"adapter-params": {
129
"metadatagenpolicy": "detectionPolicy"
1310
}
11+
},
12+
"reid": {
13+
"type": "inference",
14+
"params": {
15+
"model": "intel/person-reidentification-retail-0277/FP32/person-reidentification-retail-0277.xml"
16+
},
17+
"adapter-params": {
18+
"metadatagenpolicy": "reidPolicy"
19+
}
1420
}
1521
}

dlstreamer-pipeline-server/user_scripts/gvapython/sscape/sscape_policies.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ def reidPolicy(pobj, item, fw, fh):
4545

4646
def classificationPolicy(pobj, item, fw, fh):
4747
detectionPolicy(pobj, item, fw, fh)
48-
# todo: add configurable parameters(set tensor name)
49-
pobj['category'] = item['classification_layer_name:efficientnet-b0/model/head/dense/BiasAdd:0']['label']
48+
categories = {}
49+
for tensor in item.get('tensors', [{}]):
50+
name = tensor.get('name','')
51+
if name and name != 'detection':
52+
categories[name] = tensor.get('label','')
53+
pobj.update(categories)
5054
return
5155

5256
def ocrPolicy(pobj, item, fw, fh):

docs/user-guide/other-topics/how-to-configure-dlstreamer-video-pipeline.md

Lines changed: 91 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to Configure DLStreamer Video Pipeline
22

3-
## Video Pipeline Configuration in UI camera calibration page (in Kubernetes deployment)
3+
## Video Pipeline Configuration in UI Camera Calibration Page (in Kubernetes Deployment)
44

55
When Intel® SceneScape is deployed in a Kubernetes environment, you can configure DLStreamer video pipelines directly through the camera calibration web interface. This provides a user-friendly way to generate and customize GStreamer pipelines for your cameras without manually editing configuration files.
66

@@ -17,17 +17,100 @@ In Kubernetes deployments, the camera calibration form provides access to a subs
1717

1818
#### Core Pipeline Fields
1919

20-
- **Camera (Video Source)**: specifies the video source command. Supported formats:
20+
- **Camera (Video Source)**: Specifies the video source command. Supported formats:
2121
- RTSP streams: `rtsp://camera-ip:554/stream` (raw H.264).
2222
- HTTP/HTTPS streams: `http://camera-ip/mjpeg` (MJPEG).
2323
- File sources: `file://video.ts` (relative to video folder).
24-
- **Camera Chain**: defines the sequence or combination of AI models to chain together in the pipeline using their short identifiers (e.g., "retail"). Models can be chained serially (one after another) or in parallel arrangements. These identifiers are defined in the model configuration file with their detailed parameters needed for pipeline generation. The model identifier may be optionally followed by `=` and an inference device identifier, e.g., `retail=GPU` will configure the pipeline to run the model inference on GPU. If the inference device is not specified, CPU is used as the default. See [DLStreamer documentation](https://docs.openedgeplatform.intel.com/dev/edge-ai-libraries/dl-streamer/dev_guide/gpu_device_selection.html) for GPU device selection convention.
24+
- **Camera Chain**: defines the sequence or combination of AI models to chain together in the pipeline using their short identifiers (e.g., "retail"). Models can be chained serially (one after another). For details on chaining syntax, available models, and usage examples, see the [Model Chaining](#model-chaining) section below.
25+
- **Camera Pipeline**: The generated or custom GStreamer pipeline string
2526

26-
> **Note**: On systems with Intel GPU (either integrated or discrete), it is highly recommended to run both the decoding and the inference on GPU, so that other Intel® SceneScape services can fully benefit from available CPU cores.
27+
#### Model Chaining
2728

28-
> **Note**: Currently, only limited model chaining is supported. See the limitations section below.
29+
Model chaining allows you to combine multiple AI models in a single pipeline to create more sophisticated video analytics workflows. For example, you can chain a person detection model with a re-identification model to first detect people in the video and then generate unique identifiers for tracking.
2930

30-
- **Camera Pipeline**: The generated or custom GStreamer pipeline string
31+
##### Prerequisites
32+
33+
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:
34+
35+
1. Set `initModels.modelType=all` in `kubernetes/scenescape-chart/values.yaml`.
36+
2. Configure desired model precisions (e.g., `initModels.modelPrecisions=FP16`) in `kubernetes/scenescape-chart/values.yaml`.
37+
3. (Re)deploy SceneScape to download the additional models.
38+
39+
##### Chaining Syntax
40+
41+
- **Serial chaining**: Use the `+` operator to chain models sequentially (e.g., `retail+reid`).
42+
- **Device specification**: Optionally specify the inference device using `=` (e.g., `retail=GPU`). See [DLStreamer documentation](https://docs.openedgeplatform.intel.com/dev/edge-ai-libraries/dl-streamer/dev_guide/gpu_device_selection.html) for GPU device selection convention.
43+
- **Default device**: If no device is specified, CPU is used as the default.
44+
45+
> **Note**: On systems with Intel GPU (either integrated or discrete), it is highly recommended to run both the decoding and the inference on GPU, so that other Intel® SceneScape services can fully benefit from available CPU cores. GPU inference typically provides better performance for complex models.
46+
47+
**Example**: `retail=GPU+reid=GPU` runs person detection on GPU, then feeds the results to person re-identification also running on GPU.
48+
49+
##### Available Models
50+
51+
Use the following short names to refer to each model in the chain:
52+
53+
| Category | Full Model Name | Short Name | Description |
54+
| --------------------- | -------------------------------------------- | ----------- | ----------------------------------------- |
55+
| **Person Detection** | person-detection-retail-0013 | retail | General person detection |
56+
| | pedestrian-and-vehicle-detector-adas-0001 | pedveh | Pedestrian and vehicle detection |
57+
| **Person Analysis** | person-reidentification-retail-0277 | reid | Person re-identification |
58+
| | person-attributes-recognition-crossroad-0238 | personattr | Person attributes (age, gender, clothing) |
59+
| | age-gender-recognition-retail-0013 | agegender | Age and gender classification |
60+
| | human-pose-estimation-0001 | pose | Human pose estimation |
61+
| **Vehicle Detection** | vehicle-detection-0200 | veh0200 | Vehicle detection (newer model) |
62+
| | vehicle-detection-0201 | veh0201 | Vehicle detection (alternative) |
63+
| | vehicle-detection-0202 | veh0202 | Vehicle detection (alternative) |
64+
| | vehicle-detection-adas-0002 | vehadas | ADAS vehicle detection |
65+
| | person-vehicle-bike-detection-2000 | pvb2000 | Multi-class detection |
66+
| | person-vehicle-bike-detection-2001 | pvb2001 | Multi-class detection (v2) |
67+
| | person-vehicle-bike-detection-2002 | pvb2002 | Multi-class detection (v3) |
68+
| | person-vehicle-bike-detection-crossroad-0078 | pvbcross78 | Crossroad detection |
69+
| | person-vehicle-bike-detection-crossroad-1016 | pvbcross16 | Crossroad detection (v2) |
70+
| **Vehicle Analysis** | vehicle-attributes-recognition-barrier-0042 | vehattr | Vehicle attributes (color, type) |
71+
| | vehicle-license-plate-detection-barrier-0106 | platedetect | License plate detection |
72+
| **Text Analysis** | horizontal-text-detection-0001 | textdetect | Text detection |
73+
| | text-recognition-0012 | textrec | Text recognition |
74+
| | text-recognition-resnet-fc | textresnet | ResNet-based text recognition |
75+
76+
##### Common Chaining Patterns
77+
78+
**Person Analytics Workflows:**
79+
80+
```
81+
# Basic person detection with re-identification
82+
retail+reid
83+
84+
# Person detection with attributes analysis
85+
retail+personattr
86+
87+
# Person detection with age/gender classification
88+
retail=GPU+agegender=GPU
89+
90+
```
91+
92+
**Vehicle Analytics Workflows:**
93+
94+
```
95+
# Vehicle detection with re-identification
96+
veh0200=GPU+reid=GPU
97+
98+
# Vehicle detection with attributes
99+
veh0200+vehattr
100+
101+
# Vehicle detection with license plate detection
102+
veh0200+platedetect
103+
```
104+
105+
**Multi-Class Detection:**
106+
107+
```
108+
# Detect people, vehicles, and bikes
109+
pvb2000=GPU
110+
111+
# Multi-class detection with re-identification
112+
pvb2000=GPU+reid=GPU
113+
```
31114

32115
#### Advanced Configuration
33116

@@ -36,7 +119,7 @@ In Kubernetes deployments, the camera calibration form provides access to a subs
36119

37120
> **Note**: The `AUTO` setting for decode device does not assume the optimal setting in each possible case. There might be cases when the optimal configuration can be achieved by setting the decode device manually.
38121
39-
> **Note**: The Model Config field references configuration files that define AI model parameters and processing settings. See [Model Configuration File Format](model-configuration-file-format.md) for more details.
122+
> **Note**: The Model Config field references configuration files that define AI model parameters and processing settings. The default configuration file `model_config.json` is auto-generated for the models downloaded by the SceneScape model installer. See [Model Configuration File Format](model-configuration-file-format.md) for more details on the file format and when/how it should be updated.
40123
41124
#### Camera Intrinsics and Distortion
42125

@@ -101,12 +184,11 @@ After generating a pipeline preview, you can make manual adjustments:
101184

102185
### Limitations
103186

104-
- Multiple model chaining is not supported yet. Only a single detection model can be used as **Camera Chain**.
187+
- Only serial chaining of detectors with classification or re-identification models is supported in the **Camera Chain** field, where the ROI from the detection model serves as input to the classification or re-identification model in the chain. Serial chaining of two or more detectors is not supported (e.g. vehicle detector → license plate detector → OCR). Parallel inference on multiple models is not yet supported.
105188
- Distortion correction is temporarily disabled due to a bug in DLStreamer-Pipeline-Server.
106189
- Explicit frame rate and resolution configuration is not available yet.
107190
- Network instability and camera disconnects are not handled gracefully for network-based streams (RTSP/HTTP/HTTPS) and may cause the pipeline to fail.
108191
- Cross-stream batching is not supported since in Intel® SceneScape Kubernetes deployment each camera pipeline is running in a separate Pod.
109-
- The input format section in the model config JSON file is currently ignored. This results in GStreamer automatically finding the best possible input format for a model. If this is not sufficient, edit the pipeline string directly in the UI **Camera Pipeline** field to set arbitrary video formats.
110192
- Direct selection of a specific GPU as decode device on systems with multiple GPUs is not supported. As a workaround, use specific GStreamer elements in the **Camera Pipeline** field according to [DLStreamer documentation](https://docs.openedgeplatform.intel.com/dev/edge-ai-libraries/dl-streamer/dev_guide/gpu_device_selection.html).
111193

112194
### Troubleshooting

0 commit comments

Comments
 (0)