nvidia-tao/tao-skill-bank/tao-generate-image-embeddings
Claude Code and agent skill by nvidia-tao/tao-skill-bank
- community
Checking that the SKILL.md file is still in the repository.
Run TAO Data Services image embedding to turn a parquet of image filepaths into an embedding parquet using CLIP, SigLIP, or a TAO checkpoint. Use when a workflow needs embeddings before nearest-neighbor or unique-neighbor mining, or when the user asks to "embed images", "compute image embeddings", or "generate SigLIP embeddings".
Install
npx vskill@latest install nvidia-tao/tao-skill-bank/tao-generate-image-embeddingsSKILL.md
TAO Generate Image Embeddings
Use this skill to run TAO Data Services image embedding. The skill consumes a parquet of image filepaths and writes a parquet with an embedding column. Downstream mining skills (tao-mine-od-images, tao-mine-nearest-neighbors) consume its output.
The container entrypoint is:
Inputs
The user can provide either an existing spec or the fields needed to generate one.
Required spec fields:
| Field | Meaning | |
|---|---|---|
input_parquet | Absolute path to a parquet containing image filepaths. | |
output_parquet | Absolute path where the embedding parquet is written. | |
model | CLIP or SigLIP. | |
model_path | HuggingFace model id, local HF snapshot directory, or a TAO .pth/.ckpt checkpoint. Must match `model`. SigLIP: google/siglip-base-patch16-224 (768-dim, the template default). CLIP: openai/clip-vit-base-patch32 (512-dim). The validator rejects a recognizable model/path mismatch before launch. |
Common optional fields:
| Field | Default | Meaning | |
|---|---|---|---|
model_config_path | "" | TAO experiment spec path. Required only when model_path is a TAO checkpoint. | |
batch_size | 64 | Number of images processed in parallel. Lower it if the GPU runs out of memory. |
The input parquet must contain a filepath column. Any additional columns are carried through to the output verbatim, so metadata such as label survives into the embedding parquet.
filepath values are transitive file inputs. When another workflow emits this spec, its platform action request must declare and mount every image root those paths reference; mounting only input_parquet is insufficient. Keep these mount-only folder inputs outside the native embedding YAML, because the Data Services config has no image_root field. If the producing workflow freezes absolute paths, each embedding container must remount the corresponding source at the same compute-visible root.
The default template is assets/default_image_embeddings.yaml.
Encoder Consistency
When embeddings feed a mining step, every parquet compared against another must be produced with the same model and model_path. Embedding dimensionality follows the encoder — 768 for the SigLIP default, 512 for CLIP ViT-B/32 — and nothing in the output parquet records which encoder wrote it. Embeddings from different encoders are not comparable, and mismatched encoders are the most common cause of mining output that looks unrelated to the targets. Reuse one spec across every parquet in a mining run and override only input_parquet / output_parquet.
Quick Start
Run from the tao-skill-bank repo root.
Write the spec beside the output parquet. The run does not retain it, so the embeddings otherwise carry no record of the encoder that produced them. That matters here more than elsewhere: every parquet compared against another in a mining step must come from the same model and model_path, and mismatched encoders are the usual cause of mining output that looks unrelated to its targets.
Keep --user and the identity env block above. The image imports transformers at startup, which calls getpass.getuser(); without USER/LOGNAME it fails with KeyError: 'getpwuid(): uid not found: <uid>' because the UID has no /etc/passwd entry. Do not work around it by running the container as root; that leaves root-owned outputs. This follows the launch contract in tao-run-on-docker.
To embed several parquets with one encoder, reuse the same spec and override the two paths per run:
Generate A Spec
If the user provides parquet paths and an encoder instead of a ready spec, copy the template and fill in the nulls. Every tuning value it already carries is the one this stage wants — change one only deliberately.
Fill input_parquet, output_parquet and — if not using the default encoder — model and model_path, all as absolute paths, then validate:
The template is the only place a default value lives, so nothing can disagree with it. verify reports the encoder, since embeddings are only comparable to others produced by the same model and model_path.
Keep the spec, input parquet, image files, and output directory under RUN_ROOT so the same paths resolve inside the container.
Preflight
- Verify Docker and GPU access:
- Resolve and pull the data-services image if needed:
- Validate the spec:
- Confirm
RUN_ROOTcontains the spec, the input parquet, the image files itsfilepathcolumn points at, and the output directory. MountRUN_ROOTto the same absolute path inside Docker.
Outputs
| Artifact | Location | |
|---|---|---|
| embedding parquet | output_parquet |
The output parquet contains filepath, an embedding column of list-like vectors, and every extra column carried through from the input. Print its row count and column list after the run so the caller can confirm the embedding column exists.
Troubleshooting
`The subtask image_embeddings requires -e/--experiment_spec_file`: rerun with embedding image_embeddings -e "$SPEC".
Input parquet or images not found inside Docker: the filepath values are read verbatim. Use a RUN_ROOT mount where host and container paths are identical, and confirm the images themselves are under that mount — not just the parquet.
Model loading error with a `.pth` / `.ckpt` `model_path`: TAO checkpoints need model_config_path set to the training spec so the architecture can be rebuilt. HuggingFace ids and snapshot directories do not.
CUDA out of memory: lower batch_size (try 32 or 16).
Mined results look unrelated downstream: the parquets compared during mining were embedded with different encoders. Re-embed them with one shared spec — see ## Encoder Consistency.
No GPU available: embedding requires at least one CUDA GPU. Check nvidia-smi -L, the Docker --gpus flag, and the NVIDIA container toolkit installation.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/data/tao-generate-image-embeddings/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nvidia-tao/tao-skill-bank/tao-generate-image-embeddings)