huggingface-vision-trainer

huggingface-vision-trainer is a skill for Codex from PracticalSwan/agent-skills. It costs 194 tokens per session (8,049 once invoked), scanned A, a copy of huggingface-vision-trainer, MIT.

A training tool for computer-vision models, including object detectors, image classifiers, and image-segmentation models. It can run training on Hugging Face's managed cloud GPUs and save results to the Hugging Face Hub.

In plain words
What is it for?
Use it to fine-tune detectors, classifiers, or segmentation models on custom image datasets, including COCO-format data and mask-based datasets.
Why use it?
It removes the need to set up a local GPU for supported vision-training jobs. It also covers common dataset formats and model-training tasks in one workflow.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: names the AskUserQuestion tool; positional $N argument; mentions Claude Code.

Good fit Use it to fine-tune detectors, classifiers, or segmentation models on custom image datasets, including COCO-format data and mask-based datasets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/huggingface-vision-trainer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill huggingface-vision-trainer
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for huggingface-vision-trainer

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-vision-trainer/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-vision-trainer)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-vision-trainer"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-vision-trainer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for huggingface-vision-trainer

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/huggingface-vision-trainer"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/huggingface-vision-trainer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 194 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,049 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00194 $0.08049
Opus 5 $0.00097 $0.04025
Sonnet 5 $0.00039 $0.01610
Haiku 4.5 $0.00019 $0.00805

Measured yesterday against content hash 22d97d6eba85, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

huggingface-vision-trainer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/dataset_inspector.py, scripts/estimate_cost.py, scripts/image_classification_training.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to huggingface-vision-trainer — 60 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

huggingface-vision-trainer/SKILL.md · 640 lines

How it starts

The opening of the file, as written. The whole thing — 640 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vision Model Training on Hugging Face Jobs

Train object detection, image classification, and SAM/SAM2 segmentation models on managed cloud GPUs. No local GPU setup required—results are automatically saved to the Hugging Face Hub.

When to Use This Skill

Use this skill when users want to:

  • Fine-tune object detection models (D-FINE, RT-DETR v2, DETR, YOLOS) on cloud GPUs or local
  • Fine-tune image classification models (timm: MobileNetV3, MobileViT, ResNet, ViT/DINOv3, or any Transformers classifier) on cloud GPUs or local
  • Fine-tune SAM or SAM2 models for segmentation / image matting using bbox or point prompts
  • Train bounding-box detectors on custom datasets
  • Train image classifiers on custom datasets
  • Train segmentation models on custom mask datasets with prompts
  • Run vision training jobs on Hugging Face Jobs infrastructure
  • Ensure trained vision models are permanently saved to the Hub

Local Script Execution

Helper scripts use PEP 723 inline dependencies. Run them with uv run:

uv run scripts/dataset_inspector.py --dataset username/dataset-name --split train
uv run scripts/estimate_cost.py --help

Prerequisites Checklist

Before starting any training job, verify:

Account & Authentication

  • Hugging Face Account with Pro, Team, or Enterprise plan (Jobs require paid plan)
  • Authenticated login: Check with hf_whoami() (tool) or hf auth whoami (terminal)
  • Token has write permissions
  • MUST pass token in job secrets — see directive #3 below for syntax (MCP tool vs Python API)

Dataset Requirements — Object Detection

  • Dataset must exist on Hub
  • Annotations must use the objects column with bbox, category (and optionally area) sub-fields
  • Bboxes can be in xywh (COCO) or xyxy (Pascal VOC) format — auto-detected and converted
  • Categories can be integers or strings — strings are auto-remapped to integer IDs
  • image_id column is optional — generated automatically if missing
  • ALWAYS validate unknown datasets before GPU training (see Dataset Validation section)

Read the full file on GitHub · 640 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed 22d97d6eba85
  2. 3d ago Changed 17f535c7a006
  3. 5d ago First seen · 640 lines · 194 tokens per session scan A ba79889361f6

Subscribe to this mod's changes

huggingface-vision-trainer is a skill published in the GitHub repository PracticalSwan/agent-skills (13 stars, last pushed yesterday), licensed MIT. It adds 194 tokens to every session and 8,049 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to huggingface-vision-trainer, differing in 60 lines, and is treated as a copy.

Related

Other skills, from other repositories

fine-tuning

LLM fine-tuning authority — LoRA, QLoRA, and full fine-tuning workflows with PEFT, Axolotl, and Unsloth; supervised fine-tuning (SFT), DPO, and RLHF alignment; dataset curation and formatting; GPTQ/AWQ quantization; vLLM serving; and evaluation with lm-evaluation-harness.

LuuOW/meridian-mcp · 80 tokens

quantizing-models-bitsandbytes

Quantizes LLMs to 8-bit or 4-bit for 50-75% memory reduction with minimal accuracy loss. Use when GPU memory is limited, need to fit larger models, or want faster inference. Supports INT8, NF4, FP4 formats, QLoRA training, and 8-bit optimizers. Works with HuggingFace Transformers.

davila7/claude-code-templates · 83 tokens

llama-factory

Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.

davila7/claude-code-templates · 51 tokens

mlflow

Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform.

davila7/claude-code-templates · 33 tokens

transformers

This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning…

synthetic-sciences/openscience · 63 tokens

ml-training-recipes

Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics. Covers training loops, optimizer selection (AdamW, Muon), LR scheduling, mixed precision, debugging, and systematic experimentation. Use when training or fine-tuning…

Orchestra-Research/AI-Research-SKILLs · 88 tokens