Tao Train Fast Foundation Stereo
NVIDIAOfficialCreated by NVIDIA Corporation
- Skill
- Tool integration
- Data and AI
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The tao-train-fast-foundation-stereo skill enables users to work with the FastFoundationStereo (FFS) model, a distilled variant of FoundationStereo designed for stereo depth estimation. It integrates with the TAO depth_net CLI to support the full model lifecycle, including training, evaluation, export, and inference. The skill provides specific configuration requirements for model architecture parameters and dataset handling to ensure compatibility with the bp2 commercial checkpoint.
What it does
- Supports training and fine-tuning of FastFoundationStereo models.
- Facilitates model evaluation using standard stereo depth metrics.
- Enables export of models to TensorRT engines for deployment.
- Provides inference capabilities for generating disparity maps from stereo image pairs.
- Includes AutoML support for optimizing training hyperparameters.
- Manages configuration templates for consistent model deployment.
When to use it
- When you need to train or fine-tune a FastFoundationStereo model on custom stereo datasets.
- When evaluating the performance of a FastFoundationStereo model using ground truth disparity data.
- When deploying a pre-trained bp2 commercial checkpoint for real-time inference.
- When converting a FastFoundationStereo model to a TensorRT engine for optimized execution.
Advantages
- Provides a unified CLI interface for the entire model development lifecycle.
- Includes specific configuration overrides to ensure compatibility with bp2 commercial checkpoints.
- Supports both raw deployment and fine-tuning workflows.
- Integrates with TAO AutoML for hyperparameter optimization.
Usage examples
- “Train a FastFoundationStereo model using my custom dataset.”
- The agent will guide you through setting up the spec file with the required model width overrides and launching the training job via the depth_net CLI.
- “Export my FastFoundationStereo model to a TensorRT engine.”
- The agent will assist in configuring the export action and generating the optimized TensorRT engine for deployment.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/tao-train-fast-foundation-stereo/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-train-fast-foundation-stereo.zip -d .agents/skills
Documentation by NVIDIA Corporation
Depth Net Fast Stereo
Standalone install? If this session was not initialized by the TAO skill bank plugin, run the
tao-setupskill first (host preflight, credentials, cross-skill discovery).
Real-time stereo depth estimation using FastFoundationStereo (FFS) — the bp2 commercial distilled variant of FoundationStereo. Predicts disparity maps from rectified stereo image pairs with per-layer pruned widths for real-time inference.
The mono / stereo / fast-stereo skills share the unified TAO depth_net CLI; FFS is selected via model.model_type: FastFoundationStereo. FFS differs from FoundationStereo only in pruned per-layer widths and a serialized forward path; everything else (entrypoint, action verbs, dataset classes, deploy chain) is identical to depth-net-stereo.
For TAO Deploy TensorRT actions (gen_trt_engine, TensorRT evaluate, TensorRT inference), read references/tao-deploy-fast-foundation-stereo.md first. The deploy spec template lives at references/spec_template_deploy.yaml.
When to Use
Use this skill to train, evaluate, export, or run inference for a TAO FastFoundationStereo model. Two supported use cases:
FFS raw-deploy and bp2-finetune flows require a pre-trained bp2 commercial checkpoint (model_best_bp2_serialize.pth). The default PyT image does not guarantee that this file is present on disk, so treat the checkpoint path as a required user/registry artifact. If no bp2 checkpoint is available, scratch training is still usable for workflow validation, but the resulting metrics are not representative of the bp2 model.
Raw deploy — use the bp2 ckpt as-is. Skip
train; runinference/evaluate/export/gen_trt_enginedirectly with the bp2 file as the action's checkpoint.Finetune on user data — set
train.pretrained_model_pathto the bp2 file, train on user data, then verify + deploy on the resulting ckpt. The full 7-action sequence (train → evaluate pyt → inference pyt → export → gen_trt_engine → inference deploy → evaluate deploy) is supported.
Train Action Policy
This model is AutoML-enabled at the model layer. Before handling any train-stage request, read references/skill_info.yaml and resolve the run override from either an explicit automl_policy value or the user's workflow request. Use automl_policy: on by default and only expose on / off in new launch prompts. Treat phrases like "turn off AutoML", "disable AutoML", "no HPO", or "plain training" as automl_policy: off for this run only. When automl_policy: on, automl_enabled: true, and both schemas/train.schema.json and references/spec_template_train.yaml are packaged, route the train action through tao-skill-bank:tao-run-automl by default with this model's skill_dir. Preserve workflow/application overrides for datasets, specs, output directories, GPU/platform settings, parent checkpoints, and automl_policy. Use direct model training only when automl_policy: off or the packaged train schema/template is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.
FFS shares the depth_net_stereo schema but its bp2 architecture widths are fixed invariants. For default AutoML, search only train.optim.lr and train.optim.lr_decay unless the user explicitly requests a wider search. Do not include FFS architecture fields such as model.volume_dim, model.hidden_dims, or other bp2 width settings in the default search space.
Non-train actions such as evaluate, inference, export, and deploy flows stay in this model skill. The per-run automl_policy override does not change model metadata.
Workflow
Prerequisites — data accessibility
Your dataset (left + right images + GT disparity for train / evaluate, left + right only for inference) must be reachable from inside the container:
SDK runner: place files at the S3 paths the runner resolves (
S3_TRAIN/S3_EVALplaceholders shown in spec overrides).Direct
docker run(e.g. local testing): mount the host dataset root read-only at the same in-container path:
docker run ... -v <host_data_root>:<host_data_root>:ro <container> ...The same accessibility requirement applies to the <output_dir> written by all actions, and to the bp2 checkpoint path.
Step 1 — Annotation file
Per-line annotation file referenced by data_sources[*].data_file. Schema is identical to depth-net-stereo:
| Columns | Format | Use |
|---|---|---|
| 2 | <left> <right> | Stereo inference (no GT) |
| 3 | <left> <right> <disparity> | Stereo with GT |
| 4 | <left> <right> <disparity> <occlusion_mask> | Stereo with GT and occlusion mask |
Generate via depth_net convert if needed; see the depth-net-stereo skill for convert_spec.yaml template.
Step 2 — Pair model_type and dataset_name based on your data
Use model_type: FastFoundationStereo for FFS. The dataset_name choice mirrors the stereo skill — pick the dataset-specific class when your layout matches a registered one, otherwise GenericDataset.
| Data category | model_type | dataset_name |
|---|---|---|
| Middlebury | FastFoundationStereo | Middlebury |
| KITTI | FastFoundationStereo | Kitti |
| ETH3D | FastFoundationStereo | Eth3d |
| FSD synthetic | FastFoundationStereo | FSD |
| IsaacReal synthetic | FastFoundationStereo | IsaacRealDataset |
| Crestereo synthetic | FastFoundationStereo | Crestereo |
| Other / non-canonical | FastFoundationStereo | GenericDataset |
For inference with 2-column annotations (left + right, no GT), use dataset_name: GenericDataset regardless of layout.
Step 3 — Set the bp2 distilled width overrides
FFS requires 15 model-section width override fields whose values match the bp2 commercial checkpoint exactly. Omitting any field falls back to TAO defaults that do not match the bp2 ckpt and produce shape-mismatch errors at forward time. See references/setup-and-run.md for the full copy-as-is model: block and notes. The spec templates at references/spec_template_*.yaml carry this block as the canonical source.
Step 4 — Write spec yaml from spec overrides
Copy the action block from references/spec-overrides.md. Replace:
model.model_type: FastFoundationStereo(already set)dataset.<...>.data_sources[*].dataset_namefrom Step 2dataset.<...>.data_sources[*].data_filewith the path from Step 1For raw deploy use cases (no train): set
<action>.checkpointto the bp2 file pathFor finetune use cases: set
train.pretrained_model_pathto the bp2 file path
For chained train → next-action checkpoint path resolution and shape-consistency notes, see references/setup-and-run.md. SDK-runner deploys resolve handoff automatically via parent_job_id — see references/parent-model-inference.md.
Step 5 — Run
Create writable home/cache directories inside the mounted output path before using --user, then launch docker run ... depth_net <action> -e <spec.yaml>. See references/setup-and-run.md for the full mkdir + docker run command, the --user rationale, and the local bind-mount __pycache__ tip.
Step 6 — Verify
Check container exit code 0 and a populated status.json kpi block. For train inspect per-step train_loss directly (the entrypoint reports Execution status: PASS even when loss is NaN); for evaluate rely on epe / bp1 / bp2 / bp3 / d1 / rmse; for inference check artifacts under results_dir. The pyt-vs-deploy KPI namespace difference and the expected deploy drift are detailed in references/setup-and-run.md.
7-action deploy flow
train (optional) → finetuned ckpt
evaluate (pyt) → PyT eager EPE / bp on val GT
inference (pyt) → PyT eager disparity samples (visual sanity)
export → static fp32 ONNX (recommended at 480×736 or 320×736)
gen_trt_engine → fp16 TRT engine on static ONNX path
inference (deploy) → TRT disparity samples
evaluate (deploy) → TRT EPE / bp drift vs PyT eager fp32Skip train for raw-bp2 deploy. The remaining 6 actions (or the 4 deploy-only verbs starting from export) cover both use cases.
Training Requirements
Valid
dataset_namevalues for stereodata_sources(case-insensitive):FSD,IsaacRealDataset,Crestereo,Middlebury,Eth3d,Kitti,GenericDatasetMonitoring metric: val/loss
Per-Action Dataset Requirements
| Action | Spec Key | Source | Files | List? |
|---|---|---|---|---|
| evaluate | dataset.test_dataset.data_sources | eval_dataset | data_file: annotations.txt + dataset_name | Yes |
| inference | dataset.infer_dataset.data_sources | inference_dataset | data_file: annotations.txt + dataset_name | Yes |
| train | dataset.train_dataset.data_sources | train_datasets | data_file: annotations.txt + dataset_name | Yes |
| train | dataset.val_dataset.data_sources | eval_dataset | data_file: annotations.txt + dataset_name | Yes |
Typical Spec Overrides
Data source overrides are mandatory for every action. Each data_sources entry is a dict with two mandatory fields: data_file and dataset_name. The model.* width fields are also mandatory — see Step 3. See references/spec-overrides.md for the FFS_MODEL_BLOCK and per-action (train / evaluate / inference / export) Python override dicts.
Eval Dataset
Optional. Val dataset configured via dataset.val_dataset.data_sources (each entry needs data_file and dataset_name).
Important Parameters
Key knobs include model.model_type (FastFoundationStereo), model.encoder (vitl), model.max_disparity (set 192 explicitly — schema default 416 causes severe drift), model.mixed_precision (false), model.gwc_feature_normalize (true), model.volume_dim (28), model.valid_iters (8), and per-split batch_size / workers / crop_size / data_sources. Full parameter reference, evaluation metrics, multi-GPU / multi-node spec keys, export / TRT defaults, the export use-case matrix, and hardware guidance are in references/important-parameters.md.
Error Patterns
For shape mismatch, gwc_feature_normalize schema errors, max_disparity drift, negative disparity, depth_net_stereo: not found, the pyt-evaluate crop_size asymmetry, the Failed to import SAM3 warning, and the dynamic-engine stride-incompatible silent failure, see references/error-patterns.md.
Spec Param / Parent Model Inference
Model-specific inference mappings (per-action spec field → inference function) for train / evaluate / inference / export / gen_trt_engine, plus parent_job_id / parent_model resolution and raw-bp2 explicit-checkpoint handling, are in references/parent-model-inference.md. Generated runners should read that section and apply the mappings with SDK helpers before create_job().
Deployment
Files
- ATTRIBUTION.mdAdded by AutoGineer966 B
- BENCHMARK.md7.3 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md11.6 KiB
- config/skillspector-baseline.yaml1.0 KiB
- evals/evals.json839 B
- references/error-patterns.md3.2 KiB
- references/important-parameters.md7.3 KiB
- references/parent-model-inference.md3.0 KiB
- references/setup-and-run.md5.5 KiB
- references/skill_info.yaml4.4 KiB
- references/spec-overrides.md3.4 KiB
- references/spec_template_deploy.yaml2.7 KiB
- references/spec_template_evaluate.yaml1.8 KiB
- references/spec_template_export.yaml1.8 KiB
- references/spec_template_inference.yaml1.8 KiB
- references/spec_template_train.yaml2.6 KiB
- references/tao-deploy-fast-foundation-stereo.md19.3 KiB
- references/tao-deploy-fast-foundation-stereo.skill_info.yaml3.7 KiB
- schemas/train.schema.json99.2 KiB
- skill-card.md4.7 KiB
- skill.oms.sig8.2 KiB
references/tao-deploy-fast-foundation-stereo.md
DepthNet Fast Stereo Deploy
DepthNet Fast Stereo deploy covers the TAO Deploy actions for an exported FFS (FastFoundationStereo) ONNX. Use the depth-net-fast-stereo model skill for training, checkpoint evaluation, export, or non-TensorRT (pyt) inference. Use this deploy workflow after export when the input artifact is an ONNX model and the desired output is a TensorRT engine or TensorRT-backed predictions.
Supported actions: gen_trt_engine, evaluate, inference.
Direct TAO Deploy command name: depth_net.
Quick Start
Set the deploy container once at the top of the session — every command below uses it:
TAO_DEPLOY_IMAGE=nvcr.io/nvidia/tao/tao-toolkit:7.3.0-deploy # versions-key: images.tao_toolkit.deployGenerate TensorRT Engine
docker run --gpus all --rm --shm-size=16g \
-v /path/to/specs:/specs \
-v /path/to/export:/models \
-v /path/to/results:/results \
"$TAO_DEPLOY_IMAGE" \
depth_net gen_trt_engine -e /specs/gen_trt_engine.yamlEvaluate TensorRT Engine
docker run --gpus all --rm --shm-size=16g \
-v /path/to/specs:/specs \
-v /path/to/eval:/data \
-v /path/to/results:/results \
"$TAO_DEPLOY_IMAGE" \
depth_net evaluate -e /specs/evaluate.yamlTensorRT Inference
docker run --gpus all --rm --shm-size=16g \
-v /path/to/specs:/specs \
-v /path/to/inference:/data \
-v /path/to/results:/results \
"$TAO_DEPLOY_IMAGE" \
depth_net inference -e /specs/inference.yamlDeploy action metadata is in tao-deploy-fast-foundation-stereo.skill_info.yaml. Deploy spec template lives at spec_template_deploy.yaml.
Deploy Workflow
Train (optional) and export with the
depth-net-fast-stereoskill. For the raw-bp2 use case, skip train and export directly from the bp2 ckpt.Keep the exported ONNX artifact and any sidecar files together in the mounted model directory.
Build the TensorRT engine with this workflow.
Run TensorRT
evaluateorinferencefrom the engine artifact produced bygen_trt_engine.
Direct TAO Launcher spelling is tao deploy depth_net gen_trt_engine, tao deploy depth_net evaluate, tao deploy depth_net inference.
Required Inputs
| Action | Required artifact or data | Spec key |
|---|---|---|
gen_trt_engine | Exported FFS ONNX model | gen_trt_engine.onnx_file |
evaluate | TensorRT engine | evaluate.trt_engine |
evaluate | Stereo annotation file (3-col with GT, 4-col adds occlusion mask) | dataset.test_dataset.data_sources[0].data_file |
inference | TensorRT engine | inference.trt_engine |
inference | Stereo annotation file (2-col left+right, no GT) | dataset.infer_dataset.data_sources[0].data_file |
gen_trt_engine.trt_engine is the generated engine output path, not a required input artifact. For direct Docker runs, mount input folders at the same paths used in the spec. For chained jobs, map exported ONNX artifacts into gen_trt_engine.onnx_file and map the engine artifact into evaluate.trt_engine or inference.trt_engine.
Spec Template
Fast Stereo deploy supports one model (FastFoundationStereo). Copy spec_template_deploy.yaml as a starting point and override only paths and environment-specific values (data_file, results_dir, trt_engine paths, batch size as needed).
Adjustments by use case:
Inference (no GT) — set
dataset.infer_dataset.data_sources[0].dataset_nametoGenericDataset(the default in the template). Use a 2-column annotation file (left + right).Evaluate / Inference with GT — pick a dataset-specific class (
Middlebury,Kitti,Eth3d,FSD,IsaacRealDataset,Crestereo) when GT or occlusion-mask handling matches. Use a 3-column annotation (or 4-column withnoccmask).Variable-aspect input — pad each input to the nearest stride-32 multiple at preprocess and feed the dynamic-shape engine at the padded H × W. Do not rely on
evaluate.native_padded: True— it currently triggers a TRT 10.13 Cask Pooling Runner failure (see Common errors).Shape consistency — match
dataset.test_dataset.augmentation.crop_sizetoevaluate.input_height/input_widthand to the export-time ONNX shape for fixed-shape engines (see "Shape consistency" below).
Common:
The TAO Deploy command is
depth_netfor mono, stereo, and fast-stereo skills. Themodel.model_typefield discriminates between them.Recommended TRT precision for FFS-bp2:
gen_trt_engine.tensorrt.data_type: fp16on the static-shape ONNX path (static-shape deploy below). The dynamic-shape engine path supports bothfp16andfp32— see the deployment matrix below for the trade-off.
Two deploy paths
Static-shape deploy — export static fp32 ONNX, build fp16 engine
Recommended path for FFS-bp2 deploy. Static fp16 has the lowest deploy-time disparity drift vs upstream.
# export spec — produced via depth_net export
export:
checkpoint: <bp2 ckpt path or finetuned ckpt>
onnx_file: <out.onnx>
input_height: 480
input_width: 736
opset_version: 17
batch_size: 1 # static
on_cpu: False# gen_trt_engine spec
gen_trt_engine:
onnx_file: <out.onnx from above>
trt_engine: <out engine>
batch_size: 1
tensorrt:
data_type: fp16 # static-shape FFS supports fp16
workspace_size: 4 # DepthNet deploy passes this through as GiB in current images
min_batch_size: 1
opt_batch_size: 1
max_batch_size: 1
evaluate:
trt_engine: <built engine>
input_height: 480
input_width: 736
model:
model_type: FastFoundationStereo
dataset:
test_dataset:
augmentation:
crop_size: [480, 736]The fp16 selection at TRT compile is what gives FFS its real-time deploy latency. The pyt model itself trained with mixed_precision: false (or upstream's bf16) — gen_trt_engine.tensorrt.data_type: fp16 is the compile-time switch.
Dynamic-shape deploy (fp32 or fp16)
export:
batch_size: -1 # dynamic batch axis
dynamic_hw: true # dynamic H/W axes (FFS only; FS/mono ignored with warning)
input_height: 320
input_width: 736
gen_trt_engine:
onnx_file: <user dynamic ONNX>
trt_engine: <out engine>
batch_size: -1
min_height: 320
opt_height: 480
max_height: 1024 # ≥ tallest expected input (see "Sizing the profile" below)
min_width: 320
opt_width: 736
max_width: 1536 # ≥ widest expected input
tensorrt:
data_type: fp32 # fp32 default; fp16 also supported (see deployment matrix)
workspace_size: 4
evaluate:
trt_engine: <built engine>
# Do NOT enable evaluate.native_padded with a TRT 10.13 dynamic engine —
# see "Common errors → native_padded with dynamic engine triggers Cask
# Pooling Runner failure" below.fp32 is the default for the dynamic-shape engine (matches static-fp32 parity vs upstream). fp16 on the dynamic-shape engine is supported but has higher drift than static fp16 — use it for latency-critical multi-resolution inference where the drift is acceptable for the downstream task.
Sizing the profile (min/opt/max_height, min/opt/max_width)
max_height and max_width must each be ≥ the largest input you intend to inference at. If max_width is smaller than your widest input, the engine rejects the input at runtime with a satisfyProfile error. Recommended starting point for variable-aspect inputs:
min_height: 320,min_width: 320(smallest crop you'll allow at preprocess)opt_height: 480,opt_width: 736(typical inference shape — TRT optimises for this)max_height: 1024,max_width: 1536(covers most variable-aspect datasets with ~30 % headroom)
Then ensure each input is padded / resized to a multiple of 32 in both dimensions — see "Common errors → Dynamic engine inference shape mismatch" for the stride-32 + stride-4 divisibility rule.
Pyt-vs-deploy parity (FastFoundationStereo bp2)
If you benchmark TAO FFS bp2 deploy (gen_trt_engine + TRT evaluate) against the upstream FFS native deploy path on the same input, expect a small residual mean_abs disparity drift. The TAO output is close to but not byte-equivalent with the upstream Fast-FoundationStereo make_single_onnx.py deploy path because the TAO export graph topology and TRT 10.13 optimiser interact differently than the upstream graph.
The drift magnitude depends on:
Source image resolution — lower-resolution sources amplify fp32-precision differences after resize-to-engine-shape because the cost-volume softmax peak is softer. For reproducible comparison across runs, hold the source resolution constant.
TRT precision — fp16 is noisier than fp32; dynamic-shape engines are noisier than static at the same precision.
Hardware / TRT version — same TRT version on both sides reduces cross-version contribution.
Validate the drift on your own dataset and decide whether it is acceptable for your downstream task. The residual is not improvable at the TAO source-code level.
Recommended deployment paths
| Use case | Recommended path | Notes |
|---|---|---|
| Real-time fp16 fixed-resolution | static H/W + fp16 | Lowest deploy-side latency. Build via depth_net gen_trt_engine (static-shape deploy). |
| Variable-aspect input + fixed resolution batch | static H/W + fp16 + per-image resize at preprocess | Caller resizes incoming frames to the engine's H×W, then rescales disparity by the per-image scale factor. |
| Multiple input resolutions (no preprocess resize) | dynamic H/W + fp32 | Matches static-fp32 parity vs upstream. Build via depth_net gen_trt_engine with min/opt/max_height + min/opt/max_width under gen_trt_engine:. |
| Multiple input resolutions + fp16 (latency-critical) | dynamic H/W + fp16, with caveat | Higher drift than static fp16 due to TRT dynamic-shape inherent noise. Engine may produce NaN under some checkpoint states. Acceptable for many downstream tasks; for per-pixel metric disparity prefer static. |
Implication for fp16 deploy
If your application requires fp16 (latency budget) AND multi-resolution input, two options:
Static fp16 engine + per-image preprocess resize — lowest drift; caller resizes each input to the engine H×W and rescales disparity by the per-image scale factor.
Dynamic H/W fp16 engine — accepts variable resolutions natively (drift higher than static fp16; engine may produce NaN under some checkpoint states — fall back to dynamic fp32 if NaN observed).
Note — drift floor is FFS-specific
This drift behaviour is specific to the FastFoundationStereo bp2 model: its
combination of EdgeNeXt encoder + cost-volume + GRU update path interacts
with the TAO export graph and TRT 10.13 in a way that produces this floor.
Other depth-net stereo / mono models (e.g. FoundationStereo, full-FS
variants) may exhibit different drift characteristics and should be
characterised independently.
Troubleshooting — Upstream reference generation
When generating the upstream reference disparity (for an apples-to-apples
drift comparison) by running upstream Fast-FoundationStereo/scripts/make_single_onnx.py
on the bp2 checkpoint, the script raises:
omegaconf.errors.ConfigAttributeError: Missing key normalize
full_key: normalizeCause: the bp2 commercial checkpoint's sidecar cfg.yaml does not
include the normalize knob that upstream's forward() reads. The
upstream code path defaults to normalize=True for the GWC volume
when the knob is absent, but OmegaConf strict-key resolution rejects
the lookup before the default kicks in.
Workaround — set the knob explicitly after torch.load(), before
make_single_onnx.py runs the trace:
import torch
m = torch.load('/path/to/model_best_bp2_serialize.pth', map_location='cpu', weights_only=False)
if 'normalize' not in m.args:
m.args.normalize = True # matches upstream pre-bp2 default
# then proceed with make_single_onnx.py logicThis matches what TAO's gwc_feature_normalize: true model knob does on
the deploy-skill side; both routes should produce the same upstream
reference numbers.
Shape consistency: export ↔ evaluate ↔ deploy
The TRT engine is built from an ONNX file that fixes the input height and width at export time (export.input_height, export.input_width). The pyt-side evaluator and the deploy-side TRT evaluator must operate at the same shape to produce comparable disparity values, since disparity is in pixel units and scales with image width.
| Knob | Where | Recommended convention |
|---|---|---|
export.input_height, export.input_width | export action spec | the (height, width) the engine will see at inference time |
dataset.test_dataset.augmentation.crop_size | pyt evaluate spec | match [input_height, input_width] exactly |
dataset.test_dataset.augmentation.crop_size | deploy evaluate spec | match the engine input shape |
Mismatched shapes yield a measurable EPE drift between pyt and deploy paths. Pick one shape (e.g., [480, 736]) and use it across export, pyt eval, and deploy eval — or use the dynamic-shape engine and pre-pad each input to a stride-32 multiple within the engine's min/opt/max profile (avoid native_padded on TRT 10.13 — see Common errors).
Spec filename invariant
The spec yaml's basename (modulo .yaml) must match the action verb passed on the command line. For example, gen_trt_engine requires the spec at a path ending in gen_trt_engine.yaml; evaluate requires evaluate.yaml. Mismatched filenames produce a non-obvious FileNotFoundError from the hydra config loader before any action work begins.
TRT engine build time
gen_trt_engine for FFS at static [1, 3, 480, 736] typically completes in a few minutes on x86 with a single A100 / L40 (faster than full FoundationStereo at the same shape due to FFS's pruned width). Plan the deploy chain accordingly; the build is one-time per (shape, precision) tuple.
Common errors
Engine profile mismatch: Runtime batch size for evaluate or inference must fit within the TensorRT min/opt/max profile used during gen_trt_engine. Default profile in the spec template is min=1 / opt=1 / max=1 (FFS-bp2 deploy uses static batch=1).
Deploy evaluate metric reduction fails after predictions: In
tao-toolkit-deploy:7.0.0-rc-171, FFS TensorRT evaluate can complete
prediction generation and then fail in
nvidia_tao_deploy.cv.depth_net.evaluation.stereo_evaluator.compute() with
TypeError: only 0-dimensional arrays can be converted to Python scalars. The
evaluator accumulates NumPy one-element arrays and casts them with float(),
which is rejected by the NumPy version in the container. Until the deploy image
contains the scalar extraction fix, use PyT evaluate for metrics and treat TRT
inference plus generated predictions as the deploy smoke test.
Aspect-stretched predictions on variable-aspect inputs: Forcing the engine input H/W to a fixed shape distorts samples whose source aspect ratio differs from the engine shape, inflating EPE vs pyt baseline. Recommended approach: dynamic-shape engine sized per "Sizing the profile" above, with each input pre-padded / resized to a stride-32 multiple before evaluation. evaluate.native_padded: True would conceptually fit this case but currently triggers a TRT 10.13 Cask Pooling Runner failure — see below.
Stereo inference 2-col GenericDataset: 2-column (left + right, no GT) annotation with dataset_name: GenericDataset is the supported inference path. Dataset-specific classes require 3-column input.
Mounted paths do not exist: TAO Deploy checks local paths inside the container. Make sure every path in the spec has a matching Docker mount or job artifact mapping (including the bp2 ckpt path, when present).
Drift higher than expected — diagnostic checklist: If your measured drift vs upstream looks unreasonably large for your task, check:
Source image resolution — lower-resolution sources amplify drift because the cost-volume softmax peak is softer and amplifies fp32-precision differences between TAO and upstream engines after resize-to-engine-shape. Hold source resolution constant when comparing across runs.
Input resize parity — your preprocessing resize order / interpolation must match upstream's, or drift amplifies for reasons unrelated to TAO.
model.max_disparityexplicit — if the spec yaml'smodel:block omitsmax_disparity: 192, OmegaConf falls back to the schema default of416, which builds a 2× oversized cost volume and shifts disparity out of the trained regime. See the main skill's "Important Parameters" entry.
fp16 dynamic-shape engine produces NaN or aspect-stretched bad disparity: fp16 dynamic-shape is supported but more sensitive than static fp16. NaN can occur under some checkpoint states. If observed, fall back to static-shape fp16 or dynamic-shape fp32 — both are robust.
Key 'gwc_feature_normalize' not in 'DepthNetModelConfig': TAO Core too old. The gwc_feature_normalize knob lives on the model config schema and is required for FFS-bp2; upgrade your TAO container.
native_padded: True triggers Cask Pooling Runner failure on TRT 10.13 dynamic engine (silent corruption): With evaluate.native_padded: True and a dynamic-shape engine, the action exits 0 and status.json reports "finished successfully", but the per-image logs show Cask Pooling Runner Execute Failure on every batch and the EPE values are inflated by orders of magnitude — the disparity tensor is silently corrupted. This is a TRT 10.13 behaviour, not a skill-side configuration issue.
Mitigation:
Set
evaluate.native_padded: False(or omit it; default is False).Pad / resize each input to the engine's
optShapesH × W (or to the nearest stride-32 multiple within themin/opt/maxprofile) at preprocess time. Track the per-image scale factor and rescale the disparity output in pixels.Static engines built at the exact target H × W are unaffected; the failure is specific to dynamic-shape
native_paddedinteraction.
Dynamic engine inference shape mismatch (silent failure): The TRT engine raises axis 2 dimensions must be equal: <X> != <Y> (e.g., 127 != 128) at the /feature/deconv8_4/Concat layer, the inference action exits with code 0, status.json reports "finished successfully", but predicted_depth/ is empty. This means the input image H × W did not satisfy both stride constraints required by the FFS architecture: H and W must each be divisible by 32 (encoder downsample) AND by 4 (cost-volume downsample). Many original-resolution inputs of variable-aspect public stereo datasets violate the stride-32 constraint.
Pick one of:
Preprocess resize the input to the nearest multiple of 32 in both dimensions before inference. The disparity output will be at the resized H×W; rescale by
orig_W / resized_Wto recover original-resolution disparity if needed.Static engine at the exact target H × W (build with
export.input_height/export.input_widthmatching your input). No runtime divisibility surprises.Dynamic engine with
optShapesmatching the typical input and pad the actual input to the nearest stride-32 boundary. Setcrop_sizeandevaluate.input_height/widthconsistently.
The status.json "finished successfully" is misleading here: it reflects the entrypoint's exit, not whether any disparity was produced. Always check predicted_depth/ is non-empty as a deploy success signal until the status.json schema captures the per-image result.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs a command-line tool, Needs Node.js
The author says: Requires docker + nvidia-container-toolkit.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Corporation
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/tao-train-fast-foundation-stereo · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-train-fast-foundation-stereo.zip