rtvi-cv-customize-model

Replace the DeepStream CV detection model in VSS Alerts Blueprint verification mode with a custom ONNX detector.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill rtvi-cv-customize-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rtvi-cv-customize-model
Source: https://github.com/NVIDIA/skills/tree/main/skills/rtvi-cv-customize-model
Command: npx skills add https://github.com/NVIDIA/skills --skill rtvi-cv-customize-model

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Swapping the stock DeepStream detector in the NVIDIA VSS Alerts Blueprint verification (2d_cv) mode involves many fragile steps — ONNX staging, custom bbox parser compilation, nvinfer configuration, runtime TensorRT engine builds, and compose mount pitfalls — where small mistakes cause silent failures like ghost directories or dlsym parser errors.

Core Features & Use Cases

  • End-to-End Model Swap Workflow: Guides ONNX staging under VSS_DATA_DIR, custom bbox parser authoring and compilation, nvinfer config (cluster-mode, parse-bbox-func-name), runtime TRT engine build via ds-start.sh, and redeployment of the perception-alerts service.
  • Troubleshooting Guidance: Covers common failures such as Docker ghost-directory mounts, dlsym parser symbol mismatches, dev-profile.sh wiping staged models, and single-GPU device reservation conflicts.
  • Segmentation Model Addendum: Defines the frame-mask contract for detection-plus-mask or instance-segmentation models before parser or handoff code is written.
  • Use Case: Replace the default GDINO/RTDETR detector with a YOLOv11 COCO ONNX model, build the TensorRT engine at container startup, and redeploy perception-alerts on a single-GPU host.

Quick Start

Ask your agent to replace the VSS Alerts Blueprint verification-mode detector with your custom ONNX model and redeploy the perception-alerts service.

Frequently Asked Questions about rtvi-cv-customize-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace the VSS Alerts Blueprint detection model with a custom ONNX model?

Stage your ONNX model under ${VSS_DATA_DIR}/models/yolo, create a custom bbox parser and nvinfer config, add a runtime TensorRT engine build block to ds-start.sh, then update compose and redeploy the perception-alerts service. The skill walks through each step using YOLOv11 COCO 80 as the worked example.

Why does DeepStream report dlsym failed for my custom bbox parser?

The parse-bbox-func-name in the nvinfer config, the extern "C" function symbol in your parser source, and the CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE macro must all match exactly. Also rebuild the .so with both DeepStream and CUDA include paths present.

Does this skill work with VSS real-time alerts (2d_vlm) mode?

No. This skill only applies to verification mode (2d_cv), which runs a DeepStream CV detector. Real-time alerts mode (2d_vlm) has no CV detector to swap, and scaffolding a new RTVI CV microservice uses a different skill.

Can I mount the ONNX file path directly in the Docker compose file?

No. If the host file does not exist yet, Docker creates a ghost directory at that path. Mount the parent directory instead, keep the ONNX under ${VSS_DATA_DIR}/models/yolo, and re-stage it after any dev-profile.sh up run that recreates the models directory.

How do I handle instance segmentation or detection-plus-mask models?

Complete the segmentation model contract reference before writing parser or handoff code. It requires declaring the frame-level mask encoding, coordinate space, overlap policy, and handoff path, since a bbox parser alone does not carry masks downstream.

Why does my customized ds-start.sh never run after redeployment?

Stock Alerts compose runs services/rtvi/rtvi-cv/ds-start.sh via an extends bind mount, not the profile init-scripts copy. You must override that bind mount in the profile compose file so your edited script is the one mounted into the container.