DL Detection Sorter (f8.dl.detsorter)¶
Sort detection payloads by a score-map SHM metric.
- Service class:
f8.dl.detsorter - Version:
0.0.1 - Source directory:
f8/dl/detsorter - Tags:
vision,detection,sort,score_map
When to Use¶
- Use
f8.dl.detsorterto turn raw frame-by-frame detections into more stable ranked or identity-like output. - It is useful when the detector sees several candidates but the graph only wants one stable target or a more coherent ordering.
- It is often the next step when detector output still feels too noisy for control logic.
Common Wiring Patterns¶
- A common chain is
f8.dl.detector -> f8.dl.detsorter -> downstream logic. - If a later stage depends on continuity, sorting before tracking can improve behavior.
- Compare raw detections and sorted output side by side while tuning.
Pitfalls / Gotchas¶
- A sorter cannot fully recover from poor detector quality.
- Occlusion and frequent entry/exit events will still cause identity churn in hard scenes.
- Decide early whether you need "best current target" or "best continuity" because that affects downstream design.
Service Reference¶
How to Run¶
pixi run -e onnx f8pydl_detsorter
- Workdir:
../../../../ - Environment overrides: none
Typical Inputs / Outputs¶
- Data inputs:
detections - Data outputs:
detections,monitor - Commands: none
Service State Fields¶
| Name | Access | Required | On Node | Schema | Description |
|---|---|---|---|---|---|
clsWeights |
rw |
true |
false |
string / default={} |
JSON map of detection cls -> weight multiplier applied to score-map metric. Keys without a prefix are exact cls matches. Keys with 're:' prefix are Python regex patterns matched via fullmatch(). All matching rules are multiplied together. Unspecified classes default to weight 1.0. Example: |
scoreShmName |
rw |
true |
true |
string / default= |
Score-map SHM name (supports scalar1_f32 and flow2_f16). |
sortDirection |
rw |
true |
true |
string / enum[desc, asc] / default=desc |
Prefer larger scores first (desc) or smaller scores first (asc). |
scoreAggregation |
rw |
true |
true |
string / enum[mean, max, sum, median] / default=mean |
ROI reduction mode used to rank each bbox. |
lastError |
ro |
true |
false |
string / default= |
Last runtime error string (best-effort). |
active |
rw |
true |
false |
boolean / default=True |
Service lifecycle state (activate/deactivate). |
svcId |
ro |
true |
false |
string |
Readonly: current service instance id (svcId). |
Key Fields That Matter¶
clsWeights(Class Weights,rw): JSON map of detection cls -> weight multiplier applied to score-map metric. Keys without a prefix are exact cls matches. Keys with 're:' prefix are Python regex patterns matched via fullmatch(). All matching rules are multiplied together. Unspecified classes default to weight 1.0. Example: {"person": 2.0, "car": 0.7, "re:^dog_.*$": 1.3} Schema:string / default={}.scoreShmName(Score SHM,rw): Score-map SHM name (supports scalar1_f32 and flow2_f16). Schema:string / default=.sortDirection(Sort Direction,rw): Prefer larger scores first (desc) or smaller scores first (asc). Schema:string / enum[desc, asc] / default=desc.scoreAggregation(Score Aggregation,rw): ROI reduction mode used to rank each bbox. Schema:string / enum[mean, max, sum, median] / default=mean.lastError(Last Error,ro): Last runtime error string (best-effort). Schema:string / default=.active(Active,rw): Service lifecycle state (activate/deactivate). Schema:boolean / default=True.svcId(Service Id,ro): Readonly: current service instance id (svcId). Schema:string.
Service Commands¶
None
Service Data Input Ports¶
| Name | Required | On Node | Schema | Description |
|---|---|---|---|---|
detections |
true |
true |
object{detections, frameId, height, model, ...} |
Detection input in schema f8visionDetections/1. |
Service Data Output Ports¶
| Name | Required | On Node | Schema | Description |
|---|---|---|---|---|
detections |
true |
true |
object{detections, frameId, height, model, ...} |
Sorted detections in schema f8visionDetections/1. |
monitor |
true |
false |
object{active, alive, cpu, error, ...} |
Unified runtime monitor snapshots (health/resource/perf/error). |
Operators¶
None
Related Scenarios¶
- No bundled scenario references this node yet.