Run this model with HF Jobs
Run NourAtef2115/chicfinder-clip on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/NourAtef2115/chicfinder-clip. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/NourAtef2115/chicfinder-clip on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use NourAtef2115/chicfinder-clip with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NourAtef2115/chicfinder-clip with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="NourAtef2115/chicfinder-clip")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("NourAtef2115/chicfinder-clip") model = AutoModelForZeroShotImageClassification.from_pretrained("NourAtef2115/chicfinder-clip", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ChicFinder CLIP: FashionCLIP fine-tuned for visual product search
ChicFinder CLIP is a fine-tuned FashionCLIP image encoder built for "shop the look" visual search. It turns a clothing photo into a 512-dim embedding, and items that look alike, especially different photos of the same product, end up close together in that space.
It was trained on product photos from 15 Egyptian fashion retailers (men, women and kids). It powers similarity search in ChicFinder, where you upload an outfit photo and get the closest-matching items from local brands.
| Spec | Details |
|---|---|
| Architecture | CLIP ViT-B/32 (CLIPModel): ~151M params, 512-d projection |
| Base model | patrickjohncyh/fashion-clip |
| What changed | Vision tower only. The text tower and projection heads are identical to FashionCLIP |
| Objective | Triplet InfoNCE (anchor/positive = same product, negative = different product) |
| Input | RGB image, 224ร224 (standard CLIP preprocessing, bundled processor) |
| Output | 512-d image embedding (L2-normalise before cosine similarity) |
| Weights | model.safetensors, float32, ~605 MB |
Results
Retrieval on a held-out validation split of 1,066 products that never appear in training. Each query image must retrieve another photo of the same product from the validation gallery.
| Metric | FashionCLIP (base) | ChicFinder CLIP (this model) | Improvement |
|---|---|---|---|
| Top-1 accuracy | 55.44% | 74.11% | +18.7 pts |
| Top-5 accuracy | 78.52% | 91.74% | +13.2 pts |
Fine-tuning taught the encoder to tell apart near-identical catalogue items (the same cut in a different colour, similar prints from different brands). Generic fashion embeddings tend to merge those.
Category confusion matrices (nearest-neighbour category, top 20 categories, row-normalised)
Fine-tuned
Base FashionCLIP
Usage
Image embeddings (main use case)
import torch
from PIL import Image
from transformers import CLIPModel, CLIPProcessor
model_id = "NourAtef2115/chicfinder-clip"
model = CLIPModel.from_pretrained(model_id).eval()
processor = CLIPProcessor.from_pretrained(model_id)
image = Image.open("outfit.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
emb = model.get_image_features(**inputs) # (1, 512)
emb = torch.nn.functional.normalize(emb, dim=-1) # cosine-ready
Visual search with FAISS
import faiss, numpy as np
# catalog_embs: (N, 512) float32, L2-normalised, from the snippet above
index = faiss.IndexFlatIP(512) # inner product == cosine on unit vectors
index.add(catalog_embs)
scores, ids = index.search(emb.numpy().astype(np.float32), k=10)
Zero-shot text โ image
The text tower is FashionCLIP's, unchanged, so text queries still work. Because only the image side was tuned, though, text-to-image alignment can be a little weaker than the base model's. For text-heavy search, compare against patrickjohncyh/fashion-clip.
labels = ["a red floral dress", "black denim jeans", "white sneakers"]
inputs = processor(text=labels, images=image, return_tensors="pt", padding=True)
probs = model(**inputs).logits_per_image.softmax(dim=-1)
Training
Data
Product photos scraped from the public online stores of 15 Egyptian fashion brands: OR, Solang, Carrot Kids, Concrete, Mobaco, Ravin, In Your Shoe, Boheme, Tomato Store, Town Team, Psych, Asili and others.
- Train: 6,014 products with โฅ2 images each (~21k images)
- Validation: 1,066 held-out products (~3.8k images)
- Split: product level, stratified by brand ร gender, so no product appears in both splits
- Balance: roughly equal Men / Women / Kids. Under-represented categories were augmented
- Cleaning: ~1.1k truncated or corrupt images removed. Category labels normalised for casing
The dataset is not released, because the images belong to their respective brands.
Procedure
Each training example is a triplet:
- anchor and positive: two different photos of the same product
- negative: a photo of a different, randomly chosen product
Embeddings come from visual_projection(vision_model(x).pooler_output) and are trained with an InfoNCE loss (temperature 0.07) that scores the positive against every negative in the batch.
| Hyperparameter | Value |
|---|---|
| Trainable params | vision_model only (text tower and projections frozen) |
| Optimizer | AdamW, lr 1e-5, weight decay 0.01 |
| Batch size | 8 triplets |
| Epochs | 15 (best checkpoint: epoch 6) |
| Precision | Mixed precision (torch AMP) |
| Hardware | 1ร NVIDIA RTX 4050 Laptop GPU (6 GB), ~7.5 h total |
| Checkpoint selection | Lowest validation loss |
Validation loss bottoms out at 0.051 at epoch 6. After that the model starts to overfit (train loss keeps falling, validation loss swings), so the epoch-6 weights are the ones published here.
Intended use & limitations
Good for
- Visual similarity and "more like this" search over fashion catalogues
- Deduplicating, clustering or grouping product photos
- A drop-in replacement for FashionCLIP image embeddings in an existing pipeline (same 512-d output, same preprocessing)
Keep in mind
- Domain: trained on clean e-commerce product shots (studio or model photos). Real-world phone photos (cluttered backgrounds, odd angles, partial garments) are harder and haven't been benchmarked yet. Cropping to the garment first helps.
- Regional bias: the catalogue is Egyptian mid-market fashion. Styles that are rare there (e.g. heavy winter wear, some luxury or traditional garments) are under-represented.
- Evaluation scope: the metrics above are same-product retrieval within the validation split, not full-catalogue retrieval against user-uploaded photos, and not on brands unseen during training.
- Embedding drift: these vectors are not interchangeable with base FashionCLIP vectors. Re-embed your whole index when you switch models.
- Not for identifying people, or for judging or classifying anyone by appearance.
Citation
If you use this model, please also cite FashionCLIP:
@article{chia2022fashionclip,
title = {Contrastive language and vision learning of general fashion concepts},
author = {Chia, Patrick John and Attanasio, Giuseppe and Bianchi, Federico and Terragni, Silvia
and Magalh{\~a}es, Ana Rita and Goncalves, Diogo and Greco, Ciro and Tagliabue, Jacopo},
journal = {Scientific Reports},
volume = {12},
year = {2022},
doi = {10.1038/s41598-022-23052-9}
}
Acknowledgements
Built by the ChicFinder team as part of an AI-powered fashion discovery project. Base model by Patrick John Chia et al. (FashionCLIP), on top of OpenAI's CLIP.
- Downloads last month
- -
Model tree for NourAtef2115/chicfinder-clip
Base model
patrickjohncyh/fashion-clipEvaluation results
- Top-1 accuracy (%) on ChicFinder validation split (1,066 held-out products)self-reported74.110
- Top-5 accuracy (%) on ChicFinder validation split (1,066 held-out products)self-reported91.740


