SigLIP 2 object embeddings
Role in VSS
The RT-CV microservice (Object Detection and Tracking) can produce object embeddings from detection crops and text embeddings from prompts using a combined CLIP-style ONNX export: vision on TensorRT, text on ONNX Runtime with tokenizer assets. Runtime INI keys and APIs are documented under ReID and Embeddings on that page.
Purpose-built model cards (inputs, outputs, licensing, integration notes) are maintained alongside NGC collaterals. For SigLIP 2, see SigLIP_2 under ngc-collaterals/multimodal/docs/purpose_built_models/ in the collaterals repo. Use those files together with the published TAO embedding guides when you need field-level model card detail.
SigLIP 2 at a glance
SigLIP 2 is a vision-language encoder that produces joint image and text embeddings for cross-modal retrieval, object search, and re-identification. The VSS 3.2.0 models section carries SigLIP 2 for RT-CV object embeddings. Variants include SO400M and giant backbones with image resolutions such as 224x224, 256x256, 384x384, and 512x512, and embedding dimensions from 768 to 1536 depending on the checkpoint. Typical TAO entry uses Hugging Face weights; model.type selects the variant (for example siglip2-so400m-patch16-256 or siglip2-giant-opt-patch16-384). See the SigLIP 2 model card and the SigLIP 2 paper.
Hardware and software requirements
Follow the TAO Toolkit Quick Start — Requirements. Use a Linux environment with a supported NVIDIA GPU stack; CLIP training and export use the same TAO Launcher pattern as other embedding models.
Dataset requirements
TAO CLIP fine-tuning expects image–text pairs. Two dataset layouts are supported in depth in the TAO docs:
Custom directory layout — Images and captions in parallel trees; each .txt caption file shares a basename with its image (images/foo.jpg ↔ captions/foo.txt). Supported image extensions include .jpg, .jpeg, .png.
WebDataset (WDS) — Sharded .tar archives with paired image and caption keys; suitable for large or cloud-hosted corpora (including S3 URLs via shard lists).
For inference-time text embedding, provide a plain-text file with one prompt per line and set inference.text_file in the experiment spec. Full layout examples and YAML snippets are in the CLIP introduction (mirrors the in-repo tlt-docs/docs/text/embedding/clip/overview.rst).
Supported model.type values (summary)
Supported model.type values (summary)
The TAO CLIP introduction documents all CLIP-family options. The table below is the VSS 3.2.0 reference for RT-CV object embeddings.
Deployment limitations (read before export)
- TensorRT deployment supports FP16 and FP32 for generated engines.
- The
siglip2-so400m-patch16-naflexvariant supports dynamic resolution in training but cannot be exported to ONNX or TensorRT in current TAO—choose a fixed-resolution SigLIP 2 variant for RT-CV deployment. attention_maskmay appear as an ONNX input for backward compatibility; behavior is documented in the CLIP introduction.
TAO fine-tuning configuration
Fine-tuning uses a YAML experiment specification file (same pattern as other TAO embedding models). The spec is organized into sections that mirror the CLIP training documentation and the in-repo sources under tlt-docs/docs/text/embedding/clip/training.rst.
Invoke tasks with:
Supported actions: train, evaluate, inference, export, and (TAO Deploy) gen_trt_engine.
An experiment specification file consists of several main components:
model— backbonetype, optionaladaptor_name, freeze flags, text canonicalizationtrain— epochs, GPUs, loss (siglip/clip), precision, optimizer (train.optim), resume pathsdataset—train/valloaders (customorwds),augmentationevaluate— checkpoint and batch size for retrieval metricsinference— image dirs,text_filefor promptsexport— ONNX path,encoder_type(combinedorseparate), input height/width, opsetgen_trt_engine— ONNX input, TRT output path, TensorRT precision and batch bounds
For field-by-field tables (defaults and valid options), use the published CLIP training page (sourced from tlt-docs).
Example experiment specification
The following example follows the TAO Launcher layout for SigLIP 2 (siglip2-so400m-patch16-256): custom image-caption dataset, combined ONNX export at 256x256, FP16 TensorRT profile. Adjust model.type and export resolution if you use another fixed-resolution SigLIP 2 checkpoint.
Launch model fine-tuning
Below are important fields to set before launching training (match paths to your dataset):
Launch training:
Evaluate the fine-tuned model
Point evaluate.checkpoint at your trained .pth (or leave unset for zero-shot pretrained evaluation per TAO docs).
Run inference (embedding extraction)
Inference writes HDF5 outputs under results_dir (image and text embeddings). Configure inference.datasets and inference.text_file as in the example spec above.
Export the fine-tuned model
Use export.encoder_type: combined for a single ONNX for RT-CV-style deployment (vision + text). Match export.input_height / input_width to the trained resolution. Export also emits _config.yaml and a tokenizer directory beside the ONNX—keep them together for TAO Deploy.
Generate a TensorRT engine (TAO Deploy)
Further export shapes, separate vision/text ONNX, tokenizer artifacts, and ONNX external-data notes are in the Exporting the Model section of the CLIP training documentation.
Integrating fine-tuned weights into RT-CV
- Export a combined image+text ONNX (and tokenizer directory) so vision and text paths stay aligned.
- Deploy artifacts beside the RT-CV container or mount them with volumes.
- In DeepStream, enable the vision encoder and text embedder blocks; set
onnx-model-pathandtokenizer-dir; rebuild the TensorRT engine for the vision branch. Keep image size, tokenizer max length, and normalization consistent with training. - Validate REST text embedding APIs, Kafka embedding dimensions, and downstream services (for example Behavior Analytics).
Changing embedding dimension or geometry usually requires re-indexing vectors and rechecking similarity thresholds—see Model customization overview.
Source material in this repo’s doc trees
The following paths (local checkouts) align with the published TAO URLs above and are useful when drafting or reviewing details:
tlt-docs/docs/text/embedding/—index.rst,clip/overview.rst,clip/training.rst,clip/applications.rstngc-collaterals/multimodal/docs/purpose_built_models/—SigLIP_2/overview.md