hugging-face-vision-trainer

Installation
SKILL.md

Vision model training

When to Use

Use for an authorized image classification, object detection or binary SAM/SAM2 segmentation pilot with Hugging Face/Transformers. This is not clinical validation, autonomous-vehicle certification or continuous alpha-matting training.

Workflow

  1. Confirm task, data rights/consent, sensitive image scope, model/dataset licenses, exact immutable revisions, label/box/mask conventions, held-out evaluation design, output location and compute/storage budget. Preserve existing user authorization; do not require another preference question when it is already settled.
  2. Review dependencies and use a pinned compatible environment. PEP723 dependency ranges are declarations, not a reproducible lock or proof that the current libraries work together. Installing packages, downloading data/models or submitting paid Jobs requires authorization.
  3. Inspect data before training. The bundled metadata inspector is a bounded public viewer preview, not full validation. It never certifies READY, decodes all images or guesses box format. Even a previously used dataset revision must be checked. Confirm dataset config/split explicitly; sample labels do not enumerate all classes.
  4. Start with an approved bounded local pilot using the scripts and their sibling vision_safety.py. No automatic remote code, login, Hub publication or experiment telemetry. Model weights require safetensors; unavailable safe weights fail rather than fall back to pickle.
  5. Verify image/annotation alignment, class mapping, negative examples and reproducible split design. Group by person/video/source/time where appropriate; random per-image splitting can leak related observations. Keep test data out of training/tuning and disclose when no independent test exists.
  6. Evaluate actual loss/metrics and predictions against the held-out design. Record exact model/data/SDK versions, seed, actual samples, steps, hardware, limitations and any failure. A syntax/offline test does not prove GPU execution or convergence. Never invent training results, hardware fit, timing, cost or successful persistence.
  7. Save model, processor, label mapping, metrics and provenance to approved durable private storage. For ephemeral Jobs, verify the artifact route before submission; Hub publication is one optional route, not mandatory. Creating a repository or uploading weights/data needs explicit scope, destination, visibility and license review.

Examples

Read the pilot guide and the task reference before running. Help works with standard Python without installing the training stack:

Installs
30
GitHub Stars
48.7K
First Seen
Apr 28, 2026