[ITEP-84873] Example pipelines for reid with additional attributes in metadata#985
[ITEP-84873] Example pipelines for reid with additional attributes in metadata#985jakubsikorski wants to merge 25 commits intomainfrom
Conversation
|
|
||
| **Pipeline:** | ||
| ```bash | ||
| multifilesrc loop=TRUE location=/home/pipeline-server/videos/qcam1.ts name=source ! decodebin3 ! video/x-raw ! gvapython class=PostDecodeTimestampCapture function=processFrame module=/home/pipeline-server/user_scripts/gvapython/sscape/sscape_adapter.py name=timesync ! gvadetect scheduling-policy=latency batch-size=1 inference-interval=1 model=/home/pipeline-server/models/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml model_proc=/home/pipeline-server/models/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.json device=CPU inference-region=0 ! queue ! gvaclassify scheduling-policy=latency batch-size=1 inference-interval=1 model=/home/pipeline-server/models/intel/person-attributes-recognition-crossroad-0238/FP32/person-attributes-recognition-crossroad-0238.xml model_proc=/home/pipeline-server/models/intel/person-attributes-recognition-crossroad-0238/FP32/person-attributes-recognition-crossroad-0238.json device=CPU inference-region=1 ! queue ! gvametaconvert add-tensor-data=true name=metaconvert ! videoconvert ! video/x-raw,format=BGR ! gvapython class=PostInferenceDataPublish function=processFrame module=/home/pipeline-server/user_scripts/gvapython/sscape/sscape_adapter.py name=datapublisher ! appsink sync=true |
There was a problem hiding this comment.
Could we have one where we do the following chain:
retail->age-gender->person attributes->reid
and make sure all of them make it through in the scenescape object json.
There was a problem hiding this comment.
This is not urgent but needed for next iteration in 2026.1:
We only pass on the confidence of the first object detection model. We currently discard the confidence of all other models. We need the confidence of all other models pass through as well into the sscape_object.
There was a problem hiding this comment.
Could we have one where we do the following chain:
retail->age-gender->person attributes->reid
Added a pipeline that does all of them, with example output, the metadata contains:
- age
- gender
- gender: clothing
- reid entry
We need the confidence of all other models pass through as well into the sscape_object
I have updated the classificationPolicy of the adapter to preserve the confidence of all models, it will be available in the metadata as <modelName>_model_confidence
67a9148 to
27235a5
Compare
| }, | ||
| "age": "39", | ||
| "gender": "Male", | ||
| "gender_model_confidence": 0.8637242317199707, |
There was a problem hiding this comment.
A flattened structure of metadata will create association issues. Unless I am aware downstream of what model was used, I have no way to connect the different outputs with the confidence info.
Let's discuss how to represent confidence for each metadata in a way that enables easy association and processing.
There was a problem hiding this comment.
The metadata is no longer flattened - each entry now includes its label, confidence (when available), and model name in a structured format.
In this format the association is clear as each metadata entry is self contained.
As for the model names - unfortunately this is all I see in the raw output from DLSPS, perhaps this is something we could request from the DLS(PS) team - to provide more descriptive model names in the metadata.
I have already implemented the changes to the code in this commit 53b0a31.
An example structure will look like this:
{
"id": "atag-qcam1",
"debug_mac": "41:65:97:c3:5a:e0",
"timestamp": "2026-02-10T12:09:19.470Z",
"debug_timestamp_end": "2026-02-10T12:09:21.931Z",
"debug_processing_time": 2.460519552230835,
"rate": 6.604081651768196,
"objects": {
"person": [
{
"category": "person",
"confidence": 0.997582197189331,
"center_of_mass": {
"x": 527,
"y": 125,
"width": 67.0,
"height": 106.75
},
"bounding_box_px": {
"x": 460,
"y": 20,
"width": 201,
"height": 427
},
"metadata": {
"age": {
"label": "35",
"model": "age_gender"
},
"gender": {
"label": "Male",
"confidence": 0.9521394968032837,
"model": "age_gender"
},
"person-attributes": {
"label": "M: has_longpants",
"confidence": 0.9166854619979858,
"model": "torch-jit-export"
},
"reid": {
"embedding": "VpGuPujDML4O5oa/UxDLvbXp1z7Cn06+Bg8/PsN7Fr6yQSS7Kzujvnvwwb0uRTs+Bc3pPYzbWT8RRxY/3+2XvhARqj5shhA/W9MUv71bcT19jYc+2/GBPkWnrL4aeoG9rN7svo5cuL0WfyY+EuLtvdEqCr8tdOY+R7XWvq4COD+cOTW/h0xdP96UcD/PmtC+BeIwvyDcR758tEc/3wqGvo71Dr34vZO+UlCePZHFWj4UO3G+/2unvoiuAz+uIhC/9D3yvGx8G7/JDvS8hx6aO4oRUrwZRXC+joaePnBdVr5gido9ofFxPpkqmD+7po0+F3+HvhWBLT64bJk+7lP3PujXFr6jaBc+I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.
I like the new structure, it's self descriptive and easy to parse.
Once we agree on it, we'll need to update controller/src/schema/metadata.schema.json.
tdorauintc
left a comment
There was a problem hiding this comment.
Since OMZ models are deprecated, the DLS team will propose a new set of public models soon (this is work in progress), for ReID too. Let's hope DLS metadata format does not depend on specific models.
Long term it would be best to establish a contract or schema guaranteed for DLS metadata format, otherwise our adapter might break in future if DLS implementation changes it for some reason.
| }, | ||
| "age": "39", | ||
| "gender": "Male", | ||
| "gender_model_confidence": 0.8637242317199707, |
There was a problem hiding this comment.
I like the new structure, it's self descriptive and easy to parse.
Once we agree on it, we'll need to update controller/src/schema/metadata.schema.json.
📝 Description
Adds a document that includes examplepipelines for ReID with metadata (both raw and scenescape) showing the attributes each pipeline generates.
Contains code changes required to preserve the metadata along with ReID entry.
ITEP-84873
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
✅ Checklist
Before submitting the PR, ensure the following: