Marqo/deepfashion-multimodal
收藏资源简介:
--- dataset_info: features: - name: image dtype: image - name: category1 dtype: string - name: category2 dtype: string - name: category3 dtype: float64 - name: text dtype: string - name: item_ID dtype: string splits: - name: data num_bytes: 143032788.688 num_examples: 42537 download_size: 152932414 dataset_size: 143032788.688 configs: - config_name: default data_files: - split: data path: data/data-* --- **Disclaimer**: We do not own this dataset. DeepFashion dataset is a public dataset which can be accessed through its [website](https://mmlab.ie.cuhk.edu.hk/projects/DeepFashion.html). This dataset was used to evaluate Marqo-FashionCLIP and Marqo-FashionSigLIP - see details below. # Marqo-FashionSigLIP Model Card 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. The model was fine-tuned from ViT-B-16-SigLIP (webli). **Github Page**: [Marqo-FashionCLIP](https://github.com/marqo-ai/marqo-FashionCLIP) **Blog**: [Marqo Blog](https://www.marqo.ai/blog/search-model-for-fashion) ## Usage The model can be seamlessly used with [OpenCLIP](https://github.com/mlfoundations/open_clip) by ```python import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:Marqo/marqo-fashionSigLIP') tokenizer = open_clip.get_tokenizer('hf-hub:Marqo/marqo-fashionSigLIP') import torch from PIL import Image image = preprocess_val(Image.open("docs/fashion-hippo.png")).unsqueeze(0) text = tokenizer(["a hat", "a t-shirt", "shoes"]) with torch.no_grad(), torch.cuda.amp.autocast(): image_features = model.encode_image(image) text_features = model.encode_text(text) image_features /= image_features.norm(dim=-1, keepdim=True) text_features /= text_features.norm(dim=-1, keepdim=True) text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1) print("Label probs:", text_probs) ``` ## Benchmark Results 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: **Text-To-Image (Averaged across 6 datasets)** | Model | AvgRecall | Recall@1 | Recall@10 | MRR | |----------------------------|-------------|------------|-------------|-----------| | Marqo-FashionSigLIP | **0.231** | **0.121** | **0.340** | **0.239** | | FashionCLIP2.0 | 0.163 | 0.077 | 0.249 | 0.165 | | OpenFashionCLIP | 0.132 | 0.060 | 0.204 | 0.135 | | ViT-B-16-laion2b_s34b_b88k | 0.174 | 0.088 | 0.261 | 0.180 | | ViT-B-16-SigLIP-webli | 0.212 | 0.111 | 0.314 | 0.214 | **Category-To-Product (Averaged across 5 datasets)** | Model | AvgP | P@1 | P@10 | MRR | |----------------------------|-----------|-----------|-----------|-----------| | Marqo-FashionSigLIP | **0.737** | **0.758** | **0.716** | **0.812** | | FashionCLIP2.0 | 0.684 | 0.681 | 0.686 | 0.741 | | OpenFashionCLIP | 0.646 | 0.653 | 0.639 | 0.720 | | ViT-B-16-laion2b_s34b_b88k | 0.662 | 0.673 | 0.652 | 0.743 | | ViT-B-16-SigLIP-webli | 0.688 | 0.690 | 0.685 | 0.751 | **Sub-Category-To-Product (Averaged across 4 datasets)** | Model | AvgP | P@1 | P@10 | MRR | |----------------------------|-----------|-----------|-----------|-----------| | Marqo-FashionSigLIP | **0.725** | **0.767** | **0.683** | **0.811** | | FashionCLIP2.0 | 0.657 | 0.676 | 0.638 | 0.733 | | OpenFashionCLIP | 0.598 | 0.619 | 0.578 | 0.689 | | ViT-B-16-laion2b_s34b_b88k | 0.638 | 0.651 | 0.624 | 0.712 | | ViT-B-16-SigLIP-webli | 0.643 | 0.643 | 0.643 | 0.726 | When using the datset, cite the original work. ``` @inproceedings{liu2016deepfashion, author = {Liu, Ziwei and Luo, Ping and Qiu, Shi and Wang, Xiaogang and Tang, Xiaoou}, title = {DeepFashion: Powering Robust Clothes Recognition and Retrieval with Rich Annotations}, booktitle = {Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, month = June, year = {2016} } ```
dataset_info: 数据集信息: 特征字段: - 字段名: image, 数据类型: 图像 - 字段名: category1, 数据类型: 字符串 - 字段名: category2, 数据类型: 字符串 - 字段名: category3, 数据类型: 64位浮点数 - 字段名: text, 数据类型: 字符串 - 字段名: item_ID, 数据类型: 字符串 数据划分: - 划分名称: data, 字节数: 143032788.688, 样本数量: 42537 下载大小: 152932414 数据集总大小: 143032788.688 configs: 配置项: - 配置名称: default, 数据文件: - 划分: data, 路径: data/data-* --- **免责声明**: 本数据集非我方所有。DeepFashion 数据集为公开数据集,可通过其[官方网站](https://mmlab.ie.cuhk.edu.hk/projects/DeepFashion.html)获取。 本数据集用于评估 Marqo-FashionCLIP 与 Marqo-FashionSigLIP 模型,详情如下。 # Marqo-FashionSigLIP 模型卡片 Marqo-FashionSigLIP 基于通用对比学习(Generalised Contrastive Learning,GCL)构建,该技术允许模型不仅可基于文本描述进行训练,还可融入类别、风格、颜色、材质、关键词与精细细节等信息,从而为时尚产品提供高度相关的检索结果。该模型基于 ViT-B-16-SigLIP (webli) 进行微调。 **GitHub 页面**: [Marqo-FashionCLIP](https://github.com/marqo-ai/marqo-FashionCLIP) **官方博客**: [Marqo 博客](https://www.marqo.ai/blog/search-model-for-fashion) ## 使用方法 该模型可与 [OpenCLIP](https://github.com/mlfoundations/open_clip) 无缝集成,示例代码如下: python import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:Marqo/marqo-fashionSigLIP') tokenizer = open_clip.get_tokenizer('hf-hub:Marqo/marqo-fashionSigLIP') import torch from PIL import Image image = preprocess_val(Image.open("docs/fashion-hippo.png")).unsqueeze(0) text = tokenizer(["a hat", "a t-shirt", "shoes"]) with torch.no_grad(), torch.cuda.amp.autocast(): image_features = model.encode_image(image) text_features = model.encode_text(text) image_features /= image_features.norm(dim=-1, keepdim=True) text_features /= text_features.norm(dim=-1, keepdim=True) text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1) print("Label probs:", text_probs) ## 基准测试结果 本文报告了在6个公开多模态时尚数据集上的平均评估结果,分别为 [Atlas](https://huggingface.co/datasets/Marqo/atlas)、[DeepFashion(店内商品)](https://huggingface.co/datasets/Marqo/deepfashion-inshop)、[DeepFashion(多模态版)](https://huggingface.co/datasets/Marqo/deepfashion-multimodal)、[Fashion200k](https://huggingface.co/datasets/Marqo/fashion200k)、[KAGL](https://huggingface.co/datasets/Marqo/KAGL) 以及 [Polyvore](https://huggingface.co/datasets/Marqo/polyvore): ### 文本到图像检索(6个数据集平均) | 模型名称 | 平均召回率(AvgRecall) | 召回率@1(Recall@1) | 召回率@10(Recall@10) | 平均倒数排名(Mean Reciprocal Rank,MRR) | |----------------------------|-------------|------------|-------------|-----------| | Marqo-FashionSigLIP | **0.231** | **0.121** | **0.340** | **0.239** | | FashionCLIP2.0 | 0.163 | 0.077 | 0.249 | 0.165 | | OpenFashionCLIP | 0.132 | 0.060 | 0.204 | 0.135 | | ViT-B-16-laion2b_s34b_b88k | 0.174 | 0.088 | 0.261 | 0.180 | | ViT-B-16-SigLIP-webli | 0.212 | 0.111 | 0.314 | 0.214 | ### 类别到商品检索(5个数据集平均) | 模型名称 | 平均精确率(AvgP) | 精确率@1(P@1) | 精确率@10(P@10) | 平均倒数排名(MRR) | |----------------------------|-----------|-----------|-----------|-----------| | Marqo-FashionSigLIP | **0.737** | **0.758** | **0.716** | **0.812** | | FashionCLIP2.0 | 0.684 | 0.681 | 0.686 | 0.741 | | OpenFashionCLIP | 0.646 | 0.653 | 0.639 | 0.720 | | ViT-B-16-laion2b_s34b_b88k | 0.662 | 0.673 | 0.652 | 0.743 | | ViT-B-16-SigLIP-webli | 0.688 | 0.690 | 0.685 | 0.751 | ### 子类别到商品检索(4个数据集平均) | 模型名称 | 平均精确率(AvgP) | 精确率@1(P@1) | 精确率@10(P@10) | 平均倒数排名(MRR) | |----------------------------|-----------|-----------|-----------|-----------| | Marqo-FashionSigLIP | **0.725** | **0.767** | **0.683** | **0.811** | | FashionCLIP2.0 | 0.657 | 0.676 | 0.638 | 0.733 | | OpenFashionCLIP | 0.598 | 0.619 | 0.578 | 0.689 | | ViT-B-16-laion2b_s34b_b88k | 0.638 | 0.651 | 0.624 | 0.712 | | ViT-B-16-SigLIP-webli | 0.643 | 0.643 | 0.643 | 0.726 | 使用本数据集时,请引用原文献: bibtex @inproceedings{liu2016deepfashion, author = {Liu, Ziwei and Luo, Ping and Qiu, Shi and Wang, Xiaogang and Tang, Xiaoou}, title = {DeepFashion: Powering Robust Clothes Recognition and Retrieval with Rich Annotations}, booktitle = {Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, month = June, year = {2016} }




