MCPInstall

tao-train-ocdnet

by nvidia OfficialAI & Agents

OCDNet for scene text detection. Detects arbitrary-oriented text regions in natural images using a differentiable binarization approach. Use when training, evaluating, exporting, pruning, quantizing, retraining, or running inference for a TAO OCDNet model. Trigger phrases include "train OCDNet", "scene text detection", "arbitrary-oriented text boxes", "differentiable binarization detector".

Installs
1.6K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/nvidia/skills --skill tao-train-ocdnet
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads tao-train-ocdnet automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

OCDNet

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).

OCDNet for scene text detection. Detects arbitrary-oriented text regions in natural images using a differentiable binarization approach.

Set model.pretrained_model_path for pretrained weights.

For TAO Deploy TensorRT actions (gen_trt_engine, TensorRT evaluate, and TensorRT inference), read references/tao-deploy-ocdnet.md first. Deploy spec templates live in this skill's references/ folder with the spec_template_deploy_*.yaml prefix.

The PyT OCDNet CLI supports train, evaluate, export, inference, prune, quantize, and default_specs. It does not expose PyT-side retrain or gen_trt_engine subcommands. The model skill exposes retrain by running ocdnet train with model.load_pruned_graph: true and model.pruned_graph_path. Resume from an epoch checkpoint uses ocdnet train plus train.resume_training_checkpoint_path. TensorRT engine generation is owned by the deploy workflow.

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.

For AutoML train, use train_loss_epoch or train_loss as the optimization metric with direction=minimize. The Lightning progress log emits train_loss_epoch, and TAO status.json records the same final value under train_loss. For one-epoch local AutoML smoke runs, set train.lr_scheduler.args.warmup_epoch: 0; leaving warmup equal to the epoch budget causes the trainer to fail before a recommendation can report a metric. 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: ocdnet
  • Formats: default
  • AutoML training metric: train_loss (the status logger's final train_loss_epoch value), with direction=minimize
  • AutoML metric contract: Use train_loss emitted during training and minimize it. Treat train_loss_epoch as a log fallback alias only; use standalone hmean solely to validate the selected checkpoint.
  • Standalone evaluation metric: hmean, with direction=maximize

Per-Action Dataset Requirements

ActionSpec KeySourceRuntime valueList?
evaluatedataset.validate_dataset.data_patheval_datasetextracted validation split folder with img/ and gt/Yes
inferenceinference.input_folderinference_dataset or eval_datasetextracted image folderNo
prunedataset.validate_dataset.data_patheval_datasetextracted validation split folder with img/ and gt/Yes
quantizedataset.train_dataset.data_pathtrain_datasetsextracted train split folder with img/ and gt/Yes
quantizedataset.validate_dataset.data_patheval_datasetextracted validation split folder with img/ and gt/Yes
quantizedataset.quant_calibration_dataset.images_dirtrain_datasets or calibration_datasetextracted calibration image folderNo
traindataset.train_dataset.data_pathtrain_datasetsextracted train split folder with img/ and gt/Yes
traindataset.validate_dataset.data_patheval_datasetextracted validation split folder with img/ and gt/Yes
retraindataset.train_dataset.data_pathtrain_datasetsextracted train split folder with img/ and gt/Yes
retraindataset.validate_dataset.data_patheval_datasetextracted validation split folder with img/ and gt/Yes

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. OCDNet does not unpack dataset archives at runtime. If the source is train.tar.gz, test.tar.gz, or img.tar.gz, extract it first and pass the split folder or image folder into the spec. The split folder must contain img/ and gt/; alternatively, pass a UTF-8 datalist text file whose lines map image paths to label paths.

TRAIN_ROOT = "/path/to/extracted/train"
EVAL_ROOT = "/path/to/extracted/test"
INFER_IMG_DIR = "/path/to/extracted/test/img"
CALIB_IMG_DIR = "/path/to/extracted/train/img"

train (mandatory data sources):

{
    "train.num_epochs": 30,
    "train.checkpoint_interval": 10,
    "train.validation_interval": 10,
    "train.num_gpus": 1,
    "dataset.train_dataset.loader.batch_size": 16,
    "dataset.train_dataset.data_path": [TRAIN_ROOT],
    "dataset.validate_dataset.data_path": [EVAL_ROOT],
}

evaluate (mandatory data sources):

{
    "evaluate.checkpoint": "<selected train/AutoML checkpoint>",
    "dataset.validate_dataset.data_path": [EVAL_ROOT],
}

inference (mandatory data sources):

{
    "inference.checkpoint": "<selected train/AutoML checkpoint>",
    "inference.input_folder": INFER_IMG_DIR,
}

prune (mandatory data sources):

{
    "prune.checkpoint": "<selected train/AutoML checkpoint>",
    "dataset.validate_dataset.data_path": [EVAL_ROOT],
}

quantize (mandatory data sources):

{
    "quantize.model_path": "<selected train checkpoint or exported ONNX>",
    "dataset.train_dataset.data_path": [TRAIN_ROOT],
    "dataset.validate_dataset.data_path": [EVAL_ROOT],
    "dataset.quant_calibration_dataset.images_dir": CALIB_IMG_DIR,
}

resume training (mandatory data sources):

{
    "train.resume_training_checkpoint_path": "<exact model_epoch checkpoint>",
    "dataset.train_dataset.data_path": [TRAIN_ROOT],
    "dataset.validate_dataset.data_path": [EVAL_ROOT],
}

retrain from prune output (mandatory data sources):

{
    "model.load_pruned_graph": True,
    "model.pruned_graph_path": "<selected prune output>",
    "dataset.train_dataset.data_path": [TRAIN_ROOT],
    "dataset.validate_dataset.data_path": [EVAL_ROOT],
}

default_specs:

{
    "results_dir": "<writable output directory>",
}

Eval Dataset

Optional. Test dataset provided as separate tarball.

Important Parameters

  • model.backbone: Default deformable_resnet18. Deformable convolutions improve text region detection for irregular text.
  • train.optimizer.args.lr: Learning rate. Default 0.001 (Adam).
  • postprocess.thresh: Binarization threshold for text region extraction.
  • postprocess.box_thresh: Box confidence threshold for filtering detections.

Multi-GPU / Multi-Node

Launch method: Lightning-managed (single python process, Lightning spawns workers).

Spec KeyDescriptionDefault
train.num_gpusNumber of GPUs1
train.gpu_idsGPU device indices[0]
train.distributed_strategyddp, fsdp, or deepspeed_stage_3_offloadddp
  • ddp with activation checkpointing: find_unused_parameters=False
  • ddp without: find_unused_parameters=True
  • fsdp forces FP16
  • deepspeed_stage_3_offload is uniquely supported for OCDNet (forces FP16)
  • FAN backbones auto-enable sync_batchnorm

Hardware

Minimum 1 GPU(s), recommended 1 GPU(s). 8GB+ VRAM per GPU. OCDNet is lightweight. Single GPU is sufficient for most datasets.

Error Patterns

Low detection rate: Tune postprocess.thresh and box_thresh. Default thresholds may be too aggressive for some datasets.

One-epoch smoke train with default scheduler: train.num_epochs must not equal train.lr_scheduler.args.warmup_epoch. For one-epoch validation, set warmup_epoch: 0; for normal starter runs, keep num_epochs > warmup_epoch.

Archive passed as dataset path: dataset.*.data_path is not an archive path for OCDNet. Passing train.tar.gz or test.tar.gz directly causes the dataloader to open the gzip as a UTF-8 datalist. Extract the archive and pass the split folder containing img/ and gt/, or pass a real UTF-8 datalist file.

Quantize checkpoint type: Do not pass model_best.pth to the PyTorch quantize path. Some older PyT runtimes wrote model_best.pth without full Lightning checkpoint metadata. The default torchao quantize path should use the intended full model_epoch_<epoch>_step_<step>.pth checkpoint and write quantized_model_torchao.pth.

Default specs output directory: ocdnet default_specs requires a writable results_dir override, for example results_dir=/workspace/run/results/default_specs.

Checkpoint Handoff

OCDNet train writes model_best.pth plus full Lightning epoch checkpoints such as model_epoch_001_step_00046.pth; it may also write ocd_model_latest.pth as a latest symlink. Use model_best.pth for evaluate.checkpoint, inference.checkpoint, export.checkpoint, and prune.checkpoint when the user asks for the best checkpoint. Use a specific model_epoch_<epoch>_step_<step>.pth for train.resume_training_checkpoint_path and for any action that explicitly needs a full Lightning checkpoint. Prune writes artifacts such as pruned_<ch_sparsity>.pth; use the exact pruned .pth artifact for model.pruned_graph_path when retraining from a pruned graph. Use a latest checkpoint only when the user explicitly asks for latest.

If quantize is retried with a PyTorch backend, resolve the full model_epoch_<epoch>_step_<step>.pth that corresponds to the intended best epoch or requested epoch; do not pass model_best.pth to the PyTorch quantize path. If quantize is retried with modelopt.onnx, pass the exported ONNX as quantize.model_path and verify that the runtime image actually contains modelopt.onnx.quantization.

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.

Model handoff mappings:

ActionSpec FieldInference FunctionMeaning
evaluateevaluate.checkpointparent_modelmodel file inferred from the parent job results folder
evaluateresults_diroutput_dircurrent job results directory
exportexport.checkpointparent_modelmodel file inferred from the parent job results folder
exportexport.onnx_filecreate_onnx_fileoutput ONNX path
exportresults_diroutput_dircurrent job results directory
inferenceinference.checkpointparent_modelmodel file inferred from the parent job results folder
inferenceresults_diroutput_dircurrent job results directory
pruneprune.checkpointparent_modelmodel file inferred from the parent job results folder
pruneresults_diroutput_dircurrent job results directory
quantizequantize.model_pathparent_modelmodel file inferred from the parent job results folder
quantizeresults_diroutput_dircurrent job results directory
retrain from prunemodel.pruned_graph_pathparent_modelexact pruned model file inferred from the parent prune results folder
retrain from pruneresults_diroutput_dircurrent job results directory
trainmodel.pretrained_model_pathptm_if_no_resume_modelPTM when no resume checkpoint exists
trainresults_diroutput_dircurrent job results directory
traintrain.resume_training_checkpoint_pathresume_modelmodel 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.

Deployment

  • tao-deploy-ocdnet

FAQ

What does the tao-train-ocdnet skill do?

OCDNet for scene text detection. Detects arbitrary-oriented text regions in natural images using a differentiable binarization approach. Use when training, evaluating, exporting, pruning, quantizing, retraining, or running inference for a TAO OCDNet model. Trigger phrases include "train OCDNet", "scene text detection", "arbitrary-oriented text boxes", "differentiable binarization detector".

How do I install tao-train-ocdnet?

Run npx skills add https://github.com/nvidia/skills --skill tao-train-ocdnet in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/tao-train-ocdnet/ (personal) or .claude/skills/tao-train-ocdnet/ (project).

Which AI agents can use tao-train-ocdnet?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is tao-train-ocdnet safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains tao-train-ocdnet?

It is published by nvidia in nvidia/skills, and it is an official skill from the maker of the technology it covers. It has 1,587 recorded installs.

More from nvidia/skills

View all →

rag-blueprint

nvidia/skills

NVIDIA RAG Blueprint — deploy, configure, troubleshoot, and manage. Handles any RAG action: deploy, install, start, enable, disable, toggle, change, configure, troubleshoot, debug, fix, shutdown, stop, or tear down any RAG feature or service (Agentic RAG, VLM, guardrails, query rewriting, models, search, ingestion, observability, summarization, reasoning, and more).

OfficialAI & Agents3.3K installs

Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV/Parquet I/O, nullable semantics, and multi-GPU DataFrame workloads.

OfficialData & Databases3.1K installs

aiq-research

nvidia/skills

Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.

OfficialProductivity & Automation2.9K installs

cuopt-developer

nvidia/skills

Modify, build, test, debug, and contribute to NVIDIA cuOpt (C++/CUDA, Python, server, CI). Use for solver internals, PRs, DCO, and code conventions.

OfficialBackend & APIs2.7K installs

aiq-deploy

nvidia/skills

Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.

OfficialDevOps & Cloud2.5K installs

cuopt-install

nvidia/skills

Install cuOpt for Python, C, or server via pip, conda, or Docker; verify the install. For building cuOpt from source, see cuopt-developer.

OfficialBackend & APIs2.5K installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs