tao-generate-image-embeddings
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…
от NVIDIA★ 4 269 звёзд на GitHub
Установить tao-generate-image-embeddings в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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:
embedding image_embeddings -e /absolute/path/to/image_embeddings.yaml
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 bank root, the plugin folder that $TAO_SKILL_BANK_PATH names.
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.
OUT_DIR=/absolute/path/for/this/run # where output_parquet is written
SPEC="$OUT_DIR/image_embeddings.yaml" # spec lives beside its output
RUN_ROOT=/absolute/path/that/contains/parquets/images/and/results
GPU_COUNT=1
python3 skills/tao-generate-image-embeddings/scripts/verify_image_embeddings_spec.py \
--spec "$SPEC"
DS_IMAGE="$(scripts/resolve_versions_key.py images.tao_toolkit.data_services)"
RUNTIME_HOME="$RUN_ROOT/.tao-runtime/home"
HF_CACHE="$HOME/.cache/huggingface"
mkdir -p "$RUNTIME_HOME/.cache" "$HF_CACHE"
IDENTITY_ARGS=(--user "$(id -u):$(id -g)"
-e USER="$(id -un)" -e LOGNAME="$(id -un)"
-e HOME="$RUNTIME_HOME" -e XDG_CACHE_HOME="$RUNTIME_HOME/.cache"
-e HF_HOME="$HF_CACHE" -v "$HF_CACHE:$HF_CACHE")
docker run --rm --gpus "$GPU_COUNT" --shm-size=8g --network=host \
"${IDENTITY_ARGS[@]}" \
-v "$RUN_ROOT:$RUN_ROOT" \
-w "$RUN_ROOT" \
"$DS_IMAGE" \
embedding image_embeddings -e "$SPEC"
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 entry in the image's passwd file. 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:
docker run --rm --gpus "$GPU_COUNT" --shm-size=8g --network=host "${IDENTITY_ARGS[@]}" \
-v "$RUN_ROOT:$RUN_ROOT" -w "$RUN_ROOT" "$DS_IMAGE" \
embedding image_embeddings -e "$SPEC" \
input_parquet=/abs/path/other_input.parquet \
output_parquet=/abs/path/other_output.parquet
Generate A Spec
If the user provides
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Bash
Вложенные файлы
- assets/default_image_embeddings.yaml
- evals/evals.json
- references/skill_info.yaml
- scripts/verify_image_embeddings_spec.py
FAQ
Что делает скилл tao-generate-image-embeddings?
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".
Как установить скилл tao-generate-image-embeddings?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tao-generate-image-embeddings запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate 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…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…