Tao Train Mask Grounding Dino
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
This skill provides an interface for training, evaluating, exporting, quantizing, and running inference with Mask Grounding DINO models. It extends the base Grounding DINO architecture by incorporating a mask-prediction head, enabling open-vocabulary instance segmentation guided by text prompts. The skill integrates with TAO workflows, supporting AutoML for training and providing paths for TensorRT deployment.
What it does
- Trains Mask Grounding DINO models using text-prompted instance segmentation.
- Supports AutoML-enabled training to optimize model performance.
- Evaluates model checkpoints using COCO-format annotations.
- Exports models to ONNX format for deployment.
- Quantizes models for optimized inference.
- Facilitates TensorRT engine generation and deployment.
When to use it
- When performing open-set instance segmentation tasks guided by text prompts.
- When you need to train or fine-tune a Mask Grounding DINO model.
- When preparing a model for deployment on NVIDIA hardware via TensorRT.
- When you require automated hyperparameter optimization for training.
Advantages
- Enables open-vocabulary segmentation capabilities.
- Integrates directly with TAO Toolkit workflows.
- Supports both standard training and AutoML-driven optimization.
- Provides clear paths for model export and TensorRT engine generation.
Usage examples
- “Train a Mask Grounding DINO model using my dataset.”
- The agent initiates a training job using the specified dataset paths and model configuration, optionally leveraging AutoML.
- “Evaluate my trained Mask Grounding DINO checkpoint.”
- The agent runs an evaluation job against the provided test dataset and reports metrics like mAP50.
- “Export my Mask Grounding DINO model to ONNX.”
- The agent converts the PyTorch checkpoint into an ONNX model file suitable for further deployment.
- “Generate a TensorRT engine for my exported model.”
- The agent uses the ONNX model to build a TensorRT engine optimized for inference.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/tao-train-mask-grounding-dino/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-train-mask-grounding-dino.zip -d .agents/skills
Documentation by NVIDIA Corporation
Mask Grounding DINO
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).
Mask Grounding DINO for grounded instance segmentation. Extends Grounding DINO with mask prediction head for open-set segmentation guided by text prompts.
Set train.pretrained_model_path for full model weights.
For TAO Deploy TensorRT actions (gen_trt_engine, TensorRT evaluate, and TensorRT inference), read references/tao-deploy-mask-grounding-dino.md first. Deploy spec templates live in this skill's references/ folder with the spec_template_deploy_*.yaml prefix.
Dataclass Schemas
Generated TAO Core schemas are packaged in schemas/<action>.schema.json, with schemas/manifest.json listing available actions. Each generated schema also emits references/spec_template_<action>.yaml from the schema top-level default field. AutoML enablement is declared at the model layer in references/skill_info.yaml via automl_enabled. Runnable AutoML for an action requires schemas/<action>.schema.json and references/spec_template_<action>.yaml to exist and parse. Use the packaged selected-action schema for automl_default_parameters, automl_disabled_parameters, defaults, min/max bounds, enums, option weights, math conditions, dependencies, and popular parameters. Do not expect ~/tao-core at runtime; maintainers regenerate schemas/templates before packaging the skill bank.
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.
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.
Training Requirements
Dataset type: segmentation
Formats: odvg, coco, coco_raw
Monitoring metric: val_loss
AutoML metric contract: Use
val_lossemitted during training and minimize it. Standalone evaluation metrics are checkpoint-validation KPIs, not the recommendation-selection objective.Evaluation checkpoint metrics:
[segm] test_mAP50and[bbox] test_mAP50when the checkpoint produces class predictions. A very short smoke-trained checkpoint can complete evaluation successfully with an empty KPI dictionary; verify the evaluation action and result artifact in that case. Train-stage AutoML selection remains based onval_loss.
Per-Action Dataset Requirements
| Action | Spec Key | Source | Files | List? |
|---|---|---|---|---|
| evaluate | dataset.test_data_sources | eval_dataset | image_dir: images.tar.gz, json_file: annotations.json | No |
| evaluate | dataset.test_data_sources.data_type | eval_dataset | OD | No |
| inference | dataset.infer_data_sources | inference_dataset | image_dir: images.tar.gz, captions: text prompts | No |
| inference | dataset.infer_data_sources.data_type | inference_dataset | OD | No |
| quantize | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations_odvg.jsonl, label_map: annotations_odvg_labelmap.json | Yes |
| quantize | dataset.val_data_sources | eval_dataset | image_dir: images.tar.gz, json_file: annotations.json | No |
| quantize | dataset.val_data_sources.data_type | eval_dataset | OD | No |
| quantize | dataset.quant_calibration_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations_odvg.jsonl, label_map: annotations_odvg_labelmap.json | No |
| train | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations_odvg.jsonl, label_map: annotations_odvg_labelmap.json | Yes |
| train | dataset.val_data_sources | eval_dataset | image_dir: images.tar.gz, json_file: annotations.json | No |
| train | dataset.val_data_sources.data_type | eval_dataset | OD | No |
Typical Spec Overrides
Data source overrides are mandatory for every action — the agent MUST construct data source paths from the Per-Action Dataset Requirements table above and include them in spec_overrides.
S3_TRAIN = "s3://bucket/data/train"
S3_EVAL = "s3://bucket/data/eval"train (mandatory data sources):
{
"train.num_gpus": 1,
"train.num_epochs": 10,
"train.checkpoint_interval": 10,
"train.validation_interval": 10,
"dataset.val_data_sources.data_type": "OD",
"model.num_region_queries": 100,
"dataset.train_data_sources": [{"image_dir": f"{S3_TRAIN}/images.tar.gz", "json_file": f"{S3_TRAIN}/annotations_odvg.jsonl", "label_map": f"{S3_TRAIN}/annotations_odvg_labelmap.json"}],
"dataset.val_data_sources": {"image_dir": f"{S3_EVAL}/images.tar.gz", "json_file": f"{S3_EVAL}/annotations.json"},
}evaluate (mandatory data sources):
{
"evaluate.checkpoint": "<selected train/AutoML checkpoint>",
"dataset.test_data_sources.data_type": "OD",
"dataset.test_data_sources": {"image_dir": f"{S3_EVAL}/images.tar.gz", "json_file": f"{S3_EVAL}/annotations.json"},
}inference (mandatory data sources):
{
"inference.checkpoint": "<selected train/AutoML checkpoint>",
"dataset.infer_data_sources.data_type": "OD",
"dataset.infer_data_sources": {"image_dir": f"{S3_EVAL}/images.tar.gz", "captions": ["person", "bicycle", "car"]},
}quantize (mandatory data sources):
{
"dataset.train_data_sources": [{"image_dir": f"{S3_TRAIN}/images.tar.gz", "json_file": f"{S3_TRAIN}/annotations_odvg.jsonl", "label_map": f"{S3_TRAIN}/annotations_odvg_labelmap.json"}],
"dataset.val_data_sources": {"image_dir": f"{S3_EVAL}/images.tar.gz", "json_file": f"{S3_EVAL}/annotations.json"},
"dataset.quant_calibration_data_sources": {"image_dir": f"{S3_TRAIN}/images.tar.gz", "json_file": f"{S3_TRAIN}/annotations_odvg.jsonl", "label_map": f"{S3_TRAIN}/annotations_odvg_labelmap.json"},
}Eval Dataset
Optional. Validation uses COCO-format annotations even when training uses ODVG.
Important Parameters
model.backbone: Default swin_tiny_224_1k. Same backbone options as Grounding DINO.
train.optim.lr: Learning rate. Default 2e-4. lr_backbone 2e-5. Reuses GDINOTrainExpConfig — same training setup as Grounding DINO.
model.num_queries: Object queries. Default 900.
model.enc_layers / model.dec_layers: Keep both at 6 for train/AutoML runs. The mask head asserts six decoder outputs during validation, so copying Grounding DINO smoke overrides that reduce transformer layers causes an immediate failure.
AutoML metric note: Use
metric="val_loss"withdirection="minimize"for train-stage AutoML. The packaged train loop logs validation loss scalars; it does not emit[bbox] val_mAP@50during the train job. Standalone evaluation emits[segm] test_mAP50and[bbox] test_mAP50only when predictions survive its thresholds; do not substitute either conditional test metric for the training loss used to rank AutoML recommendations.model.has_mask: Enables mask prediction head. Default True. Adds mask/dice/rela loss coefficients.
model.num_region_queries: Number of region queries for mask prediction. Default 100.
model.loss_types: Loss components. Default [labels, boxes, masks]. Includes mask_loss_coef, dice_loss_coef, rela_loss_coef.
evaluate.ioi_threshold: IoI threshold for mask evaluation. Default 0.5.
evaluate.nms_threshold: NMS threshold. Default 0.2.
evaluate.text_threshold: Text matching threshold. Default 0.3.
dataset.has_mask: Dataset includes mask annotations. Default True. val_data_sources default data_type is "VG".
Multi-GPU / Multi-Node
Launch method: Lightning-managed. Same DDP/FSDP behavior as Grounding DINO.
| Spec Key | Description | Default |
|---|---|---|
train.num_gpus | Number of GPUs | 1 |
train.gpu_ids | GPU device indices | [0] |
train.num_nodes | Number of nodes | 1 |
train.distributed_strategy | ddp or fsdp | ddp |
Hardware
Minimum 1 GPU(s), recommended 4 GPU(s). 24GB+ (A100 recommended) VRAM per GPU. Heavier than Grounding DINO due to mask prediction head. 24GB+ GPU memory recommended.
Error Patterns
CUDA out of memory: Reduce batch_size. Mask prediction adds overhead on top of Grounding DINO.
Deploy schema error for test_threshold: TAO Deploy uses
evaluate.text_threshold and inference.text_threshold. Do not use
test_threshold in deploy specs.
Deploy model shape mismatch: Carry transformer and mask structure fields
from export into deploy evaluate/inference specs, including model.num_queries,
model.num_select, model.max_text_len, model.num_region_queries, and
model.has_mask. These values must match the ONNX model used to build the
TensorRT engine.
Spec Param / Parent Model Inference
Model-specific inference mappings belong in this MD file, not in config.json. Generated runners should read this section and apply the mappings with SDK helpers before create_job(). This mirrors the old microservices infer_params.py flow.
Inference mappings from TAO Core mask_grounding_dino.config.json:
| Action | Spec Field | Inference Function | Meaning |
|---|---|---|---|
| evaluate | encryption_key | key | encryption key |
| evaluate | evaluate.checkpoint | parent_model | model file inferred from the parent job results folder |
| evaluate | evaluate.trt_engine | parent_model | model file inferred from the parent job results folder |
| evaluate | results_dir | output_dir | current job results directory |
| export | encryption_key | key | encryption key |
| export | export.checkpoint | parent_model | model file inferred from the parent job results folder |
| export | export.onnx_file | create_onnx_file | output ONNX path |
| export | results_dir | output_dir | current job results directory |
| gen_trt_engine | encryption_key | key | encryption key |
| gen_trt_engine | gen_trt_engine.onnx_file | parent_model | model file inferred from the parent job results folder |
| gen_trt_engine | gen_trt_engine.trt_engine | create_engine_file | output TensorRT engine path |
| gen_trt_engine | results_dir | output_dir | current job results directory |
| inference | encryption_key | key | encryption key |
| inference | inference.checkpoint | parent_model | model file inferred from the parent job results folder |
| inference | inference.trt_engine | parent_model | model file inferred from the parent job results folder |
| inference | results_dir | output_dir | current job results directory |
| quantize | encryption_key | key | encryption key |
| quantize | quantize.model_path | parent_model | model file inferred from the parent job results folder |
| quantize | results_dir | output_dir | current job results directory |
| train | encryption_key | key | encryption key |
| train | model.pretrained_backbone_path | ptm_if_no_resume_model | PTM when no resume checkpoint exists |
| train | results_dir | output_dir | current job results directory |
| train | train.pretrained_model_path | ptm_if_no_resume_model | PTM when no resume checkpoint exists |
| train | train.resume_training_checkpoint_path | resume_model | model file inferred from the current job results folder |
For parent_model or parent_model_folder, pass the upstream train/export/AutoML child job id as parent_job_id. The SDK lists the parent result folder, filters checkpoint artifacts, and returns the selected model file or folder. Do not add these mappings back to config.json and do not patch generated runner scripts to guess checkpoint paths.
When selecting a Mask Grounding DINO checkpoint outside the SDK resolver, match
the intended epoch/step artifact exactly, for example
model_epoch_000_step_00049.pth. The mask_gdino_model_latest.pth symlink is
valid only when latest is explicitly requested. The parent PyTorch
mask_grounding_dino CLI supports train, evaluate, inference, export,
and quantize; run TensorRT engine generation, TensorRT inference, and
TensorRT evaluation through references/tao-deploy-mask-grounding-dino.md.
Deployment
Files
- ATTRIBUTION.mdAdded by AutoGineer957 B
- BENCHMARK.md7.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md13.7 KiB
- config/skillspector-baseline.yaml834 B
- evals/evals.json835 B
- references/skill_info.yaml6.2 KiB
- references/spec_template_deploy_evaluate.yaml567 B
- references/spec_template_deploy_gen_trt_engine.yaml365 B
- references/spec_template_deploy_inference.yaml1.6 KiB
- references/spec_template_evaluate.yaml3.5 KiB
- references/spec_template_export.yaml3.6 KiB
- references/spec_template_gen_trt_engine.yaml3.6 KiB
- references/spec_template_inference.yaml3.6 KiB
- references/spec_template_quantize.yaml3.3 KiB
- references/spec_template_train.yaml3.3 KiB
- references/tao-deploy-mask-grounding-dino.md5.7 KiB
- references/tao-deploy-mask-grounding-dino.skill_info.yaml3.3 KiB
- schemas/evaluate.schema.json60.2 KiB
- schemas/export.schema.json59.7 KiB
- schemas/gen_trt_engine.schema.json61.4 KiB
- schemas/inference.schema.json61.1 KiB
- schemas/manifest.json16.0 KiB
- schemas/quantize.schema.json55.8 KiB
- schemas/train.schema.json55.8 KiB
- skill-card.md4.5 KiB
- skill.oms.sig9.4 KiB
schemas/export.schema.json
{
"automl_default_parameters": [
"train.optim.lr_step_size",
"dataset.augmentation.train_random_crop_min",
"train.optim.weight_decay",
"train.optim.lr_decay",
"train.optim.lr_linear_proj_mult",
"train.optim.lr_backbone",
"train.optim.momentum",
"dataset.augmentation.train_random_crop_max",
"train.optim.lr",
"dataset.augmentation.horizontal_flip_prob",
"model.num_select"
],
"automl_disabled_parameters": [
"quantize",
"train.cudnn",
"quantize.backend_kwargs",
"train.gpu_ids",
"model.return_interm_indices",
"dataset.train_data_sources",
"wandb.tags",
"dataset.eval_class_ids",
"quantize.skip_names",
"inference.color_map",
"evaluate",
"inference",
"train",
"model.dec_layers",
"model.loss_types",
"dataset.val_data_sources",
"dataset.augmentation",
"gen_trt_engine",
"gen_trt_engine.tensorrt.layers_precision",
"dataset",
"gen_trt_engine.tensorrt",
"quantize.layers",
"dataset.augmentation.input_mean",
"model.backbone_names",
"model",
"train.optim.lr_steps",
"train.freeze",
"dataset.augmentation.input_std",
"train.optim",
"evaluate.gpu_ids",
"dataset.augmentation.train_random_resize",
"model.enc_layers",
"model.hidden_dim",
"model.linear_proj_names",
"export",
"dataset.augmentation.test_random_resize",
"wandb",
"dataset.infer_data_sources",
"dataset.augmentation.scales",
"inference.gpu_ids",
"dataset.test_data_sources",
"dataset.quant_calibration_data_sources"
],
"default": {
"dataset": {
"augmentation": {
"fixed_padding": true,
"fixed_random_crop": 1024,
"horizontal_flip_prob": 0.5,
"input_mean": [
0.485,
0.456,
0.406
],
"input_std": [
0.229,
0.224,
0.225
],
"random_resize_max_size": 1333,
"scales": [
480,
512,
544,
576,
608,
640,
672,
704,
736,
768,
800
],
"test_random_resize": 800,
"train_random_crop_max": 600,
"train_random_crop_min": 384,
"train_random_resize": [
400,
500,
600
]
},
"batch_size": 4,
"dataset_type": "serialized",
"eval_class_ids": [
1
],
"has_mask": true,
"infer_data_sources": {
"data_type": "",
"image_dir": ""
},
"max_labels": 50,
"pin_memory": true,
"quant_calibration_data_sources": {
"image_dir": "",
"json_file": ""
},
"test_data_sources": {
"data_type": "",
"image_dir": "",
"json_file": ""
},
"train_data_sources": [
{
"image_dir": "",
"json_file": "",
"label_map": ""
},
{
"image_dir": "",
"json_file": ""
}
],
"val_data_sources": {
"data_type": "VG",
"image_dir": "",
"json_file": ""
},
"workers": 8
},
"encryption_key": "",
"export": {
"batch_size": -1,
"checkpoint": "???",
"format": "onnx",
"gpu_id": 0,
"input_channel": 3,
"input_height": 544,
"input_width": 960,
"on_cpu": false,
"onnx_file": "???",
"opset_version": 17,
"results_dir": "",
"serialize_nvdsinfer": false,
"verbose": false
},
"model": {
"aux_loss": true,
"backbone": "swin_tiny_224_1k",
"backbone_names": [
"backbone.0",
"bert"
],
"bbox_loss_coef": 5.0,
"class_embed_bias": false,
"clip_max_norm": 0.1,
"cls_loss_coef": 2.0,
"dec_layers": 6,
"dec_n_points": 4,
"decoder_sa_type": "sa",
"dice_loss_coef": 5.0,
"dilation": false,
"dim_feedforward": 2048,
"dn_box_noise_scale": 1.0,
"dn_label_noise_ratio": 0.5,
"dn_number": 0,
"dropout_ratio": 0.0,
"embed_init_tgt": true,
"enc_layers": 6,
"enc_n_points": 4,
"fix_refpoints_hw": -1,
"focal_alpha": 0.25,
"focal_gamma": 2.0,
"giou_loss_coef": 2.0,
"has_mask": true,
"hidden_dim": 256,
"interm_loss_coef": 1.0,
"linear_proj_names": [
"reference_points",
"sampling_offsets"
],
"log_scale": "none",
"loss_types": [
"labels",
"boxes",
"masks"
],
"mask_loss_coef": 2.0,
"max_text_len": 256,
"nheads": 8,
"no_interm_box_loss": false,
"num_feature_levels": 4,
"num_queries": 900,
"num_region_queries": 100,
"num_select": 300,
"pe_temperatureH": 20,
"pe_temperatureW": 20,
"pre_norm": false,
"pretrained_backbone_path": "",
"rela_minimap_loss_coef": 0.5,
"rela_nt_loss_coef": 1.0,
"rela_union_mask_loss_coef": 2.0,
"return_interm_indices": [
1,
2,
3,
4
],
"set_cost_bbox": 5.0,
"set_cost_class": 1.0,
"set_cost_giou": 2.0,
"text_encoder_type": "bert-base-uncased",
"train_backbone": true,
"two_stage_type": "standard",
"use_dn": true
},
"model_name": "",
"quantize": {
"algorithm": "minmax",
"backend": "torchao",
"backend_kwargs": {},
"device": "cuda",
"layers": [],
"mode": "weight_only_ptq",
"model_path": "",
"results_dir": "",
"skip_names": []
},
"results_dir": "",
"train": {
"activation_checkpoint": true,
"checkpoint_interval": 1,
"checkpoint_interval_unit": "epoch",
"clip_grad_norm": 0.1,
"cudnn": {
"benchmark": false,
"deterministic": true
},
"distributed_strategy": "ddp",
"freeze": [],
"gpu_ids": [
0
],
"is_dry_run": false,
"num_epochs": 10,
"num_gpus": 1,
"num_nodes": 1,
"optim": {
"lr": 0.0002,
"lr_backbone": 2e-05,
"lr_decay": 0.1,
"lr_linear_proj_mult": 0.1,
"lr_scheduler": "MultiStep",
"lr_step_size": 10,
"lr_steps": [
10
],
"momentum": 0.9,
"monitor_name": "val_loss",
"optimizer": "AdamW",
"weight_decay": 0.0001
},
"precision": "fp32",
"pretrained_model_path": "",
"results_dir": "",
"resume_training_checkpoint_path": "",
"seed": 1234,
"validation_interval": 1
},
"wandb": {
"enable": true,
"entity": "",
"group": "",
"name": "TAO Toolkit Training",
"project": "TAO Toolkit",
"reinit": false,
"run_id": "",
"save_code": false,
"sync_tensorboard": false,
"tags": [
"tao-toolkit"
]
}
},
"popular": {
"evaluate": {
"gpu_ids": [
0
],
"num_gpus": 1,
"num_nodes": 1
},
"gen_trt_engine": {
"batch_size": -1,
"gpu_id": 0,
"tensorrt": {
"min_batch_size": 1,
"opt_batch_size": 1
}
},
"inference": {
"gpu_ids": [
0
],
"num_gpus": 1,
"num_nodes": 1
},
"model": {
"backbone": "swin_tiny_224_1k",
"bbox_loss_coef": 5.0,
"cls_loss_coef": 2.0,
"giou_loss_coef": 2.0,
"num_queries": 900,
"num_select": 300,
"set_cost_bbox": 5.0,
"set_cost_class": 1.0,
"set_cost_giou": 2.0
},
"train": {
"checkpoint_interval": 1,
"gpu_ids": [
0
],
"num_epochs": 10,
"num_gpus": 1,
"num_nodes": 1,
"optim": {
"lr_backbone": 2e-05,
"lr_linear_proj_mult": 0.1,
"momentum": 0.9,
"weight_decay": 0.0001
},
"validation_interval": 1
}
},
"properties": {
"automl_disabled_parameters": [
"wandb",
"model",
"dataset",
"train",
"evaluate",
"inference",
"export",
"gen_trt_engine",
"quantize"
],
"dataset": {
"automl_disabled_parameters": [
"dataset.train_data_sources",
"dataset.val_data_sources",
"dataset.test_data_sources",
"dataset.infer_data_sources",
"dataset.quant_calibration_data_sources",
"dataset.eval_class_ids",
"dataset.augmentation"
],
"automl_enabled": false,
"default": {
"augmentation": {
"fixed_padding": true,
"fixed_random_crop": 1024,
"horizontal_flip_prob": 0.5,
"input_mean": [
0.485,
0.456,
0.406
],
"input_std": [
0.229,
0.224,
0.225
],
"random_resize_max_size": 1333,
"scales": [
480,
512,
544,
576,
608,
640,
672,
704,
736,
768,
800
],
"test_random_resize": 800,
"train_random_crop_max": 600,
"train_random_crop_min": 384,
"train_random_resize": [
400,
500,
600
]
},
"batch_size": 4,
"dataset_type": "serialized",
"eval_class_ids": [
1
],
"has_mask": true,
"infer_data_sources": {
"data_type": "",
"image_dir": ""
},
"max_labels": 50,
"pin_memory": true,
"quant_calibration_data_sources": {
"image_dir": "",
"json_file": ""
},
"test_data_sources": {
"data_type": "",
"image_dir": "",
"json_file": ""
},
"train_data_sources": [
{
"image_dir": "",
"json_file": "",
"label_map": ""
},
{
"image_dir": "",
"json_file": ""
}
],
"val_data_sources": {
"data_type": "VG",
"image_dir": "",
"json_file": ""
},
"workers": 8
},
"description": "Configurable parameters to construct the dataset for a Mask Grounding DINO experiment.",
"properties": {
"augmentation": {
"automl_default_parameters": [
"dataset.augmentation.horizontal_flip_prob",
"dataset.augmentation.train_random_crop_min",
"dataset.augmentation.train_random_crop_max"
],
"automl_disabled_parameters": [
"dataset.augmentation.scales",
"dataset.augmentation.input_mean",
"dataset.augmentation.input_std",
"dataset.augmentation.train_random_resize",
"dataset.augmentation.test_random_resize"
],
"automl_enabled": false,
"default": {
"fixed_padding": true,
"fixed_random_crop": 1024,
"horizontal_flip_prob": 0.5,
"input_mean": [
0.485,
0.456,
0.406
],
"input_std": [
0.229,
0.224,
0.225
],
"random_resize_max_size": 1333,
"scales": [
480,
512,
544,
576,
608,
640,
672,
704,
736,
768,
800
],
"test_random_resize": 800,
"train_random_crop_max": 600,
"train_random_crop_min": 384,
"train_random_resize": [
400,
500,
600
]
},
"description": "Configuration parameters for data augmentation",
"properties": {
"fixed_padding": {
"default": true,
"description": "A flag specifying whether to resize the image (with no padding) to (sorted(scales[-1]), random_resize_max_size) to prevent a CPU memory leak.",
"title": "fixed padding",
"type": "bool"
},
"fixed_random_crop": {
"default": 1024,
"description": "A flag to enable Large Scale Jittering, which is used for ViT backbones. The resulting image resolution is fixed to fixed_random_crop.",
"maximum": Infinity,
"minimum": 1,
"title": "fixed random crop",
"type": "int"
},
"horizontal_flip_prob": {
"automl_enabled": true,
"default": 0.5,
"description": "The probability for horizonal flip during training",
"maximum": 1.0,
"minimum": 0.0,
"title": "horizontal flip probability",
"type": "float"
},
"input_mean": {
"automl_enabled": false,
"default": [
0.485,
0.456,
0.406
],
"description": "The input mean for RGB frames",
"title": "input mean per pixel",
"type": "list"
},
"input_std": {
"automl_enabled": false,
"default": [
0.229,
0.224,
0.225
],
"description": "The input standard deviation per pixel for RGB frames",
"title": "input std per pixel",
"type": "list"
},
"random_resize_max_size": {
"default": 1333,
"description": "The maximum random resize size for training data",
"maximum": Infinity,
"minimum": 1,
"title": "random resize max size",
"type": "int"
},
"scales": {
"automl_enabled": false,
"default": [
480,
512,
544,
576,
608,
640,
672,
704,
736,
768,
800
],
"description": "A list of sizes to perform random resize.",
"title": "scales",
"type": "list"
},
"test_random_resize": {
"automl_enabled": false,
"default": 800,
"description": "The random resize size for test data",
"maximum": Infinity,
"minimum": 32,
"title": "random resize max size",
"type": "int"
},
"train_random_crop_max": {
"automl_enabled": true,
"default": 600,
"depends_on": "dataset.augmentation.train_random_crop_min",
"description": "The maximum random crop size for training data. Must be > train_random_crop_min",
"math_cond": "> depends_on",
"maximum": 1333,
"minimum": 32,
"title": "Maximum random crop size",
"type": "int"
},
"train_random_crop_min": {
"automl_enabled": true,
"default": 384,
"description": "The minimum random crop size for training data",
"maximum": Infinity,
"minimum": 32,
"parent_param": "TRUE",
"title": "minumum random crop size",
"type": "int"
},
"train_random_resize": {
"automl_enabled": false,
"default": [
400,
500,
600
],
"description": "A list of sizes to perform random resize for training data",
"title": "train random resize dimensions",
"type": "list"
}
},
"title": "augmentation",
"type": "collection"
},
"batch_size": {
"default": 4,
"description": "The batch size for training and validation",
"maximum": Infinity,
"minimum": 1,
"title": "batch size",
"type": "int"
},
"dataset_type": {
"default": "serialized",
"description": "If set to default, we follow the standard map-style dataset structure from torch which loads ODVG annotation in every subprocess. This leads to redudant copy of data and can cause RAM to explod if `workers` is high. If set to serialized, the data is serialized through pickle and `torch.Tensor` that allows the data to be shared across subprocess. As a result, RAM usage can be greatly improved.",
"enum": [
"serialized",
"default"
],
"title": "dataset type",
"type": "categorical"
},
"eval_class_ids": {
"automl_enabled": false,
"default": [
1
],
"description": "IDs of the classes for evaluation.",
"title": "eval class ids",
"type": "list"
},
"has_mask": {
"default": true,
"description": "Flag to load mask annotation from dataset.",
"title": "has mask",
"type": "bool"
},
"infer_data_sources": {
"automl_enabled": false,
"default": {
"data_type": "",
"image_dir": ""
},
"description": "The data source for inference:\n* image_dir : Parent directory containing inference images\n* json_file : Path to JSON file with image_path+caption pairs (VG only)\n* data_type : Dataset type (VG, OD)\n* captions : Class list string (OD only)",
"title": "infer data sources",
"type": "collection"
},
"max_labels": {
"default": 50,
"description": "The total number of labels to sample from. After sampling positive labels, we randomly sample negative samples so that total number of labels equal to `max_labels`. For detection dataset, negative labels are categories not present in the image. For grounding dataset, negative labels are phrases in the original caption not present in the image. Setting higher `max_labels` may improve robustness of the model with the cost of longer training time.",
"math_cond": ">0",
"maximum": Infinity,
"minimum": 1,
"title": "max labels",
"type": "int"
},
"pin_memory": {
"default": true,
"description": "Flag to enable the dataloader to allocated pagelocked memory for faster of data between the CPU and GPU.",
"title": "pin_memory",
"type": "bool"
},
"quant_calibration_data_sources": {
"automl_enabled": false,
"default": {
"image_dir": "",
"json_file": ""
},
"description": "The data source for quantization calibration:\n* image_dir : The directory that contains the quantization calibration images\n* json_file(optional) : The path of the JSON file, which uses quantization calibration-annotation COCO format",
"title": "quantization calibration data sources",
"type": "collection"
},
"test_data_sources": {
"automl_enabled": false,
"default": {
"data_type": "",
"image_dir": "",
"json_file": ""
},
"description": "The data source for testing:\n* image_dir : The directory that contains the test images\n* json_file : The path of the JSON file, which uses test-annotation COCO format.\n* data_type : The type of the dataset, OD or VG.",
"title": "test data sources",
"type": "collection"
},
"train_data_sources": {
"automl_enabled": false,
"default": [
{
"image_dir": "",
"json_file": "",
"label_map": ""
},
{
"image_dir": "",
"json_file": ""
}
],
"description": "The list of data sources for training:\n* image_dir : The directory that contains the training images\n* json_file : The path of the JSONL file, which uses training-annotation ODVG format\n* label_map: (Optional) The path of the label mapping only required for detection dataset",
"title": "train data sources",
"type": "list"
},
"val_data_sources": {
"automl_enabled": false,
"default": {
"data_type": "VG",
"image_dir": "",
"json_file": ""
},
"description": "The data source for validation:\n* image_dir : The directory that contains the validation images\n* json_file : The path of the JSON file, which uses validation-annotation COCO format.\n* data_type : The type of the dataset, OD or VGNote that category id needs to start from 0 if we want to calculate validation loss.\nRun Data Services annotation convert to making the categories contiguous.",
"title": "validation data sources",
"type": "collection"
},
"workers": {
"default": 8,
"description": "The number of parallel workers processing data",
"maximum": Infinity,
"minimum": 1,
"title": "batch size",
"type": "int"
}
},
"type": "collection"
},
"encryption_key": {
"default": "",
"description": "Key for encrypting model checkpoints",
"title": "Encryption key",
"type": "string"
},
"export": {
"automl_enabled": false,
"default": {
"batch_size": -1,
"checkpoint": "???",
"format": "onnx",
"gpu_id": 0,
"input_channel": 3,
"input_height": 544,
"input_width": 960,
"on_cpu": false,
"onnx_file": "???",
"opset_version": 17,
"results_dir": "",
"serialize_nvdsinfer": false,
"verbose": false
},
"description": "Configurable parameters to construct the exporter for a Mask Grounding DINO experiment.",
"properties": {
"batch_size": {
"default": -1,
"description": "The batch size of the input Tensor for the engine.\n A value of :code:`-1` implies dynamic tensor shapes.",
"minimum": -1,
"title": "batch size",
"type": "int"
},
"checkpoint": {
"default": "???",
"description": "Path to the checkpoint file to run export.",
"title": "checkpoint",
"type": "string"
},
"format": {
"default": "onnx",
"description": "File format to export to.",
"enum": [
"onnx",
"xdl"
],
"title": "export format",
"type": "categorical"
},
"gpu_id": {
"default": 0,
"description": "The index of the GPU to build the TensorRT engine.",
"title": "GPU ID",
"type": "int"
},
"input_channel": {
"default": 3,
"description": "Number of channels in the input Tensor.",
"enum": [
1,
3
],
"minimum": 1,
"title": "input channel",
"type": "ordered_int"
},
"input_height": {
"default": 544,
"description": "Height of the input image tensor.",
"minimum": 32,
"title": "input height",
"type": "int"
},
"input_width": {
"default": 960,
"description": "Width of the input image tensor.",
"minimum": 32,
"title": "input width",
"type": "int"
},
"on_cpu": {
"default": false,
"description": "Flag to export CPU compatible model.",
"title": "on cpu",
"type": "bool"
},
"onnx_file": {
"default": "???",
"description": "\n Path to the onnx model file.\n ",
"title": "onnx file",
"type": "string"
},
"opset_version": {
"default": 17,
"description": "Operator set version of the ONNX model used to generate\n the TensorRT engine.",
"minimum": 1,
"title": "opset version",
"type": "int"
},
"results_dir": {
"default": "",
"description": "\n Path to where all the assets generated from a task are stored.\n ",
"title": "Results directory",
"type": "string"
},
"serialize_nvdsinfer": {
"default": false,
"description": "Flag to enable serializing the required\n configs for integrating with DeepStream.",
"title": "Serialize DeepStream config.",
"type": "bool"
},
"verbose": {
"default": false,
"description": "Flag to enable verbose TensorRT logging.",
"title": "verbose",
"type": "bool"
}
},
"type": "collection"
},
"model": {
"automl_default_parameters": [
"model.num_select"
],
"automl_disabled_parameters": [
"model.return_interm_indices",
"model.hidden_dim",
"model.enc_layers",
"model.dec_layers",
"model.loss_types",
"model.backbone_names",
"model.linear_proj_names"
],
"automl_enabled": false,
"default": {
"aux_loss": true,
"backbone": "swin_tiny_224_1k",
"backbone_names": [
"backbone.0",
"bert"
],
"bbox_loss_coef": 5.0,
"class_embed_bias": false,
"clip_max_norm": 0.1,
"cls_loss_coef": 2.0,
"dec_layers": 6,
"dec_n_points": 4,
"decoder_sa_type": "sa",
"dice_loss_coef": 5.0,
"dilation": false,
"dim_feedforward": 2048,
"dn_box_noise_scale": 1.0,
"dn_label_noise_ratio": 0.5,
"dn_number": 0,
"dropout_ratio": 0.0,
"embed_init_tgt": true,
"enc_layers": 6,
"enc_n_points": 4,
"fix_refpoints_hw": -1,
"focal_alpha": 0.25,
"focal_gamma": 2.0,
"giou_loss_coef": 2.0,
"has_mask": true,
"hidden_dim": 256,
"interm_loss_coef": 1.0,
"linear_proj_names": [
"reference_points",
"sampling_offsets"
],
"log_scale": "none",
"loss_types": [
"labels",
"boxes",
"masks"
],
"mask_loss_coef": 2.0,
"max_text_len": 256,
"nheads": 8,
"no_interm_box_loss": false,
"num_feature_levels": 4,
"num_queries": 900,
"num_region_queries": 100,
"num_select": 300,
"pe_temperatureH": 20,
"pe_temperatureW": 20,
"pre_norm": false,
"pretrained_backbone_path": "",
"rela_minimap_loss_coef": 0.5,
"rela_nt_loss_coef": 1.0,
"rela_union_mask_loss_coef": 2.0,
"return_interm_indices": [
1,
2,
3,
4
],
"set_cost_bbox": 5.0,
"set_cost_class": 1.0,
"set_cost_giou": 2.0,
"text_encoder_type": "bert-base-uncased",
"train_backbone": true,
"two_stage_type": "standard",
"use_dn": true
},
"description": "Configurable parameters to construct the model for a Mask Grounding DINO experiment.",
"popular": [
"backbone",
"bbox_loss_coef",
"set_cost_giou",
"set_cost_class",
"cls_loss_coef",
"num_queries",
"giou_loss_coef",
"set_cost_bbox",
"num_select"
],
"properties": {
"aux_loss": {
"default": true,
"description": "A flag specifying whether to use auxiliary\n decoding losses (loss at each decoder layer)",
"title": "Train backbone",
"type": "bool"
},
"backbone": {
"default": "swin_tiny_224_1k",
"description": "The backbone name of the model.\n TAO implementation of DINO support Swin and ResNet50.",
"enum": [
"swin_tiny_224_1k",
"swin_base_224_22k",
"swin_base_384_22k",
"swin_large_224_22k",
"swin_large_384_22k",
"resnet_50"
],
"popular": true,
"title": "backbone",
"type": "categorical"
},
"backbone_names": {
"automl_enabled": false,
"default": [
"backbone.0",
"bert"
],
"description": "Prefix of the tensor names corresponding to the backbone.",
"title": "Backbone tensor name prefix",
"type": "list"
},
"bbox_loss_coef": {
"default": 5.0,
"description": "The relative weight of the L1 error of the bounding box coordinates in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "BBox loss coefficient",
"type": "float"
},
"class_embed_bias": {
"default": false,
"description": "Flag to set bias in the contrastive embedding.",
"title": "Class embedding bias",
"type": "bool"
},
"clip_max_norm": {
"default": 0.1,
"title": "clip max norm",
"type": "float"
},
"cls_loss_coef": {
"default": 2.0,
"description": "The relative weight of the classification error in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "Class loss coefficient",
"type": "float"
},
"dec_layers": {
"automl_enabled": false,
"default": 6,
"description": "Number of decoder layers in the transformer (fixed at 6 for Mask Grounding DINO)",
"maximum": 6,
"minimum": 6,
"title": "decoder layers",
"type": "int"
},
"dec_n_points": {
"default": 4,
"description": "Number of reference points in the decoder.",
"minimum": 1,
"title": "decoder n points",
"type": "int"
},
"decoder_sa_type": {
"default": "sa",
"description": "Type of decoder self attention.",
"enum": [
"sa",
"ca_label",
"ca_content"
],
"title": "decoder self-attention type",
"type": "categorical"
},
"dice_loss_coef": {
"default": 5.0,
"description": "The relative weight of the dice loss of the segmentation in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"title": "GIoU loss coefficient",
"type": "float"
},
"dilation": {
"default": false,
"description": "A flag specifying whether enable dilation or not in the backbone.",
"title": "Dilation enabled.",
"type": "bool"
},
"dim_feedforward": {
"default": 2048,
"description": "Dimension of the feedforward network",
"minimum": 1,
"title": "dim feedforward",
"type": "int"
},
"dn_box_noise_scale": {
"default": 1.0,
"description": "The scale of noise applied to boxes during contrastive de-noising. If this value is 0, noise is not applied.",
"maximum": Infinity,
"minimum": 0.0,
"title": "Denoised boxes noise scaling",
"type": "float"
},
"dn_label_noise_ratio": {
"default": 0.5,
"description": "The scale of the noise applied to labels during\n contrastive denoising. If this value is 0, then noise is\n no applied.",
"minimum": 0.0,
"title": "denoise label noise ratio",
"type": "float"
},
"dn_number": {
"default": 0,
"description": "The number of denoising queries in DINO.",
"maximum": Infinity,
"minimum": 0,
"title": "denoising number",
"type": "int"
},
"dropout_ratio": {
"default": 0.0,
"description": "The probability to drop hidden units.",
"maximum": 1.0,
"minimum": 0.0,
"title": "drop out ratio",
"type": "float"
},
"embed_init_tgt": {
"default": true,
"description": "Flag to add target embedding",
"title": "embed init target",
"type": "bool"
},
"enc_layers": {
"automl_enabled": false,
"default": 6,
"description": "Number of encoder layers in the transformer (fixed at 6 for Mask Grounding DINO)",
"maximum": 6,
"minimum": 6,
"title": "encoder layers",
"type": "int"
},
"enc_n_points": {
"default": 4,
"description": "Number of reference points in the encoder.",
"minimum": 1,
"title": "encoder n points",
"type": "int"
},
"fix_refpoints_hw": {
"default": -1,
"description": "If this value is -1, width and height are learned seperately for each box.\n If this value is -2, a shared width and height are learned.\n A value greater than 0 specifies learning with a fixed number.",
"math_cond": "!= 0",
"maximum": Infinity,
"minimum": -2,
"title": "fix refpoints hw",
"type": "int"
},
"focal_alpha": {
"default": 0.25,
"description": "The alpha value in the focal loss.",
"math_cond": "> 0.0",
"title": "focal alpha",
"type": "float"
},
"focal_gamma": {
"default": 2.0,
"description": "The gamma value in the focal loss.",
"math_cond": "> 0.0",
"title": "focal gamma",
"type": "float"
},
"giou_loss_coef": {
"default": 2.0,
"description": "The relative weight of the GIoU loss of the bounding box in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "GIoU loss coefficient",
"type": "float"
},
"has_mask": {
"default": true,
"description": "Flag to enable mask head in grounding dino.",
"title": "has mask",
"type": "bool"
},
"hidden_dim": {
"automl_enabled": false,
"default": 256,
"description": "Dimension of the hidden units.",
"type": "int"
},
"interm_loss_coef": {
"default": 1.0,
"title": "intermediate loss coefficient",
"type": "float"
},
"linear_proj_names": {
"automl_enabled": false,
"default": [
"reference_points",
"sampling_offsets"
],
"description": "Linear projection layer names.",
"title": "linear projection names",
"type": "list"
},
"log_scale": {
"default": "none",
"description": "[Optional] The initial value of a learnable parameter to multiply with the similarity\n matrix to normalize the output. Defaults to None.\n - If set to 'auto', the similarity matrix will be normalized by\n a fixed value ``sqrt(d_c)`` where ``d_c`` is the channel number.\n - If set to 'none' or ``None``, there is no normalization applied.",
"title": "log scale",
"type": "string"
},
"loss_types": {
"automl_enabled": false,
"default": [
"labels",
"boxes",
"masks"
],
"description": "Losses to be used during training",
"title": "loss_types",
"type": "list"
},
"mask_loss_coef": {
"default": 2.0,
"description": "The relative weight of the mask error in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"title": "Mask loss coefficient",
"type": "float"
},
"max_text_len": {
"default": 256,
"description": "Maximum text length of BERT.",
"minimum": 1,
"title": "Maximum text length",
"type": "int"
},
"nheads": {
"default": 8,
"description": "Number of heads",
"title": "nheads",
"type": "int"
},
"no_interm_box_loss": {
"default": false,
"description": "No intermediate bbox loss.",
"title": "no interm bbox loss",
"type": "bool"
},
"num_feature_levels": {
"default": 4,
"description": "The number of feature levels to use in the model",
"maximum": 5,
"minimum": 1,
"title": "number of feature levels",
"type": "int"
},
"num_queries": {
"default": 900,
"description": "The number of queries",
"maximum": Infinity,
"minimum": 1,
"parent_param": "TRUE",
"popular": true,
"title": "number of queries",
"type": "int"
},
"num_region_queries": {
"default": 100,
"description": "Number of region queries.",
"title": "num_region_queries",
"type": "int"
},
"num_select": {
"automl_enabled": true,
"default": 300,
"depends_on": "model.num_queries",
"description": "The number of top-K predictions selected during post-process. Must be < num_queries * num_classes",
"maximum": 1000,
"minimum": 1,
"popular": true,
"title": "num select",
"type": "int"
},
"pe_temperatureH": {
"default": 20,
"description": "The temperature applied to the height dimension of the positional sine embedding.",
"maximum": Infinity,
"minimum": 1,
"title": "pe_temperatureH",
"type": "int"
},
"pe_temperatureW": {
"default": 20,
"description": "The temperature applied to the width dimension of the positional sine embedding.",
"maximum": Infinity,
"minimum": 1,
"title": "pe_temperatureW",
"type": "int"
},
"pre_norm": {
"default": false,
"description": "Flag to add layer norm in the encoder or not.",
"title": "Pre norm",
"type": "bool"
},
"pretrained_backbone_path": {
"default": "",
"description": "[Optional] Path to a pretrained backbone file.",
"title": "pretrained backbone path",
"type": "string"
},
"rela_minimap_loss_coef": {
"default": 0.5,
"description": "The relative weight of the minimap error in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"title": "Rela minimap loss coefficient",
"type": "float"
},
"rela_nt_loss_coef": {
"default": 1.0,
"description": "The relative weight of the no target error in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"title": "Rela no target loss coefficient",
"type": "float"
},
"rela_union_mask_loss_coef": {
"default": 2.0,
"description": "The relative weight of the mask error in the final loss.",
"maximum": Infinity,
"minimum": 0.0,
"title": "Rela union mask loss coefficient",
"type": "float"
},
"return_interm_indices": {
"automl_enabled": false,
"default": [
1,
2,
3,
4
],
"description": "The index of feature levels to use in the model. The length must match `num_feature_levels`.",
"title": "return interim indices",
"type": "list"
},
"set_cost_bbox": {
"default": 5.0,
"description": "The relative weight of the L1 error of the bounding box coordinates in the matching cost.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "Set cost BBox ",
"type": "float"
},
"set_cost_class": {
"default": 1.0,
"description": "The relative weight of the classification error in the matching cost.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "Set cost classification",
"type": "float"
},
"set_cost_giou": {
"default": 2.0,
"description": "The relative weight of the GIoU loss of the bounding box in the matching cost.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "Set cost GIoU",
"type": "float"
},
"text_encoder_type": {
"default": "bert-base-uncased",
"description": "BERT encoder type. If only the name of the type is provided,\n the weight is download from the HuggingFace Hub.\n If a path is provided, then we load the weight from the local path.",
"title": "Text encoder type",
"type": "string"
},
"train_backbone": {
"default": true,
"description": "Flag to set backbone weights as trainable or frozen.\n When set to `False`, the backbone weights will be frozen.",
"title": "Train backbone",
"type": "bool"
},
"two_stage_type": {
"default": "standard",
"description": "Type of two stage in DINO",
"enum": [
"standard",
"no"
],
"title": "two stage type",
"type": "categorical"
},
"use_dn": {
"default": true,
"description": "A flag specifying whether to enbable contrastive de-noising training in DINO",
"title": "use denoising",
"type": "bool"
}
},
"type": "collection"
},
"model_name": {
"default": "",
"description": "Name of model if invoking task via :code:`model_agnostic`",
"title": "Model name",
"type": "string"
},
"quantize": {
"automl_disabled_parameters": [
"quantize.layers",
"quantize.skip_names",
"quantize.backend_kwargs"
],
"automl_enabled": false,
"default": {
"algorithm": "minmax",
"backend": "torchao",
"backend_kwargs": {},
"device": "cuda",
"layers": [],
"mode": "weight_only_ptq",
"model_path": "",
"results_dir": "",
"skip_names": []
},
"description": "Configurable parameters to run model quantization for a Mask Grounding DINO experiment.",
"properties": {
"algorithm": {
"default": "minmax",
"description": "Calibration/optimization algorithm. Used by ModelOpt backends (modelopt.pytorch and modelopt.onnx). Ignored by torchao backend.",
"enum": [
"minmax",
"max",
"entropy",
"awq_clip",
"awq_lite",
"awq_full",
"rtn_dq"
],
"title": "Calibration algorithm",
"type": "categorical"
},
"backend": {
"default": "torchao",
"description": "The quantization backend to use",
"enum": [
"modelopt.pytorch",
"torchao",
"modelopt.onnx"
],
"title": "Quantization backend",
"type": "categorical"
},
"backend_kwargs": {
"automl_enabled": false,
"description": "Additional keyword arguments to pass to the backend",
"title": "Backend kwargs",
"type": "collection"
},
"device": {
"default": "cuda",
"description": "Device to use for calibration. Accepts 'cuda' (uses default GPU), 'cpu', 'trt' (TensorRT for ONNX backend), or specific GPU device like 'cuda:0', 'cuda:1', etc. If 'cuda' is specified but no GPU is available, the framework will automatically fall back to 'cpu'. Note: 'trt' is only supported by the modelopt.onnx backend for ONNX Runtime with TensorRT execution provider.",
"pattern": "^(cuda|cpu|trt|cuda:[0-9]+)$",
"title": "Calibration device",
"type": "string"
},
"layers": {
"automl_enabled": false,
"default": [],
"description": "List of per-module quantization configurations. Each entry specifies which modules to quantize and their data types. This is the primary way to configure quantization.",
"title": "Layer quantization configs",
"type": "list"
},
"mode": {
"default": "weight_only_ptq",
"description": "The quantization mode to use",
"enum": [
"static_ptq",
"weight_only_ptq"
],
"title": "Quantization mode",
"type": "categorical"
},
"model_path": {
"default": "",
"description": "Path to the model to be quantized. For ONNX backend, path to ONNX file.",
"title": "Model path",
"type": "string"
},
"results_dir": {
"default": "",
"description": "Path to where all the assets generated from a task are stored.",
"title": "Results directory",
"type": "string"
},
"skip_names": {
"automl_enabled": false,
"default": [],
"description": "List of module/layer names or patterns to exclude from quantization",
"title": "Skip names",
"type": "list"
}
},
"required": [
"model_path",
"results_dir"
],
"type": "collection"
},
"results_dir": {
"default": "",
"description": "\n Path to where all the assets generated from a task are stored.\n ",
"title": "Results directory",
"type": "string"
},
"train": {
"automl_disabled_parameters": [
"train.gpu_ids",
"train.cudnn",
"train.freeze",
"train.optim"
],
"automl_enabled": false,
"default": {
"activation_checkpoint": true,
"checkpoint_interval": 1,
"checkpoint_interval_unit": "epoch",
"clip_grad_norm": 0.1,
"cudnn": {
"benchmark": false,
"deterministic": true
},
"distributed_strategy": "ddp",
"freeze": [],
"gpu_ids": [
0
],
"is_dry_run": false,
"num_epochs": 10,
"num_gpus": 1,
"num_nodes": 1,
"optim": {
"lr": 0.0002,
"lr_backbone": 2e-05,
"lr_decay": 0.1,
"lr_linear_proj_mult": 0.1,
"lr_scheduler": "MultiStep",
"lr_step_size": 10,
"lr_steps": [
10
],
"momentum": 0.9,
"monitor_name": "val_loss",
"optimizer": "AdamW",
"weight_decay": 0.0001
},
"precision": "fp32",
"pretrained_model_path": "",
"results_dir": "",
"resume_training_checkpoint_path": "",
"seed": 1234,
"validation_interval": 1
},
"description": "Configurable parameters to construct the trainer for a Mask Grounding DINO experiment.",
"popular": [
"optim",
"validation_interval",
"checkpoint_interval",
"num_gpus",
"num_nodes",
"num_epochs",
"gpu_ids"
],
"properties": {
"activation_checkpoint": {
"default": true,
"description": "\n A True value instructs train to recompute in backward pass to save GPU memory,\n rather than storing activations.",
"title": "enable activation checkpointing",
"type": "bool"
},
"checkpoint_interval": {
"default": 1,
"description": "The interval (in epochs) at which a checkpoint will be saved. Helps resume training.",
"minimum": 1,
"popular": true,
"title": "Checkpoint interval",
"type": "int"
},
"checkpoint_interval_unit": {
"default": "epoch",
"description": "The unit of the checkpoint interval.",
"enum": [
"epoch",
"step"
],
"title": "Checkpoint interval unit",
"type": "categorical"
},
"clip_grad_norm": {
"default": 0.1,
"description": "\n Amount to clip the gradient by L2 Norm.\n A value of 0.0 specifies no clipping.",
"math_cond": "> 0.0",
"title": "clip gradient norm",
"type": "float"
},
"cudnn": {
"automl_enabled": false,
"default": {
"benchmark": false,
"deterministic": true
},
"properties": {
"benchmark": {
"default": false,
"type": "bool"
},
"deterministic": {
"default": true,
"type": "bool"
}
},
"type": "collection"
},
"distributed_strategy": {
"default": "ddp",
"description": "\n The multi-GPU training strategy.\n DDP (Distributed Data Parallel) and Fully Sharded DDP are supported.",
"enum": [
"ddp",
"fsdp"
],
"title": "distributed_strategy",
"type": "categorical"
},
"freeze": {
"automl_enabled": false,
"default": [],
"description": "\n List of layer names to freeze.\n Example: [\"backbone\", \"transformer.encoder\", \"input_proj\"].",
"title": "freeze",
"type": "list"
},
"gpu_ids": {
"automl_enabled": false,
"default": [
0
],
"description": "\n List of GPU IDs to run the training on. The length of this list\n must be equal to the number of gpus in train.num_gpus.",
"popular": true,
"title": "GPU IDs",
"type": "list"
},
"is_dry_run": {
"default": false,
"description": "\n Whether to run the trainer in Dry Run mode. This serves\n as a good means to validate the spec file and run a sanity check on the trainer\n without actually initializing and running the trainer.",
"title": "Is dry run",
"type": "bool"
},
"num_epochs": {
"default": 10,
"description": "Number of epochs to run the training.",
"maximum": Infinity,
"minimum": 1,
"popular": true,
"title": "Number of epochs",
"type": "int"
},
"num_gpus": {
"default": 1,
"description": "The number of GPUs to run the train job.",
"minimum": 1,
"popular": true,
"title": "Number of GPUs",
"type": "int"
},
"num_nodes": {
"default": 1,
"description": "Number of nodes to run the training on. If > 1, then multi-node is enabled.",
"minimum": 1,
"popular": true,
"title": "Number of nodes",
"type": "int"
},
"optim": {
"automl_default_parameters": [
"train.optim.lr",
"train.optim.lr_backbone",
"train.optim.lr_linear_proj_mult",
"train.optim.momentum",
"train.optim.weight_decay",
"train.optim.lr_step_size",
"train.optim.lr_decay"
],
"automl_disabled_parameters": [
"train.optim.lr_steps"
],
"automl_enabled": false,
"default": {
"lr": 0.0002,
"lr_backbone": 2e-05,
"lr_decay": 0.1,
"lr_linear_proj_mult": 0.1,
"lr_scheduler": "MultiStep",
"lr_step_size": 10,
"lr_steps": [
10
],
"momentum": 0.9,
"monitor_name": "val_loss",
"optimizer": "AdamW",
"weight_decay": 0.0001
},
"description": "Hyper parameters to configure the optimizer.",
"popular": [
"momentum",
"weight_decay",
"lr_backbone",
"lr_linear_proj_mult"
],
"properties": {
"lr": {
"automl_enabled": true,
"default": 0.0002,
"description": "The initial learning rate for training the model, excluding the backbone.",
"maximum": Infinity,
"minimum": 0.0,
"title": "learning rate",
"type": "float"
},
"lr_backbone": {
"automl_enabled": true,
"default": 2e-05,
"description": "The initial learning rate for training the backbone.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "learning rate - backbone",
"type": "float"
},
"lr_decay": {
"automl_enabled": true,
"default": 0.1,
"description": "The decreasing factor for the learning rate scheduler.",
"maximum": Infinity,
"minimum": 0.0,
"title": "learning rate decay",
"type": "float"
},
"lr_linear_proj_mult": {
"automl_enabled": true,
"default": 0.1,
"description": "The initial learning rate for training the linear projection layer.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "learning rate - linear projection",
"type": "float"
},
"lr_scheduler": {
"default": "MultiStep",
"description": "The learning scheduler:\n * MultiStep : Decrease the lr by lr_decay from lr_steps\n * StepLR : Decrease the lr by lr_decay at every lr_step_size.",
"enum": [
"MultiStep",
"StepLR"
],
"title": "learning rate scheduler",
"type": "categorical"
},
"lr_step_size": {
"automl_enabled": true,
"default": 10,
"description": "The number of steps to decrease the learning rate in the StepLR.",
"maximum": Infinity,
"minimum": 0,
"title": "learning rate step size",
"type": "int"
},
"lr_steps": {
"automl_enabled": false,
"default": [
10
],
"description": "The steps at which the learning rate must be decreased.\n This is applicable only with the MultiStep LR.",
"title": "learning rate decay steps",
"type": "list"
},
"momentum": {
"automl_enabled": true,
"default": 0.9,
"description": "The momentum for the AdamW optimizer.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "momentum - AdamW",
"type": "float"
},
"monitor_name": {
"default": "val_loss",
"description": "The metric value to be monitored for the :code:`AutoReduce` Scheduler.",
"enum": [
"val_loss",
"train_loss"
],
"title": "monitor_name",
"type": "categorical"
},
"optimizer": {
"default": "AdamW",
"description": "Type of optimizer used to train the network.",
"enum": [
"AdamW",
"SGD"
],
"type": "categorical"
},
"weight_decay": {
"automl_enabled": true,
"default": 0.0001,
"description": "The weight decay coefficient.",
"maximum": Infinity,
"minimum": 0.0,
"popular": true,
"title": "weight decay",
"type": "float"
}
},
"title": "optimizer",
"type": "collection"
},
"precision": {
"default": "fp32",
"description": "Precision to run the training on.",
"enum": [
"fp16",
"fp32",
"bf16"
],
"title": "precision",
"type": "categorical"
},
"pretrained_model_path": {
"default": "",
"description": "Path to a pre-trained Deformable DETR model to initialize the current training from.",
"type": "string"
},
"results_dir": {
"default": "",
"description": "\n Path to where all the assets generated from a task are stored.\n ",
"title": "Results directory",
"type": "string"
},
"resume_training_checkpoint_path": {
"default": "",
"description": "Path to the checkpoint to resume training from.",
"title": "Resume checkpoint path",
"type": "string"
},
"seed": {
"default": 1234,
"description": "The seed for the initializer in PyTorch. If < 0, disable fixed seed.",
"maximum": Infinity,
"minimum": -1,
"title": "Seed for randomization",
"type": "int"
},
"validation_interval": {
"default": 1,
"description": "\n The interval (in epochs) at which a evaluation\n will be triggered on the validation dataset.",
"minimum": 1,
"popular": true,
"title": "Validation interval",
"type": "int"
}
},
"type": "collection"
},
"wandb": {
"automl_disabled_parameters": [
"wandb.tags"
],
"automl_enabled": false,
"default": {
"enable": true,
"entity": "",
"group": "",
"name": "TAO Toolkit Training",
"project": "TAO Toolkit",
"reinit": false,
"run_id": "",
"save_code": false,
"sync_tensorboard": false,
"tags": [
"tao-toolkit"
]
},
"properties": {
"enable": {
"default": true,
"type": "bool"
},
"entity": {
"default": "",
"type": "string"
},
"group": {
"default": "",
"type": "string"
},
"name": {
"default": "TAO Toolkit Training",
"type": "string"
},
"project": {
"default": "TAO Toolkit",
"type": "string"
},
"reinit": {
"default": false,
"type": "bool"
},
"run_id": {
"default": "",
"type": "string"
},
"save_code": {
"default": false,
"type": "bool"
},
"sync_tensorboard": {
"default": false,
"type": "bool"
},
"tags": {
"automl_enabled": false,
"default": [
"tao-toolkit"
],
"type": "list"
}
},
"type": "collection"
}
},
"required": [
"quantize"
],
"type": "object",
"x_tao_schema": {
"action": "export",
"core_module": "mask_grounding_dino",
"model": "mask-grounding-dino",
"network_arch": "mask_grounding_dino",
"schema_action": "export",
"schema_version": 1,
"source": "tao-core dataclass config"
}
}
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 Python
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-mask-grounding-dino · 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-mask-grounding-dino.zip