Skip to content
Obada Alsehli
Conceptual system diagram for four fashion attribute classification heads; not a data sample or model output.

Vision · Weak supervision

Fashion Attribute Recognition with DINOv2

A multi-head vision project for per-image classification of color, pattern, material and texture on a TextileNet subset, with a silver-label pipeline and a human label audit.

Task and data

The project uses a 13,355-image TextileNet subset. Four output heads predict material (6 classes), color (12), pattern (6) and texture (5).

The documented labeling pipeline combines rule-based material mapping with vision-language-model labeling for color, pattern and texture. These generated labels are treated as silver labels rather than independent human ground truth.

Project contribution

The public repository documents a curated image subset and hybrid silver-label pipeline, a four-head model comparison, and a FastAPI inference service. This case study describes those inspectable project artifacts and does not extend the contribution claim beyond them.

Model and setup

The model uses a DINOv2 ViT-B/14 backbone with four parallel prediction heads. The repository compares it with ResNet-50 under the same reported data splits, augmentation, optimizer, schedule and class-weight setup.

The README reports a 20-epoch AdamW schedule with discriminative learning rates, a two-epoch warm-up followed by cosine decay, mixed-precision fp16, and batch size 64. These are the repository's documented training settings.

Fashion image

one image

DINOv2 ViT-B/14

shared visual representation

Material head

6 classes

Color head

12 classes

Pattern head

6 classes

Texture head

5 classes

Architecture schematic from the repository description at the inspected commit : one image, a DINOv2 ViT-B/14 backbone, and four parallel linear classification heads. This diagram does not represent attention, localization, or model interpretability.

Sobel edges and illustrative regions

Sobel edges & illustrative attribute regionsConceptual illustration

The viewer processes the sample image pixels with Sobel edge detection, then overlays a decorative grid and manually drawn ellipses as example attribute regions. The ellipses, grid, and labels are not model predictions, attention weights, or attribution; this viewer does not run the classifier.

Show region:
Raw Textile Input
Raw Input (RGB)
Sobel edges + drawn regions
Split: 50%·

Tip: Click & drag divider, or focus handle and press ← / →

Reported results

The repository reports mean test macro-F1 of 0.765 for DINOv2 and 0.649 for ResNet-50 across the four attribute heads under the documented silver-label evaluation setup.

Stratified Human Label Audit: The repository reports a separate audit of 210 stratified images to examine silver-label quality. The model test scores and the label audit answer different questions and should not be combined into one accuracy claim.

Reported measureDINOv2 ViT-B/14ResNet-50 BaselineEvaluation Context & Support
Mean test macro-F10.7650.649Unweighted average across all four prediction heads under the project setup
Material Head Macro-F10.7440.6126 material classes
Color Head Macro-F10.8270.73812 color classes
Pattern Head Macro-F10.7370.6166 pattern classes
Texture Head Macro-F10.7530.6305 texture classes

Software around the model

The repository documents a FastAPI inference service with upload validation, model metadata, health routes, and structured error responses. The routes below are described by the source at the inspected repository commit; this page makes no claim about a currently hosted service.

The documented upload is one JPEG or PNG up to 10 MB. In code, `/health/live` returns `status: ok` and a `model_loaded` flag; `/health` reports `warming` while the model is not loaded. `/health/ready` returns 503 when artifact validation fails, then calls the loader and returns its status and load flag.

The repository lists Docker Compose packaging and CI checks for Ruff, mypy, pytest, dependency and secret audits, and image scanning. These are repository configuration details, not a site-wide service guarantee.

A model-loading exception follows the generic error handler and returns 500. The repository tests include a 200 response for liveness and a 503 response when artifacts are missing; they do not cover successful model loading or a loader exception.

Limitations

The reported results are specific to this dataset and labeling setup. They do not establish medical-imaging performance, clinical usefulness or general superiority over other models.

These measurements are reported in the project repository. The code, labeling method and evaluation conditions provide the context needed to interpret them.

The human label audit and model test scores describe different evaluations.

Inspect the work

Cite this work

Obada Alsehli··2026

@project{alsehli2026fashionattribute,
  author       = {Alsehli, Obada},
  title        = {{Fashion Attribute Recognition with DINOv2}},
  year         = {2026},
  howpublished = {\url{https://obadaalsehli.com/work/fashion-attribute-recognition}}
}

Academic attribution & reproducible reference format

BIBTEX