/ Модель

Характеристики

Лицензия
MIT
Архитектура
clip · dense
Библиотека
transformers
Опубликована
8 ноя 2023

fashion-clip

Классификация изображений без дообученияИзображение, текст → label3 профессии

Fashion-CLIP — дообученная CLIP-модель для сопоставления изображений и текстов и zero-shot классификации товаров модной индустрии.

116скачиваний за 30 дней1лайквеса обновлены8 ноя 2023

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Fashion-CLIP — модель семейства CLIP, разработанная для получения совместимых представлений изображений и текстов о товарах модной индустрии. В карточке описана версия FashionCLIP 2.0 на базе laion/CLIP-ViT-B-32-laion2B-s34B-b79K: архитектура ViT-B/32 кодирует изображения, а Transformer с маскированным self-attention — текст. Модель дообучена на контрастном сопоставлении более 800 тысяч пар изображение–текст из англоязычного датасета Farfetch.

Модель предназначена для поиска и классификации модных товаров по текстовым описаниям, в том числе в zero-shot сценариях и при переносе на новые наборы данных. Авторы приводят улучшение weighted macro F1 относительно исходных CLIP на трёх бенчмарках. Модель лучше подходит для стандартных каталожных фотографий одежды на белом фоне и может лучше работать с длинными запросами, чем с короткими.

Карточка предупреждает о наследуемых от CLIP ограничениях и смещениях обучающих данных, включая гендерные ассоциации; качество переноса на новые домены зависит от сценария применения. Репозиторий распространяется по лицензии MIT.

Сценарии применения

  • поиск одежды по текстовому описанию
  • zero-shot классификация модных товаров
  • сопоставление фотографий товаров с описаниями
  • получение представлений одежды для поиска в каталоге
  • перенос классификации модных товаров на новые наборы данных

Ограничения

Модель ориентирована на стандартные каталожные изображения товаров на белом фоне и может лучше работать с длинными текстовыми запросами. Она наследует смещения CLIP и обучающих данных, включая гендерные ассоциации; пригодность для конкретного применения следует оценивать отдельно.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Youtube Video HuggingFace Model Open In Colab Medium Blog Post Open in Streamlit

This is a fork of patrickjohncyh/fashion-clip

Model Card: Fashion CLIP

Disclaimer: The model card adapts the model card from here.

Model Details

UPDATE (10/03/23): We have updated the model! We found that laion/CLIP-ViT-B-32-laion2B-s34B-b79K checkpoint (thanks Bin!) worked better than original OpenAI CLIP on Fashion. We thus fine-tune a newer (and better!) version of FashionCLIP (henceforth FashionCLIP 2.0), while keeping the architecture the same. We postulate that the perofrmance gains afforded by laion/CLIP-ViT-B-32-laion2B-s34B-b79K are due to the increased training data (5x OpenAI CLIP data). Our thesis, however, remains the same -- fine-tuning laion/CLIP on our fashion dataset improved zero-shot perofrmance across our benchmarks. See the below table comparing weighted macro F1 score across models.

ModelFMNISTKAGLDEEP
OpenAI CLIP0.660.630.45
FashionCLIP0.740.670.48
Laion CLIP0.780.710.58
FashionCLIP 2.00.830.730.62

FashionCLIP is a CLIP-based model developed to produce general product representations for fashion concepts. Leveraging the pre-trained checkpoint (ViT-B/32) released by OpenAI, we train FashionCLIP on a large, high-quality novel fashion dataset to study whether domain specific fine-tuning of CLIP-like models is sufficient to produce product representations that are zero-shot transferable to entirely new datasets and tasks. FashionCLIP was not developed for model deplyoment - to do so, researchers will first need to carefully study their capabilities in relation to the specific context they’re being deployed within.

Model Date

March 2023

Model Type

The model uses a ViT-B/32 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained, starting from a pre-trained checkpoint, to maximize the similarity of (image, text) pairs via a contrastive loss on a fashion dataset containing 800K products.

Documents

Data

The model was trained on (image, text) pairs obtained from the Farfecth dataset[^1 Awaiting official release.], an English dataset comprising over 800K fashion products, with more than 3K brands across dozens of object types. The image used for encoding is the standard product image, which is a picture of the item over a white background, with no humans. The text used is a concatenation of the highlight (e.g., “stripes”, “long sleeves”, “Armani”) and short description (“80s styled t-shirt”)) available in the Farfetch dataset.

Limitations, Bias and Fiarness

We acknowledge certain limitations of FashionCLIP and expect that it inherits certain limitations and biases present in the original CLIP model. We do not expect our fine-tuning to significantly augment these limitations: we acknowledge that the fashion data we use makes explicit assumptions about the notion of gender as in "blue shoes for a woman" that inevitably associate aspects of clothing with specific people.

Our investigations also suggest that the data used introduces certain limitations in FashionCLIP. From the textual modality, given that most captions derived from the Farfetch dataset are long, we observe that FashionCLIP may be more performant in longer queries than shorter ones. From the image modality, FashionCLIP is also biased towards standard product images (centered, white background).

Model selection, i.e. selecting an appropariate stopping critera during fine-tuning, remains an open challenge. We observed that using loss on an in-domain (i.e. same distribution as test) validation dataset is a poor selection critera when out-of-domain generalization (i.e. across different datasets) is desired, even when the dataset used is relatively diverse and large.

Citation

@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"
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · zero-shot-image-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
CLIPModel
Ревизия весов
b30d192

0 моделей