[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A76TRESVVHGNJV4FD6AF8K":3,"skill-same:01M7A76TRESVVHGNJV4FD6AF8K":121},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M7A76TRESVVHGNJV4FD6AF8K","tao-train-deformable-detr",null,"Deformable DETR for 2D object detection. Uses deformable attention for efficient multi-scale feature processing, lighter than DINO with competitive accuracy. Use when training, evaluating, exporting, quantizing, or running inference for a TAO Deformable-DETR model. Trigger phrases include \"train deformable-detr\", \"Deformable DETR object detection\", \"lightweight DETR detector\".","themusebook\u002Fskills","themusebook","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F349927247?v=4","01M7A5C1RV5S3V5FF6ZACVDNRN","musebook","01M7A5C1SFC3KRZAXNN60XJ7KM",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tao-train-deformable-detr\ndescription: Deformable DETR for 2D object detection. Uses deformable attention for efficient multi-scale feature processing,\n  lighter than DINO with competitive accuracy. Use when training, evaluating, exporting, quantizing, or running inference for\n  a TAO Deformable-DETR model. Trigger phrases include \"train deformable-detr\", \"Deformable DETR object detection\",\n  \"lightweight DETR detector\".\nlicense: Apache-2.0\ncompatibility: Requires docker + nvidia-container-toolkit.\nmetadata:\n  version: \"0.1.0\"\n  author: NVIDIA Corporation\nallowed-tools: Read Bash\ntags:\n- object\n- detection\n---\n\n# Deformable DETR\n\nDeformable DETR for 2D object detection. Uses deformable attention for efficient multi-scale feature processing. Lighter than DINO with competitive accuracy.\n\nUses pretrained weights. Set `model.pretrained_backbone_path` for backbone-only\nloading or `train.pretrained_model_path` for full model initialization.\n\nSupported parent model actions are `train`, `evaluate`, `inference`, `export`, and `quantize`. The PyT model container does not support a native `gen_trt_engine` subtask for this network. The `gen_trt_engine` action declared in `references\u002Fskill_info.yaml` must run with the TAO Deploy container. Deploy spec templates live in this skill's `references\u002F` folder with the `spec_template_deploy_*.yaml` prefix.\n\n## Dataclass Schemas\n\nGenerated TAO Core schemas are packaged in `schemas\u002F\u003Caction>.schema.json`, with `schemas\u002Fmanifest.json` listing available actions. Each generated schema also emits `references\u002Fspec_template_\u003Caction>.yaml` from the schema top-level `default` field. AutoML enablement is declared at the model layer in `references\u002Fskill_info.yaml` via `automl_enabled`. Runnable AutoML still requires `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` to exist and parse. Use the packaged train schema for `automl_default_parameters`, `automl_disabled_parameters`, defaults, min\u002Fmax bounds, enums, option weights, math conditions, dependencies, and popular parameters. Do not expect `~\u002Ftao-core` at runtime; maintainers regenerate schemas\u002Ftemplates before packaging the skill bank.\n\n## Train Action Policy\n\nThis model is AutoML-enabled at the model layer. Before handling any train-stage request, read `references\u002Fskill_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` \u002F `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\u002Ftrain.schema.json` and `references\u002Fspec_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\u002Fapplication overrides for datasets, specs, output directories, GPU\u002Fplatform settings, parent checkpoints, and `automl_policy`. Use direct model training only when `automl_policy: off` or the packaged train schema\u002Ftemplate is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.\n\nNon-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.\n\n## Training Requirements\n\n- **Dataset type:** object_detection\n- **Formats:** coco, coco_raw\n- **Monitoring metric:** val_mAP50 for AP50; `val_mAP` for COCO\u002Fpaper-style benchmark comparisons.\n\n### Per-Action Dataset Requirements\n\n| Action | Spec Key | Source | Files | List? |\n|---|---|---|---|---|\n| evaluate | dataset.test_data_sources.image_dir | eval_dataset | images.tar.gz | No |\n| evaluate | dataset.test_data_sources.json_file | eval_dataset | annotations.json | No |\n| export | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| export | dataset.val_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| inference | dataset.infer_data_sources.image_dir | inference_dataset | images.tar.gz | Yes |\n| inference | dataset.infer_data_sources.classmap | inference_dataset | label_map.txt | No |\n| quantize | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| quantize | dataset.val_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| quantize | dataset.quant_calibration_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | No |\n| train | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| train | dataset.val_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n\n### Typical Spec Overrides\n\nData 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`.\n\n```python\nS3_TRAIN = \"s3:\u002F\u002Fbucket\u002Fdata\u002Ftrain\"\nS3_EVAL = \"s3:\u002F\u002Fbucket\u002Fdata\u002Feval\"\n```\n\n**train (mandatory data sources):**\n```python\n{\n    \"train.num_epochs\": 10,\n    \"train.checkpoint_interval\": 10,\n    \"train.validation_interval\": 10,\n    \"train.num_gpus\": 1,\n    \"train.gpu_ids\": [0],\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.eval_class_ids\": [1, 2, \"...\"],\n    \"dataset.train_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.val_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n}\n```\n\n**evaluate (mandatory data sources):**\n```python\n{\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.eval_class_ids\": [1, 2, \"...\"],\n    \"dataset.test_data_sources.image_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.test_data_sources.json_file\": f\"{S3_EVAL}\u002Fannotations.json\",\n}\n```\n\nIf the train or AutoML run changed architecture-affecting fields such as\n`model.enc_layers`, `model.dec_layers`, `model.num_queries`, or\n`model.num_select`, carry the same values into evaluate, export, inference, and\ndeploy actions with the selected checkpoint. In addition to the fields above,\ncarry `model.num_feature_levels`, `model.dim_feedforward`, input image\ndimensions, and dataset class metadata when they were changed. Loading a\ncheckpoint into the default architecture can fail with tensor shape mismatches,\nespecially when smoke-test runs shrink the transformer for speed.\n\n**export (mandatory data sources):**\n```python\n{\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.eval_class_ids\": [1, 2, \"...\"],\n    \"dataset.train_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.val_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n}\n```\n\n**TensorRT engine generation:**\n\nUse the deploy spec templates after `export`. Do not call `deformable_detr\ngen_trt_engine` from the parent PyT model container; that CLI advertises\n`convert`, `evaluate`, `export`, `inference`, `quantize`, `train`, and\n`default_specs`, but not `gen_trt_engine`. The model action metadata selects the\nTAO Deploy container for engine generation.\n\nDeploy engine generation needs the exported ONNX file as input and creates the\nengine at `gen_trt_engine.trt_engine`.\n\n```python\n{\n    \"gen_trt_engine.tensorrt.data_type\": \"FP16\",\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"gen_trt_engine.tensorrt.calibration.cal_image_dir\": [f\"{S3_TRAIN}\u002Fimages.tar.gz\"],\n}\n```\n\n**inference (mandatory data sources):**\n```python\n{\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.infer_data_sources.image_dir\": [f\"{S3_EVAL}\u002Fimages.tar.gz\"],\n    \"dataset.infer_data_sources.classmap\": f\"{S3_EVAL}\u002Flabel_map.txt\",\n}\n```\n\n**quantize (mandatory data sources):**\n```python\n{\n    \"dataset.train_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.val_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.quant_calibration_data_sources\": {\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"},\n}\n```\n## Eval Dataset\n\nOptional. If provided, validation mAP is computed at each checkpoint interval.\n\n## Checkpoint Handling\n\nTraining emits epoch-and-step checkpoints using the pattern\n`model_epoch_\u003Cepoch>_step_\u003Cstep>.pth`, plus a `dd_model_latest.pth` symlink. For\ndependent actions, use the model-specific or SDK-provided checkpoint resolver to\nselect the intended artifact. Evaluation, inference, export, and quantize should\nreceive the selected exact checkpoint path, not the `dd_model_latest.pth` symlink,\nunless the user explicitly asked for latest. Resume\u002Fretrain should set\n`train.resume_training_checkpoint_path` to the exact checkpoint being resumed\nfrom.\n\n## Important Parameters\n\n- **dataset.num_classes**: Number of object classes plus the background class. Default 91 (COCO). Must match annotations.\n- **dataset.eval_class_ids**: Foreground category ids to include in COCO metrics. Set this to every object category id in custom datasets; the template default evaluates class id 1 only.\n- **model.backbone**: Default resnet_50. Supported: resnet_50, gcvit_tiny, gcvit_small, gcvit_base, gcvit_large, gcvit_large_384 (more limited than DINO).\n- **train.optim.lr**: Learning rate. Default 2e-4 (AdamW). lr_backbone is 2e-5.\n- **train.optim.lr_steps**: MultiStep LR schedule. Default [40]. For short runs, set to match ~80% of total epochs.\n- **model.num_queries**: Number of object queries. Default 300. Valid range 100-900.\n- **model.dropout_ratio**: Dropout in transformer layers. Default 0.3 (higher than DINO's 0.0). Reduce for large datasets, increase for small datasets.\n- **model.dim_feedforward**: FFN hidden dim. Default 1024 (vs DINO's 2048). Increasing improves capacity but costs memory.\n\n## Multi-GPU \u002F Multi-Node\n\n**Launch method:** Lightning-managed (single `python` process, Lightning spawns workers).\n\n| Spec Key | Description | Default |\n|----------|-------------|---------|\n| `train.num_gpus` | Number of GPUs | 1 |\n| `train.gpu_ids` | GPU device indices | [0] |\n| `train.num_nodes` | Number of nodes | 1 |\n| `train.distributed_strategy` | `ddp` or `fsdp` | `ddp` |\n\nSame DDP\u002FFSDP behavior as DINO. Multi-node requires `WORLD_SIZE`, `NODE_RANK`, `MASTER_ADDR`, `MASTER_PORT` env vars set by orchestrator.\n\nWhen increasing `train.num_gpus`, also set `train.gpu_ids` to the same visible\ndevice range. For example, an 8-GPU single-node Slurm run must include both\n`\"train.num_gpus\": 8` and `\"train.gpu_ids\": [0, 1, 2, 3, 4, 5, 6, 7]`.\n\n## Export \u002F TRT Defaults\n\n- Export input: 640x640, opset 17\n- TRT data types: FP32, FP16, INT8\n- TRT workspace: 1024 MB\n- TRT max_batch_size: 1\n\n## Hardware\n\nMinimum 1 GPU(s), recommended 4 GPU(s). 16GB+ (V100 or A100) VRAM per GPU. Slightly lighter than DINO due to smaller FFN. batch_size=4 fits on most 16GB+ GPUs.\n\n## Error Patterns\n\n**CUDA out of memory**: Reduce batch_size (4 -> 2 -> 1).\n\n**num_select must be \u003C num_queries * num_classes**: Same constraint as DINO.\n\n**return_interm_indices length must match num_feature_levels**: Default [1,2,3,4] with num_feature_levels=4.\n\n**Dataset size smaller than total batch size**: Reduce batch_size or num_gpus.\n\n**AutoML metric extraction**: Deformable DETR emits detection metrics in structured training status and logs. For COCO\u002Fpaper-style benchmark comparisons, optimize `val_mAP` with `direction: maximize`; for explicit AP50 workflows, optimize `val_mAP50`. Prefer `results_dir\u002Ftrain\u002Fstatus.json` or AutoML result state before parsing raw logs. Do not optimize `val_loss` for default detection model invocations.\n\n## Spec Param \u002F Parent Model Inference\n\nModel-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.\n\nInference mappings from TAO Core `deformable_detr.config.json`:\n\n| Action | Spec Field | Inference Function | Meaning |\n|---|---|---|---|\n| evaluate | `encryption_key` | `key` | encryption key |\n| evaluate | `evaluate.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| evaluate | `evaluate.trt_engine` | `parent_model` | model file inferred from the parent job results folder |\n| evaluate | `results_dir` | `output_dir` | current job results directory |\n| export | `encryption_key` | `key` | encryption key |\n| export | `export.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| export | `export.onnx_file` | `create_onnx_file` | output ONNX path |\n| export | `results_dir` | `output_dir` | current job results directory |\n| inference | `encryption_key` | `key` | encryption key |\n| inference | `inference.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `inference.trt_engine` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `results_dir` | `output_dir` | current job results directory |\n| quantize | `encryption_key` | `key` | encryption key |\n| quantize | `quantize.model_path` | `parent_model` | model file inferred from the parent job results folder |\n| quantize | `results_dir` | `output_dir` | current job results directory |\n| train | `encryption_key` | `key` | encryption key |\n| train | `model.pretrained_backbone_path` | `ptm_if_no_resume_model` | PTM when no resume checkpoint exists |\n| train | `results_dir` | `output_dir` | current job results directory |\n| train | `train.pretrained_model_path` | `ptm_if_no_resume_model` | full model PTM when no resume checkpoint exists |\n| train | `train.resume_training_checkpoint_path` | `resume_model` | model file inferred from the current job results folder |\n\nFor `parent_model` or `parent_model_folder`, pass the upstream train\u002Fexport\u002FAutoML 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.\n\n## Deployment\n\n- [tao-deploy-deformable-detr](references\u002Ftao-deploy-deformable-detr.md)\n","# Deformable DETR\n\nDeformable DETR for 2D object detection. Uses deformable attention for efficient multi-scale feature processing. Lighter than DINO with competitive accuracy.\n\nUses pretrained weights. Set `model.pretrained_backbone_path` for backbone-only\nloading or `train.pretrained_model_path` for full model initialization.\n\nSupported parent model actions are `train`, `evaluate`, `inference`, `export`, and `quantize`. The PyT model container does not support a native `gen_trt_engine` subtask for this network. The `gen_trt_engine` action declared in `references\u002Fskill_info.yaml` must run with the TAO Deploy container. Deploy spec templates live in this skill's `references\u002F` folder with the `spec_template_deploy_*.yaml` prefix.\n\n## Dataclass Schemas\n\nGenerated TAO Core schemas are packaged in `schemas\u002F\u003Caction>.schema.json`, with `schemas\u002Fmanifest.json` listing available actions. Each generated schema also emits `references\u002Fspec_template_\u003Caction>.yaml` from the schema top-level `default` field. AutoML enablement is declared at the model layer in `references\u002Fskill_info.yaml` via `automl_enabled`. Runnable AutoML still requires `schemas\u002Ftrain.schema.json` and `references\u002Fspec_template_train.yaml` to exist and parse. Use the packaged train schema for `automl_default_parameters`, `automl_disabled_parameters`, defaults, min\u002Fmax bounds, enums, option weights, math conditions, dependencies, and popular parameters. Do not expect `~\u002Ftao-core` at runtime; maintainers regenerate schemas\u002Ftemplates before packaging the skill bank.\n\n## Train Action Policy\n\nThis model is AutoML-enabled at the model layer. Before handling any train-stage request, read `references\u002Fskill_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` \u002F `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\u002Ftrain.schema.json` and `references\u002Fspec_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\u002Fapplication overrides for datasets, specs, output directories, GPU\u002Fplatform settings, parent checkpoints, and `automl_policy`. Use direct model training only when `automl_policy: off` or the packaged train schema\u002Ftemplate is missing; in the missing-schema case, report that AutoML is enabled but not runnable for this model until schemas are generated.\n\nNon-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.\n\n## Training Requirements\n\n- **Dataset type:** object_detection\n- **Formats:** coco, coco_raw\n- **Monitoring metric:** val_mAP50 for AP50; `val_mAP` for COCO\u002Fpaper-style benchmark comparisons.\n\n### Per-Action Dataset Requirements\n\n| Action | Spec Key | Source | Files | List? |\n|---|---|---|---|---|\n| evaluate | dataset.test_data_sources.image_dir | eval_dataset | images.tar.gz | No |\n| evaluate | dataset.test_data_sources.json_file | eval_dataset | annotations.json | No |\n| export | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| export | dataset.val_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| inference | dataset.infer_data_sources.image_dir | inference_dataset | images.tar.gz | Yes |\n| inference | dataset.infer_data_sources.classmap | inference_dataset | label_map.txt | No |\n| quantize | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| quantize | dataset.val_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| quantize | dataset.quant_calibration_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | No |\n| train | dataset.train_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n| train | dataset.val_data_sources | train_datasets | image_dir: images.tar.gz, json_file: annotations.json | Yes |\n\n### Typical Spec Overrides\n\nData 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`.\n\n```python\nS3_TRAIN = \"s3:\u002F\u002Fbucket\u002Fdata\u002Ftrain\"\nS3_EVAL = \"s3:\u002F\u002Fbucket\u002Fdata\u002Feval\"\n```\n\n**train (mandatory data sources):**\n```python\n{\n    \"train.num_epochs\": 10,\n    \"train.checkpoint_interval\": 10,\n    \"train.validation_interval\": 10,\n    \"train.num_gpus\": 1,\n    \"train.gpu_ids\": [0],\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.eval_class_ids\": [1, 2, \"...\"],\n    \"dataset.train_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.val_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n}\n```\n\n**evaluate (mandatory data sources):**\n```python\n{\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.eval_class_ids\": [1, 2, \"...\"],\n    \"dataset.test_data_sources.image_dir\": f\"{S3_EVAL}\u002Fimages.tar.gz\",\n    \"dataset.test_data_sources.json_file\": f\"{S3_EVAL}\u002Fannotations.json\",\n}\n```\n\nIf the train or AutoML run changed architecture-affecting fields such as\n`model.enc_layers`, `model.dec_layers`, `model.num_queries`, or\n`model.num_select`, carry the same values into evaluate, export, inference, and\ndeploy actions with the selected checkpoint. In addition to the fields above,\ncarry `model.num_feature_levels`, `model.dim_feedforward`, input image\ndimensions, and dataset class metadata when they were changed. Loading a\ncheckpoint into the default architecture can fail with tensor shape mismatches,\nespecially when smoke-test runs shrink the transformer for speed.\n\n**export (mandatory data sources):**\n```python\n{\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.eval_class_ids\": [1, 2, \"...\"],\n    \"dataset.train_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.val_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n}\n```\n\n**TensorRT engine generation:**\n\nUse the deploy spec templates after `export`. Do not call `deformable_detr\ngen_trt_engine` from the parent PyT model container; that CLI advertises\n`convert`, `evaluate`, `export`, `inference`, `quantize`, `train`, and\n`default_specs`, but not `gen_trt_engine`. The model action metadata selects the\nTAO Deploy container for engine generation.\n\nDeploy engine generation needs the exported ONNX file as input and creates the\nengine at `gen_trt_engine.trt_engine`.\n\n```python\n{\n    \"gen_trt_engine.tensorrt.data_type\": \"FP16\",\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"gen_trt_engine.tensorrt.calibration.cal_image_dir\": [f\"{S3_TRAIN}\u002Fimages.tar.gz\"],\n}\n```\n\n**inference (mandatory data sources):**\n```python\n{\n    \"dataset.num_classes\": \"\u003Cobject classes> + 1\",\n    \"dataset.infer_data_sources.image_dir\": [f\"{S3_EVAL}\u002Fimages.tar.gz\"],\n    \"dataset.infer_data_sources.classmap\": f\"{S3_EVAL}\u002Flabel_map.txt\",\n}\n```\n\n**quantize (mandatory data sources):**\n```python\n{\n    \"dataset.train_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.val_data_sources\": [{\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"}],\n    \"dataset.quant_calibration_data_sources\": {\"image_dir\": f\"{S3_TRAIN}\u002Fimages.tar.gz\", \"json_file\": f\"{S3_TRAIN}\u002Fannotations.json\"},\n}\n```\n## Eval Dataset\n\nOptional. If provided, validation mAP is computed at each checkpoint interval.\n\n## Checkpoint Handling\n\nTraining emits epoch-and-step checkpoints using the pattern\n`model_epoch_\u003Cepoch>_step_\u003Cstep>.pth`, plus a `dd_model_latest.pth` symlink. For\ndependent actions, use the model-specific or SDK-provided checkpoint resolver to\nselect the intended artifact. Evaluation, inference, export, and quantize should\nreceive the selected exact checkpoint path, not the `dd_model_latest.pth` symlink,\nunless the user explicitly asked for latest. Resume\u002Fretrain should set\n`train.resume_training_checkpoint_path` to the exact checkpoint being resumed\nfrom.\n\n## Important Parameters\n\n- **dataset.num_classes**: Number of object classes plus the background class. Default 91 (COCO). Must match annotations.\n- **dataset.eval_class_ids**: Foreground category ids to include in COCO metrics. Set this to every object category id in custom datasets; the template default evaluates class id 1 only.\n- **model.backbone**: Default resnet_50. Supported: resnet_50, gcvit_tiny, gcvit_small, gcvit_base, gcvit_large, gcvit_large_384 (more limited than DINO).\n- **train.optim.lr**: Learning rate. Default 2e-4 (AdamW). lr_backbone is 2e-5.\n- **train.optim.lr_steps**: MultiStep LR schedule. Default [40]. For short runs, set to match ~80% of total epochs.\n- **model.num_queries**: Number of object queries. Default 300. Valid range 100-900.\n- **model.dropout_ratio**: Dropout in transformer layers. Default 0.3 (higher than DINO's 0.0). Reduce for large datasets, increase for small datasets.\n- **model.dim_feedforward**: FFN hidden dim. Default 1024 (vs DINO's 2048). Increasing improves capacity but costs memory.\n\n## Multi-GPU \u002F Multi-Node\n\n**Launch method:** Lightning-managed (single `python` process, Lightning spawns workers).\n\n| Spec Key | Description | Default |\n|----------|-------------|---------|\n| `train.num_gpus` | Number of GPUs | 1 |\n| `train.gpu_ids` | GPU device indices | [0] |\n| `train.num_nodes` | Number of nodes | 1 |\n| `train.distributed_strategy` | `ddp` or `fsdp` | `ddp` |\n\nSame DDP\u002FFSDP behavior as DINO. Multi-node requires `WORLD_SIZE`, `NODE_RANK`, `MASTER_ADDR`, `MASTER_PORT` env vars set by orchestrator.\n\nWhen increasing `train.num_gpus`, also set `train.gpu_ids` to the same visible\ndevice range. For example, an 8-GPU single-node Slurm run must include both\n`\"train.num_gpus\": 8` and `\"train.gpu_ids\": [0, 1, 2, 3, 4, 5, 6, 7]`.\n\n## Export \u002F TRT Defaults\n\n- Export input: 640x640, opset 17\n- TRT data types: FP32, FP16, INT8\n- TRT workspace: 1024 MB\n- TRT max_batch_size: 1\n\n## Hardware\n\nMinimum 1 GPU(s), recommended 4 GPU(s). 16GB+ (V100 or A100) VRAM per GPU. Slightly lighter than DINO due to smaller FFN. batch_size=4 fits on most 16GB+ GPUs.\n\n## Error Patterns\n\n**CUDA out of memory**: Reduce batch_size (4 -> 2 -> 1).\n\n**num_select must be \u003C num_queries * num_classes**: Same constraint as DINO.\n\n**return_interm_indices length must match num_feature_levels**: Default [1,2,3,4] with num_feature_levels=4.\n\n**Dataset size smaller than total batch size**: Reduce batch_size or num_gpus.\n\n**AutoML metric extraction**: Deformable DETR emits detection metrics in structured training status and logs. For COCO\u002Fpaper-style benchmark comparisons, optimize `val_mAP` with `direction: maximize`; for explicit AP50 workflows, optimize `val_mAP50`. Prefer `results_dir\u002Ftrain\u002Fstatus.json` or AutoML result state before parsing raw logs. Do not optimize `val_loss` for default detection model invocations.\n\n## Spec Param \u002F Parent Model Inference\n\nModel-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.\n\nInference mappings from TAO Core `deformable_detr.config.json`:\n\n| Action | Spec Field | Inference Function | Meaning |\n|---|---|---|---|\n| evaluate | `encryption_key` | `key` | encryption key |\n| evaluate | `evaluate.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| evaluate | `evaluate.trt_engine` | `parent_model` | model file inferred from the parent job results folder |\n| evaluate | `results_dir` | `output_dir` | current job results directory |\n| export | `encryption_key` | `key` | encryption key |\n| export | `export.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| export | `export.onnx_file` | `create_onnx_file` | output ONNX path |\n| export | `results_dir` | `output_dir` | current job results directory |\n| inference | `encryption_key` | `key` | encryption key |\n| inference | `inference.checkpoint` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `inference.trt_engine` | `parent_model` | model file inferred from the parent job results folder |\n| inference | `results_dir` | `output_dir` | current job results directory |\n| quantize | `encryption_key` | `key` | encryption key |\n| quantize | `quantize.model_path` | `parent_model` | model file inferred from the parent job results folder |\n| quantize | `results_dir` | `output_dir` | current job results directory |\n| train | `encryption_key` | `key` | encryption key |\n| train | `model.pretrained_backbone_path` | `ptm_if_no_resume_model` | PTM when no resume checkpoint exists |\n| train | `results_dir` | `output_dir` | current job results directory |\n| train | `train.pretrained_model_path` | `ptm_if_no_resume_model` | full model PTM when no resume checkpoint exists |\n| train | `train.resume_training_checkpoint_path` | `resume_model` | model file inferred from the current job results folder |\n\nFor `parent_model` or `parent_model_folder`, pass the upstream train\u002Fexport\u002FAutoML 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.\n\n## Deployment\n\n- [tao-deploy-deformable-detr](references\u002Ftao-deploy-deformable-detr.md)\n",{"name":5,"tags":24,"license":15,"metadata":27,"description":7,"allowed-tools":30,"compatibility":31},[25,26],"object","detection",{"author":28,"version":29},"NVIDIA Corporation","0.1.0","Read Bash","Requires docker + nvidia-container-toolkit.","main","1c523aba5cdf867a79f078847075492d7778092a","public\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr",1,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002Fthemusebook","https:\u002F\u002Fmusebook.trade","The official Github of musebook","2026-11-02 23:42:26",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add themusebook\u002Fskills --skill tao-train-deformable-detr",{"tool":48,"command":49},"bunx","bunx skills add themusebook\u002Fskills --skill tao-train-deformable-detr",{"tool":51,"command":52},"pnpm","pnpm dlx skills add themusebook\u002Fskills --skill tao-train-deformable-detr","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002FSKILL.md",true,[56,62,66,70,74,78,82,86,90,94,98,102,105,109,113,117],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"BENCHMARK.md","REFERENCE","参考文档",4108,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002FBENCHMARK.md",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"metadata.json",610,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Fmetadata.json",{"path":67,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fskill_info.yaml",4583,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fskill_info.yaml",{"path":71,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fspec_template_deploy_evaluate.yaml",438,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_deploy_evaluate.yaml",{"path":75,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fspec_template_deploy_gen_trt_engine.yaml",698,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_deploy_gen_trt_engine.yaml",{"path":79,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fspec_template_deploy_inference.yaml",449,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_deploy_inference.yaml",{"path":83,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fspec_template_evaluate.yaml",2902,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_evaluate.yaml",{"path":87,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fspec_template_export.yaml",2999,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_export.yaml",{"path":91,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fspec_template_gen_trt_engine.yaml",3149,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_gen_trt_engine.yaml",{"path":95,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fspec_template_inference.yaml",2982,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_inference.yaml",{"path":99,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fspec_template_quantize.yaml",2754,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_quantize.yaml",{"path":103,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":100,"sourceHtmlUrl":104},"references\u002Fspec_template_train.yaml","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Fspec_template_train.yaml",{"path":106,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Ftao-deploy-deformable-detr.md",5467,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Ftao-deploy-deformable-detr.md",{"path":110,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Ftao-deploy-deformable-detr.skill_info.yaml",2422,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Freferences\u002Ftao-deploy-deformable-detr.skill_info.yaml",{"path":114,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":115,"sourceHtmlUrl":116},"skill-card.md",3862,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Fskill-card.md",{"path":118,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":119,"sourceHtmlUrl":120},"verification.json",3808,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Ftao-train-deformable-detr\u002Fverification.json",[122,131,138,145,152,159],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":126,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":19},"01M7AB34SPKVSDRRG009PM1CZH","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","MIT","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":126,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":19},"01M7AB18BH6N7KR7939HRNWVMQ","viem-integration","Integrate EVM blockchains using viem. Use when user says \"read blockchain data\", \"send transaction\", \"interact with smart contract\", \"connect to Ethereum\", \"use viem\", \"use wagmi\", \"wallet integration\", \"viem setup\", or mentions blockchain\u002FEVM development with TypeScript.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fviem-integration\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":126,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":19},"01M7AB12GHGP48WCNXDQQ9222H","v4-security-foundations","Security-first Uniswap v4 hook development. Use when user mentions \"v4 hooks\", \"hook security\", \"PoolManager\", \"beforeSwap\", \"afterSwap\", or asks about V4 hook best practices, vulnerabilities, or audit requirements.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-security-foundations\u002FSKILL.md",[],[],{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":126,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":19},"01M7AB0XM3PSR7V3Q2ZRR0Q0FB","v4-sdk-integration","App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about \"v4 sdk\", \"uniswap v4\", \"v4 swap\", \"v4 liquidity\", \"PoolManager\", \"V4Planner\", \"StateView\", \"PositionManager\", \"pool state\", \"v4 position\", \"uniswap sdk\", or when building swap\u002Fliquidity UX directly with SDKs rather than via the Trading API.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-sdk-integration\u002FSKILL.md",[],[],{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":126,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":19},"01M7AB0SGA93ASA588DJW4P9WT","v4-hook-generator","Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-hook-generator\u002FSKILL.md",[],[],{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":126,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":19},"01M7AAZYH75H4CS03WSW2EZ8DM","testing","For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002FSKILL.md",[],[]]