TAO Data Services contains the source for data annotation, augmentation, auto-labeling, analytics, mining, image validation, and the lightweight API service used by NVIDIA TAO workflows.
This repository builds the nvidia-tao-ds Python package and the TAO Data
Services containers. The developer launcher is tao_ds; the package console
scripts run inside that container after the source tree is mounted at
/workspace.
source scripts/envsetup.sh
tao_ds --gpus all --volume /data/tao:/data
tao_ds -- make buildUse docs/index.md as the detailed source map. It links to architecture,
workflow, testing, container, and extension guides for maintainers, coding
agents, and container power users.
| Need | Document |
|---|---|
| Repository map and first-pass commands | docs/agent_onboarding.md |
| Command, config, API, and package flow | docs/architecture.md |
| Common source-change recipes | docs/development_workflows.md |
| Test selection and debugging notes | docs/testing_and_debugging.md |
| Launcher, mounts, GPU, and image details | docs/container_power_users.md |
| Adding a new data-service command | docs/new_data_service_command.md |
| Path | Purpose |
|---|---|
nvidia_tao_ds/ |
Main package for CLI subtasks, configs, shared utilities, API service, and data-service domains. |
runner/tao_ds.py |
Host-side Docker launcher used by the tao_ds shell function from scripts/envsetup.sh. |
docker/ |
Base development image Dockerfile, requirements, build script, and digest manifest. |
release/ |
Python package metadata plus release-container build scripts. |
ci/ and .gitlab-ci.yml |
Static-test helpers and merge-request pipeline wiring. |
tests/ |
Unit and integration-style tests for conversion, analytics, auto-label, mining, and config behavior. |
tao-core/, tao-pytorch/ |
In-repo submodules used by local development and container builds. |
| Software | Version |
|---|---|
| Ubuntu LTS | >=18.04 |
| Python | >=3.8.x |
| Docker CE | >19.03.5 |
| Docker API | 1.40 |
nvidia-container-toolkit |
>1.3.0-1 |
| NVIDIA container runtime | 3.4.0-1 |
nvidia-docker2 |
2.5.0-1 |
| NVIDIA driver | >525.85 |
python-pip |
>21.06 |
Minimum hardware is 8 GB system RAM, 4 GB GPU RAM, 8 CPU cores, one NVIDIA GPU, and 100 GB SSD space. Recommended hardware is 32 GB system RAM and 32 GB GPU RAM.
Generated by python tools/update_readme_supported_commands.py from
setup.py, runner/tao_ds.py, and docker/manifest.json.
scripts/envsetup.sh exports tao_ds as a shell function that runs
runner/tao_ds.py. Commands after -- execute inside the container.
| Option | Default | Purpose |
|---|---|---|
--gpus |
all |
Comma separated GPU indices to be exposed to the docker. |
--volume |
[] |
Volumes to bind. |
--env |
[] |
Environment variables to bind. |
--mounts_file |
empty string | Path to the mounts file. |
--shm_size |
16G |
Shared memory size for docker |
--run_as_user |
False |
Flag to run as user |
--tag |
None |
The tag value for the local dev docker. |
--ulimit |
None |
Docker ulimits for the host machine. |
--run_as_service |
False |
Flag to run as a microservice |
--ip |
0.0.0.0 |
Microservice ip address (e.g. 0.0.0.0). |
--port |
8000 |
Microservice port (e.g. 8000). |
--port_mapping |
8000 |
Port mapping for the micorservices port (e.g. 8000). |
--no-tty |
True |
Set TTY |
These entrypoints are installed by the nvidia-tao-ds package. Script
subtasks are discovered from each command package's scripts/ directory.
| Command | Python entry point | Script subtasks |
|---|---|---|
analytics |
nvidia_tao_ds.data_analytics.entrypoint.analytics:main |
analyzekpi_analyzevalidate |
annotations |
nvidia_tao_ds.annotations.entrypoint.annotations:main |
convertmergeqa_to_llava_annotationslicesparse4d_prepare |
augmentation |
nvidia_tao_ds.augmentation.entrypoint.augment:main |
generate |
auto_label |
nvidia_tao_ds.auto_label.entrypoint.auto_label:main |
generate |
embedding |
nvidia_tao_ds.mining.embedding.entrypoint.embedding:main |
image_embeddingstext_embeddings |
gap_analysis |
nvidia_tao_ds.rcca.gap_analysis.entrypoint.gap_analysis:main |
object_detectionvcn_aoivlm_bcq |
image |
nvidia_tao_ds.image.entrypoint.image:main |
validate |
tmm |
nvidia_tao_ds.mining.tmm.entrypoint.tmm:main |
nearest_neighborsunique_neighbor_matching |
runner/tao_ds.py and ci/utils.py resolve the immutable base image
(nvstaging/tao/data_services_base_image) from docker/manifest.json, choosing the architecture-specific
digest for the host. The pinned digests are intentionally not duplicated here — they
live in docker/manifest.json (and the CI / Jenkins / release files), and a static CI
check (ci/run_static_tests.py) verifies those digest references stay in sync.
Use annotations convert with the
unlabeled-scene spec
to create Sparse4D info PKLs from images and NVSchema camera calibration. Copy
that spec to /specs/aicity2ovpkl_unlabeled.yaml and set the ordered
aicity.class_config.CLASS_LIST to match the training model and teacher cache.
annotations convert -e /specs/aicity2ovpkl_unlabeled.yaml \
aicity.root=/data/real aicity.split=train aicity.fps=30 \
results_dir=/data/real_infosThe input layout is /data/real/train/<scene>/calibration.json plus
<camera>/rgb/000000000.jpg, 000000001.jpg, and so on. The existing
rgb_00000.jpg naming convention also works. Camera names must match calibration
IDs. Use synchronized, constant-rate frames, contiguous from zero, and provide
the actual capture rate in aicity.fps. The converter rejects empty, gapped,
or unequal camera sequences. Irregular timestamps and dropped-frame input
must be synchronized before conversion; run the 2D teacher on those same frames.
For HDF5 images, use aicity.rgb_format=h5 and <camera>.h5 files with
rgb/rgb_00000.jpg datasets containing HWC image arrays.
aicity.load_annotations=false skips ground-truth and depth loading, writes
gt_boxes=None, omits depth paths, and skips anchor initialization even when
its configured anchor count is positive. Existing anchor files are preserved;
reuse the pretrained model's anchors. The default labeled converter retains
load_annotations=true. fps also controls labeled object velocity calculation.
The unlabeled spec keeps the world frame and uses all calibrated cameras as one
group per scene. It writes /data/real_infos/train/<scene>_infos_train.pkl.
The existing camera-grouping options remain available for generating multiple
BEV groups. Keep the same container-visible image paths during training.
Generate the matching 2D caches with rtdetr_2d, put each real and 3D-labeled
PKL once in the mixed training split, and build the lazy index as described below.
annotations sparse4d_prepare creates the versioned artifacts consumed by
TAO Sparse4D. Locate the installed package's spec and select one operation
(no source checkout required). The annotations launcher requires -e, even
though the underlying Hydra script has a default:
sparse4d_spec=$(python -c 'from importlib.resources import files; print(files("nvidia_tao_ds.annotations").joinpath("experiment_specs/sparse4d_prepare.yaml"))')
annotations sparse4d_prepare \
-e "$sparse4d_spec" \
operation=lazy_index \
lazy_index.annotation_source=/data/annotations/train.txt \
results_dir=/results/sparse4d_prepareThe supported operations are:
lazy_index: build the trusted-pickle frame index and camera-count cache.ltt_2dgt: create per-sceneltt_2dgt/v1visible-box sidecars.ltt_data: extract a groupedltt_data/v2Loose-to-Tight training cache.rtdetr_2d: normalize archived KITTI RT-DETR labels toltt_rtdetr2d/v1.sv2d: create calibration-free Sparse4D PKLs and paired 2D caches from a COCO manifest.
Keep class_names identical, including order, to the TAO
dataset.classes setting. For sv2d, enable
dataset.resize_to_canonical_2d in TAO and use the same canonical height and
width; the runtime rejects mismatched cache/image dimensions. Generated PKLs
and lazy indexes contain absolute paths, so retain the same dataset mount paths
between preparation and training or rebuild them after relocation. Lazy-index
split rows are relative to the process working directory, matching the training
runtime, not relative to the split file. Symlinked mount paths are preserved.
Prefer absolute container-visible paths in split files. Duplicate PKL rows are
rejected; use the sampler's weighting configuration instead.
All operations default to overwrite=false. Existing outputs are checked
before writing the operation's artifacts, including SV2D split/weight files
and lazy-index camera counts. Set the top-level overwrite=true to opt in to
replacement (this replaces the earlier ltt_2dgt.overwrite option). Successful
CLI jobs atomically save results_dir/sparse4d_prepare_summary.json, containing
the returned artifact paths and counts. Use a new results directory for each
job, or explicitly enable overwrite when rerunning.
RT-DETR labels outside class_names must have an explicit alias in
rtdetr_2d.class_map, or map to null to be intentionally dropped. Unknown
labels fail instead of silently creating valid background frames. For example,
{Human: person, pallet: null} retains people and deliberately excludes pallets.
Scene names must not contain +, the runtime's reserved BEV-group separator.
LTT geometry requires separate camera intrinsics and rigid world-to-camera
extrinsics. Projection-only cameraMatrix calibration is rejected for
ltt_data; visible-box-only ltt_2dgt does not require metric camera geometry.
Both LTT producers use the same frame iterator: numeric ordering for per-frame
files, source ordering for monolithic JSON, ignored nonnumeric metadata keys,
and rejected duplicate normalized frame IDs. Optional streaming JSON support
does not change the selected frame subset.
The AICity converter supports the camera-discovery import layouts in
spatialai_data_utils 1.x and 2.x. Tests exercise the installed implementation
with actual directories and HDF5 files; this change does not upgrade the
data-service image's pinned dependency.
The base development image is defined by docker/Dockerfile, Python
requirements live in docker/requirements-pip.txt, and immutable image digests
live in docker/manifest.json.
source scripts/envsetup.sh
cd "$NV_TAO_DS_TOP/docker"
./build.sh --build --x86
./build.sh --build --arm
./build.sh --build --multiplatform --pushThe release image builds a wheel for nvidia_tao_ds and installs it through
release/docker/Dockerfile.release.
source scripts/envsetup.sh
cd "$NV_TAO_DS_TOP/release/docker"
./deploy.sh --build --wheelTAO Toolkit Data Services is not accepting external contributions for this release stream. Internal changes should keep generated README content in sync by running:
python tools/update_readme_supported_commands.py --checkThis project is licensed under the Apache-2.0 License.