Localized reading guide
huggingface-vision-trainerPurpose, usage and source
Trains and fine-tunes vision models for object detection (D-FINE, RT-DETR v2, DETR, YOLOS), image classification (timm models — MobileNetV3, MobileViT, ResNet, ViT/DINOv3 — plus any Transformers classifier), and SAM/SAM2 segmentation using Hugging Face Transformers on Hugging Face Jobs cloud GPUs. Covers COCO-format dataset preparation, Albumentations augmentation, mAP/mAR evaluation, accuracy metrics, SAM segmentation with bbox/point prompts, DiceCE loss, hardware selection, cost estimation, Trackio monitoring, and Hub persistence. Use when users mention training object detection, image classification, SAM, SAM2, segmentation, image matting, DETR, D-FINE, RT-DETR, ViT, timm, MobileNet, ResNet, bounding box models, or fine-tuning vision models on Hugging Face Jobs.
Source retrieved:
- Source repository
- huggingface/skills
- SKILL.md
skills/huggingface-vision-trainer/SKILL.md- Repository stars
- 11,241
- Repository updated
- 2026-10-30
- Categories
- Design
- Last collected
License: Apache-2.0
Workflow excerpts are reading aids, not executable instructions from Codez. No third-party Skill was run to produce this page.
The purpose and workflow passages below are upstream material, organized and translated for reading. They are distinct from the separately labeled Codez editorial analysis.
What this Skill does
Trains and fine-tunes vision models for object detection (D-FINE, RT-DETR v2, DETR, YOLOS), image classification (timm models — MobileNetV3, MobileViT, ResNet, ViT/DINOv3 — plus any Transformers classifier), and SAM/SAM2 segmentation using Hugging Face Transformers on Hugging Face Jobs cloud GPUs. Covers COCO-format dataset preparation, Albumentations augmentation, mAP/mAR evaluation, accuracy metrics, SAM segmentation with bbox/point prompts, DiceCE loss, hardware selection, cost estimation, Trackio monitoring, and Hub persistence. Use when users mention training object detection, image classification, SAM, SAM2, segmentation, image matting, DETR, D-FINE, RT-DETR, ViT, timm, MobileNet, ResNet, bounding box models, or fine-tuning vision models on Hugging Face Jobs.
How the upstream workflow works
Automatic Bbox Preprocessing
The object detection training script (scripts/object_detection_training.py) automatically handles bbox format detection (xyxy→xywh conversion), bbox sanitization, image_id generation, string category→integer remapping, and dataset truncation. No manual preprocessing needed — just ensure the dataset has objects.bbox and objects.category columns.
Training workflow
Copy this checklist and track progress: Step 1: Verify prerequisites Follow the Prerequisites Checklist above. Step 2: Validate dataset
Upstream passage · L117 ↗Quick start — Object Detection
The script_args below are the same for both submission methods. See directive #1 for the critical differences between them.
uv run scripts/dataset_inspector.py --dataset username/dataset-name --split train
uv run scripts/estimate_cost.py --helpRequirements and setup
Dataset Requirements — Object Detection
Dataset must exist on Hub Annotations must use the objects column with bbox, category (and optionally area) sub-fields
Limits and quality checks
No separate limits passage was selected from this file. This does not mean the Skill is safe for every input or environment. Review the complete source and validate your own result.
Start with a safe trial
- Check the supported host and the repository installation instructions. Keep the Skill directory and its referenced scripts, assets and documentation together; SKILL.md alone may omit dependencies.
- Give the agent your real input, desired output and acceptance criteria. Invocation syntax and available tools depend on the host; this site does not assume a universal install command.
- Try the source workflow in a disposable project or on a copy. Review operations that change files, remote services or billable resources before allowing them.
- Validate the output against the source quality checks and your own requirements. A successful trigger or a high repository Star count does not establish a correct result.
Read further in the source
- Vision Model Training on Hugging Face Jobs
- 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
- Critical directives
- 1. Job submission:
hf_jobsMCP tool vs Python API - 2. Authentication via job secrets + explicit hub_token injection
- 3. JobInfo attribute
- 4. Required training flags and HfArgumentParser boolean syntax
- 5. Timeout management
- 6. Trackio monitoring
- Recommended object detection models
- Recommended image classification models
- Recommended SAM/SAM2 segmentation models
- Hardware recommendation
- Quick start — Object Detection
- Key OD
script_args - Key IC
script_args - Key SAM
script_args
Related Skills
Translation and scope
This reading guide selects passages from the pinned upstream SKILL.md. Translation is assisted. It is not a complete manual or a claim of tested compatibility. Read the original and its referenced files before use.
This introduction refers to the pinned version below; current repository activity and collection time are shown separately.
- Pinned source
- Read the original ↗
- Source retrieved
- Source commit
fabc634a893f62ad5c2039830397efa35fa62715- Source SHA-256
c7aba4de75fa6595ffdaf5c50136786e8346aba0c9ff0261eaee656af4a3b0d9