HuggingFace镜像/fashion-clip
模型介绍
文件和版本
分析

Youtube 视频 HuggingFace 模型 在 Colab 中打开 Medium 博客文章 在 Streamlit 中打开

模型卡片:Fashion CLIP

免责声明:本模型卡片改编自此处的模型卡片。

模型详情

更新(2023年10月3日):我们已更新模型!我们发现laion/CLIP-ViT-B-32-laion2B-s34B-b79K检查点(感谢Bin!)在时尚领域表现优于原始OpenAI CLIP。因此,我们在保持架构不变的情况下,微调了一个更新(且更好!)版本的FashionCLIP(以下简称FashionCLIP 2.0)。我们推测,laion/CLIP-ViT-B-32-laion2B-s34B-b79K带来的性能提升归因于训练数据的增加(是OpenAI CLIP数据的5倍)。然而,我们的论文结论保持不变——在我们的时尚数据集上微调laion/CLIP提高了在我们基准测试中的零样本性能。参见下表比较各模型的加权宏F1分数。

模型FMNISTKAGLDEEP
OpenAI CLIP0.660.630.45
FashionCLIP0.740.670.48
Laion CLIP0.780.710.58
FashionCLIP 2.00.830.730.62

FashionCLIP是一个基于CLIP的模型,旨在为时尚概念生成通用的产品表示。利用OpenAI发布的预训练检查点(ViT-B/32),我们在一个大型、高质量的新型时尚数据集上训练FashionCLIP,以研究针对特定领域的CLIP类模型微调是否足以产生可零样本迁移到全新数据集和任务的产品表示。FashionCLIP并非为模型部署而开发——要部署此类模型,研究人员首先需要仔细研究其能力与特定部署环境之间的关系。

模型日期

2023年3月

模型类型

本模型采用ViT-B/32 Transformer架构作为图像编码器,并采用掩码自注意力Transformer作为文本编码器。这些编码器基于预训练检查点进行训练,通过在一个包含80万件商品的时尚数据集上采用对比损失,最大化(图像,文本)对的相似度。

文档

  • FashionCLIP Github仓库
  • FashionCLIP论文

数据

模型训练使用的(图像,文本)对来自Farfetch数据集[^1 等待官方发布],该英文数据集包含超过80万件时尚商品,涵盖3000多个品牌及数十种商品类型。编码所用图像为标准商品图,即纯白背景下的单品图片(无人像)。文本内容由Farfetch数据集中的_亮点描述_(如“条纹”、“长袖”、“阿玛尼”)与_简短说明_(如“80年代风格T恤”)拼接而成。

局限性、偏见与公平性

我们承认FashionCLIP存在一定局限性,并预期其继承了原始CLIP模型的某些局限性与偏见。微调过程不会显著加剧这些问题:我们注意到所使用的时尚数据明确包含了基于性别概念的假设(例如“女性蓝色鞋款”),这不可避免地将服装特性与特定人群关联。

研究表明训练数据本身也存在局限性。从文本模态看,由于Farfetch数据集中的描述文本普遍较长,FashionCLIP对长文本查询的表现优于短文本。从图像模态看,模型对标准商品图(居中构图、纯白背景)存在偏好。

模型选择(即微调过程中确定合适的停止标准)仍是开放挑战。我们发现,当需要跨数据集泛化时,即使使用相对多样化和大规模的数据集,基于域内(与测试集同分布)验证集损失的选择标准仍存在不足。

引用文献

@Article{Chia2022,
    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",
    year="2022",
    month="Nov",
    day="08",
    volume="12",
    number="1",
    abstract="The steady rise of online shopping goes hand in hand with the development of increasingly complex ML and NLP models. While most use cases are cast as specialized supervised learning problems, we argue that practitioners would greatly benefit from general and transferable representations of products. In this work, we build on recent developments in contrastive learning to train FashionCLIP, a CLIP-like model adapted for the fashion industry. We demonstrate the effectiveness of the representations learned by FashionCLIP with extensive tests across a variety of tasks, datasets and generalization probes. We argue that adaptations of large pre-trained models such as CLIP offer new perspectives in terms of scalability and sustainability for certain types of players in the industry. Finally, we detail the costs and environmental impact of training, and release the model weights and code as open source contribution to the community.",
    issn="2045-2322",
    doi="10.1038/s41598-022-23052-9",
    url="https://doi.org/10.1038/s41598-022-23052-9"
}