Jesse-marqo commited on
Commit
05a5d28
1 Parent(s): 5ce1f03

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +63 -1
README.md CHANGED
@@ -27,4 +27,66 @@ configs:
27
  license: mit
28
  ---
29
 
30
- **Disclaimer**: We do not own this dataset. Atlas is a public dataset which can be downloaded from its [Github Page](https://github.com/vumaasha/Atlas/tree/master).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  license: mit
28
  ---
29
 
30
+ **Disclaimer**: We do not own this dataset. Atlas is a public dataset which can be downloaded from its [Github Page](https://github.com/vumaasha/Atlas/tree/master).
31
+
32
+ This dataset was used to evaluate Marqo-FashionCLIP and Marqo-FashionSigLIP - see details below.
33
+
34
+ # Marqo-FashionSigLIP Model Card
35
+ Marqo-FashionSigLIP leverages Generalised Contrastive Learning ([GCL](https://www.marqo.ai/blog/generalized-contrastive-learning-for-multi-modal-retrieval-and-ranking)) which allows the model to be trained on not just text descriptions but also categories, style, colors, materials, keywords and fine-details to provide highly relevant search results on fashion products.
36
+ The model was fine-tuned from ViT-B-16-SigLIP (webli).
37
+
38
+ **Github Page**: [Marqo-FashionCLIP](https://github.com/marqo-ai/marqo-FashionCLIP)
39
+
40
+ **Blog**: [Marqo Blog](https://www.marqo.ai/blog/search-model-for-fashion)
41
+
42
+
43
+ ## Usage
44
+ The model can be seamlessly used with [OpenCLIP](https://github.com/mlfoundations/open_clip) by
45
+
46
+ ```python
47
+ import open_clip
48
+ model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:Marqo/marqo-fashionSigLIP')
49
+ tokenizer = open_clip.get_tokenizer('hf-hub:Marqo/marqo-fashionSigLIP')
50
+ import torch
51
+ from PIL import Image
52
+ image = preprocess_val(Image.open("docs/fashion-hippo.png")).unsqueeze(0)
53
+ text = tokenizer(["a hat", "a t-shirt", "shoes"])
54
+ with torch.no_grad(), torch.cuda.amp.autocast():
55
+ image_features = model.encode_image(image)
56
+ text_features = model.encode_text(text)
57
+ image_features /= image_features.norm(dim=-1, keepdim=True)
58
+ text_features /= text_features.norm(dim=-1, keepdim=True)
59
+ text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)
60
+ print("Label probs:", text_probs)
61
+ ```
62
+
63
+ ## Benchmark Results
64
+ Average evaluation results on 6 public multimodal fashion datasets ([Atlas](https://huggingface.co/datasets/Marqo/atlas), [DeepFashion (In-shop)](https://huggingface.co/datasets/Marqo/deepfashion-inshop), [DeepFashion (Multimodal)](https://huggingface.co/datasets/Marqo/deepfashion-multimodal), [Fashion200k](https://huggingface.co/datasets/Marqo/fashion200k), [KAGL](https://huggingface.co/datasets/Marqo/KAGL), and [Polyvore](https://huggingface.co/datasets/Marqo/polyvore)) are reported below:
65
+
66
+ **Text-To-Image (Averaged across 6 datasets)**
67
+ | Model | AvgRecall | Recall@1 | Recall@10 | MRR |
68
+ |----------------------------|-------------|------------|-------------|-----------|
69
+ | Marqo-FashionSigLIP | **0.231** | **0.121** | **0.340** | **0.239** |
70
+ | FashionCLIP2.0 | 0.163 | 0.077 | 0.249 | 0.165 |
71
+ | OpenFashionCLIP | 0.132 | 0.060 | 0.204 | 0.135 |
72
+ | ViT-B-16-laion2b_s34b_b88k | 0.174 | 0.088 | 0.261 | 0.180 |
73
+ | ViT-B-16-SigLIP-webli | 0.212 | 0.111 | 0.314 | 0.214 |
74
+
75
+ **Category-To-Product (Averaged across 5 datasets)**
76
+ | Model | AvgP | P@1 | P@10 | MRR |
77
+ |----------------------------|-----------|-----------|-----------|-----------|
78
+ | Marqo-FashionSigLIP | **0.737** | **0.758** | **0.716** | **0.812** |
79
+ | FashionCLIP2.0 | 0.684 | 0.681 | 0.686 | 0.741 |
80
+ | OpenFashionCLIP | 0.646 | 0.653 | 0.639 | 0.720 |
81
+ | ViT-B-16-laion2b_s34b_b88k | 0.662 | 0.673 | 0.652 | 0.743 |
82
+ | ViT-B-16-SigLIP-webli | 0.688 | 0.690 | 0.685 | 0.751 |
83
+
84
+ **Sub-Category-To-Product (Averaged across 4 datasets)**
85
+ | Model | AvgP | P@1 | P@10 | MRR |
86
+ |----------------------------|-----------|-----------|-----------|-----------|
87
+ | Marqo-FashionSigLIP | **0.725** | **0.767** | **0.683** | **0.811** |
88
+ | FashionCLIP2.0 | 0.657 | 0.676 | 0.638 | 0.733 |
89
+ | OpenFashionCLIP | 0.598 | 0.619 | 0.578 | 0.689 |
90
+ | ViT-B-16-laion2b_s34b_b88k | 0.638 | 0.651 | 0.624 | 0.712 |
91
+ | ViT-B-16-SigLIP-webli | 0.643 | 0.643 | 0.643 | 0.726 |
92
+