Downloads · 30 days
0
vivekkopthsd/clip-vitb32-product-retrieval
clip-vitb32-product-retrieval is a feature extraction model from vivekkopthsd. Use it when you need embeddings to search or compare text. It is set up for open_clip. The card lists the license as mit.
A CLIP ViT-B/32 image encoder (initialised from laion2bs34bb79k) fine-tuned for fine-grained image retrieval across three diverse domains — fashion products, pet breeds, and general objects — with a single shared enco…
Downloads · 30 days
0
Access
Public
Updated Aug 5, 2026
Repo size
957 MB
Likes
0
Public
Click a slice to open those files.
.safetensors605 MB · 63%
From the Hugging Face model README
A CLIP ViT-B/32 image encoder (initialised from laion2b_s34b_b79k) fine-tuned for
fine-grained image retrieval across three diverse domains — fashion products, pet
breeds, and general objects — with a single shared encoder.
Given an image, it produces a 512-dim L2-normalised embedding. Cosine similarity between embeddings retrieves same-category items, specialised for fine-grained distinctions (e.g. Oxfords vs. Sneakers, Persian vs. Ragdoll).
Fine-tuned on the train split of each dataset, evaluated on the held-out test split. Retrieval mean Average Precision at the fine-grained label level:
| Dataset | Task | Pretrained CLIP | Fine-tuned | Improvement |
|---|---|---|---|---|
| UT Zappos50K | 21 shoe subcategories | 0.557 | 0.774 | +39% |
| Oxford-IIIT Pet | 37 breeds | 0.461 | 0.759 | +65% |
| Caltech-101 | 101 object classes | 0.798 | 0.930 | +17% |
Precision@1 also improved on all three (Zappos 0.836→0.868, Pets 0.793→0.867, Caltech 0.908→0.955).
import open_clip, torch
from huggingface_hub import hf_hub_download
model, _, preprocess = open_clip.create_model_and_transforms(
"hf-hub:vivekkopthsd/clip-vitb32-product-retrieval")
model.eval()
img = preprocess(Image.open("shoe.jpg")).unsqueeze(0)
with torch.no_grad():
emb = torch.nn.functional.normalize(model.encode_image(img), dim=-1)
An ONNX export of the image encoder (clip_vitb32_finetuned_image.onnx, opset 17,
dynamic batch, L2-norm fused) is included — numerically identical to PyTorch
(max abs diff 4e-07) and runs at ~37 ms/image on CPU via onnxruntime.