hugging-face-vision-trainer
Train or fine-tune vision models on Hugging Face Jobs for detection, classification, and SAM or SAM2 segmentation.
npx skills add majiayu000/claude-skill-registry --skill hugging-face-vision-trainer --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Trains or fine-tunes vision models (object detection, image classification, and SAM/SAM2 segmentation) on Hugging Face Jobs infrastructure. Ensures trained models are permanently saved to the Hub. No local GPU setup required.
How it works
The skill guides the agent to prepare and run vision training jobs on HF Jobs:
- Supports fine-tuning for object detection (e.g., D-FINE, RT-DETR v2, DETR, YOLOS), image classification (various timm and transformer classifiers), and SAM/SAM2 segmentation with prompts.
- Uses training scripts (object_detection_training.py, image_classification_training.py, or sam_segmentation_training.py) that rely on HfArgumentParser for CLI configuration.
- Submits jobs via hf_jobs MCP tool or HfApi().run_uv_job(), passing all configuration via script_args and ensuring a hub push if required.
- Requires dataset validation before GPU training and manages dataset format conversions (e.g., bbox formats, image/mask columns) within the training workflow.
- Includes instructions for token handling (HF_TOKEN) and hub_token injection when pushing to the Hub.
When to use it
Use this skill when you want to:
- Fine-tune object detection models on cloud GPUs or local resources
- Fine-tune image classification models on cloud GPUs or local resources
- Fine-tune SAM or SAM2 segmentation models with prompts
- Train detectors, classifiers, or segmentation models on custom datasets
- Run vision training jobs on Hugging Face Jobs infrastructure and save results to the Hub
What it can touch
The skill relies on the following tools and scripts: hf_jobs MCP tool, HfApi().run_uv_job() as alternatives, and training scripts with CLI arguments (e.g., scripts/object_detection_training.py, scripts/image_classification_training.py, scripts/sam_segmentation_training.py). It requires environment variable HF_TOKEN for hub authentication and injects it into training_args.hub_token when pushing to the hub.
Caveats
- Requires a Hugging Face Pro/Team/Enterprise plan for Jobs, with authentication and token write permissions.
- Training time should be extended beyond default timeouts (recommended 2-4 hours or more depending on dataset size).
- Trackio monitoring is enabled in training scripts; status checks should be requested by the user (no automatic polling).
- The exact dataset formats, prompts, and preprocessing are governed by the dataset validation steps described in the workflow.
# 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 ## Related Skills - **`hugging-face-jobs`** — General HF Jobs infrastructure: token authentication, hardware flavors, timeout management, cost estimation, secrets, environment variables, scheduled jobs, and result persistence. **Refer to the Jobs skill for any non-training-specific Jobs q
- When to Use This Skill
- Related Skills
- Local Script Execution
- Prerequisites Checklist
- Account & Authentication
- Dataset Requirements — Object Detection
- Dataset Requirements — Image Classification
- Dataset Requirements — SAM/SAM2 Segmentation
- Critical Settings
- Dataset Validation
- Running the Inspector
- Reading Results
- Automatic Bbox Preprocessing
- Training workflow
uv run scripts/dataset_inspector.py --dataset username/dataset-name --split train uv run scripts/estimate_cost.py --help
What does the hugging-face-vision-trainer skill do?
Train or fine-tune vision models on Hugging Face Jobs for detection, classification, and SAM or SAM2 segmentation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill hugging-face-vision-trainer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
