CV Detection Model Customization — VSS Alerts Blueprint (`2d_cv` mode only)
The RT-CV perception container (vss-rt-cv) runs a DeepStream pipeline with a configurable primary GIE (GPU Inference Engine). By default it uses GDINO or RTDETR. This guide covers replacing it with any ONNX-format model, using YOLOv11 COCO 80 as the worked example.
This only applies to --mode verification (2d_cv). Real-time alerts mode (2d_vlm) has no CV detector.
For instance-segmentation or detection-plus-mask models, complete references/segmentation-model-contract.md before writing parser or handoff code.
When to use
Use this skill when the user wants to:
- swap the stock
vss-rt-cvdetector for another ONNX model in verification mode, - debug a broken ONNX staging path, ghost-directory bind mount, or missing runtime TRT engine build,
- fix a DeepStream parser load failure such as
dlsym failedon the bbox parser symbol.
Do not use this skill for:
2d_vlmreal-time alerts mode,- scaffolding a brand-new standalone RTVI CV microservice (use
rtvi-cv-scaffold-vss-service).
Instructions
- Keep the answer scoped to VSS Alerts Blueprint verification mode (
2d_cv) unless the user explicitly asks to compare modes. - Paths beginning with
deploy/docker/are relative to the VSS Blueprint repository, not the DeepStream repository. Clone or reuse a VSS checkout that is v3.2.1 or compatible, then run these commands from that repository root (see VSS Quickstart). - If the user asks about ONNX staging or a compose mount, explicitly say that mounting a missing file path is wrong: use the stock parent-directory mount, keep the ONNX under
${VSS_DATA_DIR}/models/yolo, and re-stage the ONNX file after anydev-profile.sh upthat recreates the models directory. - If the user asks about parser load failures, line up
parse-bbox-func-name, theextern "C"function symbol, andCHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(...), then rebuild the.sowith both DeepStream and CUDA include paths present. - If the model is detection-plus-mask or instance segmentation, route the mask-contract decision first through references/segmentation-model-contract.md before editing parser or handoff logic.
Examples
- "Replace the VSS Alerts Blueprint verification detector with a YOLO11 ONNX model and redeploy
perception-alerts." - "DeepStream says
dlsym failedfor the bbox parser after loading the custom parser library. What should I check?" - "I mounted the ONNX file path directly in compose before the host file existed. Is that okay?"
Architecture
NVStreamer (RTSP) → SDR (port 9010) → DeepStream (perception-alerts)
└─ primary-gie (nvinfer)
├─ ONNX → TRT engine (built once, then cached)
├─ custom bbox parser (.so)
└─ label file (.txt)
└─ Kafka → mdx-raw
└─ vss-behavior-analytics
└─ mdx-incidents
└─ vlm-as-verifier
VSS source location
This skill is documentation-only and does not ship the VSS deployment sources. Use a VSS v3.2.1 or compatible checkout; run all paths and commands from that repository root. Clone/LFS setup, stock Alerts profile files, and the YOLOv11 customization file tree are in references/vss-source-layout.md.
Adapting to a Different Model
YOLOv11 COCO 80 is the worked example throughout all steps below. The same pattern applies to any ONNX-format detector — substitute at these points:
| Step | What to change |
|------|----------------|
| Step 1 | Replace the export procedure with whatever your model's training library requires. Confirm the resulting .onnx exists on the host before continuing. |
| Steps 2–3 | Inspect your model's actual output tensor name, shape, layout, and whether NMS is applied in-graph. Do not assume it matches YOLOv11. The deepstream-dev skill (