fashionpedia-yolo26n-3classes
a lightweight model for segmenting clothing in photos
2 min readupdated
This checkpoint is fine-tuned for instance segmentation (detecting each object individually and tracing its exact contour) of clothing items in photos. For every garment detected, the model outputs its class, a confidence score, a bounding box, and a pixel-level mask. Built on the compact Ultralytics YOLO26n-seg architecture, it was fine-tuned by Qudef1 on 10% of the Fashionpedia training split as part of the FashionSwap AI lab project. It is well-suited for developers building virtual try-on apps or local image editing tools that need to cleanly isolate specific garments on a person.
Key features
- Predicts the class, bounding box, and precise pixel-level mask for each clothing item in an image.
- Built on the lightweight Ultralytics YOLO26n-seg architecture and fast enough to run even on a CPU.
- Trained on images at an input resolution of
imgsz=512. - Stores the class list directly inside the checkpoint, accessible via
model.names.
What you can do
- Automatically generate garment masks for local inpainting, swapping, or recoloring clothes with image editing models.
- Plug the model into a wardrobe cataloging or e-commerce pipeline to detect and crop individual clothing items from photos.
- Use it as a fast baseline for benchmarking against other clothing detectors and segmentation models.
Example
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
weights = hf_hub_download(repo_id="Qudef1/fashionpedia-yolo26n-3classes", filename="best.pt")
model = YOLO(weights)
result = model.predict(source="person.jpg", device="cpu", imgsz=512, conf=0.25, retina_masks=True)[0]
result.save(filename="prediction.jpg")
Read more
DetailsTrained on 10% of the Fashionpedia training split at 512 px resolution; the repository includes the
best.pt and last.pt checkpoints, the args.yaml config, and per-epoch metric logs in results.csv.Limitations: Since this is a lab baseline, validate the masks on your own data before deploying to production—inaccuracies can occur along fine edges or when garments overlap.
Runs through the standard
ultralytics library via either Python or the command line.









Comments