Tao Train Mask Auto Label
MAL (Mask Auto-Label) for weakly-supervised segmentation. Produces segmentation masks from minimal annotations
- Skill ID
- nvidia/skills/tao-train-mask-auto-label
- Publisher
- nvidia
- Repository
- skills
- Installs
- 0
- Files
- 14
- License
- Apache-2.0
- Requires
- Requires docker + nvidia-container-toolkit.
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
nvidia/skills/tao-train-mask-auto-labelInstalls these files- BENCHMARK.md
- SKILL.md
- config/skillspector-baseline.yaml
- evals/evals.json
- references/skill_info.yaml
- references/spec_template_evaluate.yaml
- references/spec_template_inference.yaml
- references/spec_template_train.yaml
- schemas/evaluate.schema.json
- schemas/inference.schema.json
- schemas/manifest.json
- schemas/train.schema.json
- skill-card.md
- skill.oms.sig
What this skill tells the agent
MAL
Standalone install? If this session was not initialized by the TAO skill bank plugin, run the tao-setup skill first (host preflight, credentials, cross-skill discovery).MAL (Mask Auto-Label) for weakly-supervised segmentation. Produces segmentation masks from minimal annotations (e.g., point or box annotations). Uses ViT-MAE backbone.
Set train.pretrained_model_path for ViT-MAE pretrained weights.
Quick Start (docker run)
Docker-native launch — no TAO SDK and no Python on the host. Use the local Docker/platform skill instead when it gives a stricter environment-specific command (non-root UID mapping, cache redirects, remote daemons).
TAO_PYT_IMAGE_DEFAULT=nvcr.io/nvidia/tao/tao-toolkit:7.2.0-pyt # versions-key: images.tao_toolkit.pyt
TAO_PYT_IMAGE="${TAO_PYT_IMAGE:-$TAO_PYT_IMAGE_DEFAULT}"
RUN_ROOT="${RUN_ROOT:-$PWD}"
DOCKER_COMMON=(
--rm --gpus all --shm-size=8g
--shm-size=8g
--ulimit memlock=-1
--ulimit stack=67108864
-v "$RUN_ROOT/data:/data:ro"
-v "$RUN_ROOT/specs:/specs:ro"
-v "$RUN_ROOT/results:/results"
)Train:
docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
mal train -e /specs/train.yamlEvaluate:
docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
mal evaluate -e /specs/evaluate.yamlInference:
docker run "${DOCKER_COMMON[@]}" "$TAO_PYT_IMAGE" \
mal inference -e /specs/inference.yamlEvery action takes its spec with -e; results_dir is set in the spec or overridden on the command line. Mount any pretrained-weights directory the spec references, and keep every in-container path consistent across actions.
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: default
- Monitoring metric: mIoU
- AutoML metric contract: Use
mIoUemitted by the evaluate action and maximize it. Compare the recorded AutoML objective with the evaluator's emittedmIoU; do not substitute training loss.
Per-Action Dataset Requirements
| Action | Spec Key | Source | Files | List? |
|---|---|---|---|---|
| evaluate | dataset.val_img_dir | eval_dataset | images.tar.gz | No |
| evaluate | dataset.val_ann_path | eval_dataset | annotations.json | No |
| inference | inference.img_dir | inference_dataset | images.tar.gz | No |
| inference | inference.ann_path | inference_dataset | annotations.json | No |
| train | dataset.train_img_dir | train_datasets | images.tar.gz | No |
| train | dataset.train_ann_path | train_datasets | annotations.json | No |
| train | dataset.val_img_dir | eval_dataset | images.tar.gz | No |
| train | dataset.val_ann_path | eval_dataset | annotations.json | 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. MAL expects COCO-style annotation JSON plus image paths that match the JSON file_name entries after the data source is prepared. Archive-only CSV/image datasets are not compatible unless they are converted to this format first.
S3_TRAIN = "s3://bucket/data/train"
S3_EVAL = "s3://bucket/data/eval"train (mandatory data sources):
{
"train.num_gpus": 1,
"train.gpu_ids": [
0
],
"train.num_epochs": 5,
"train.checkpoint_interval": 5,
"train.validation_interval": 5,
"dataset.train_img_dir": f"{S3_TRAIN}/images.tar.gz",
"dataset.train_ann_path": f"{S3_TRAIN}/annotations.json",
"dataset.val_img_dir": f"{S3_EVAL}/images.tar.gz",
"dataset.val_ann_path": f"{S3_EVAL}/annotations.json",
}evaluate (mandatory data sources):
{
"evaluate.checkpoint": "<selected train/AutoML checkpoint>",
"dataset.val_img_dir": f"{S3_EVAL}/images.tar.gz",
"dataset.val_ann_path": f"{S3_EVAL}/annotations.json",
}inference (mandatory data sources):
{
"inference.checkpoint": "<selected train/AutoML checkpoint>",
"inference.img_dir": f"{S3_EVAL}/images.tar.gz",
"inference.ann_path": f"{S3_EVAL}/annotations.json",
}For checkpoint-dependent actions, use the model resolver declared in references/skill_info.yaml. Select the exact epoch/step checkpoint requested by the user or the best checkpoint when a best-checkpoint action is requested. The mal_model_latest.pth symlink is only appropriate when the user explicitly asks for the latest checkpoint.
Eval Dataset
Optional. Val images and annotations configured alongside train paths.
Important Parameters
- model.arch: ViT-MAE backbone variant. Default vit-mae-base/16. Avoid
vit-deit-tiny/16; the current runtime rejects tiny ViT variants. - train.lr: Learning rate. Default 1e-6 (very low — fine-tuning ViT).
- dataset.crop_size: Training crop size. Default 512. Use this key, not
model.crop_size. - train.warmup_epochs: Warmup epochs before full learning rate.
- dataset.load_mask: Whether annotations contain pre-computed segmentation masks. Set this to
falsefor COCO annotations that contain boxes but nosegmentationfields when performing training or inference without mask ground truth. Keep ittruewhen every annotation contains segmentation data. AutoML validation that selects bymIoUrequires segmentation ground truth anddataset.load_mask: true; bbox-only evaluation emits non-finitemIoUand must not be accepted as a valid AutoML objective.
AutoML / HPO Notes
For MAL AutoML launches, keep the default smoke search space narrow and pass automl_hyperparameters=["train.lr", "train.wd"]. Use conservative Bayesian ranges around the ViT-MAE fine-tuning defaults, for example train.lr from 1e-7 to 1e-5 and train.wd from 1e-5 to 1e-2. The packaged train schema marks these two parameters as the default AutoML
More from nvidia
Use this skill in a project
Open any RiverX project, search the Skills panel for nvidia/skills/tao-train-mask-auto-label, and install it in one click.
