/ Модель

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

Контекст
77 токенов
Архитектура
clip · dense
Опубликована
2 мар 2022

clip-vit-base-patch16

Классификация изображений без дообучения3 профессии

CLIP ViT-B/16 от OpenAI сопоставляет изображения с текстовыми категориями для исследовательской классификации без дополнительного обучения.

1,5 млнскачиваний за 30 дней172лайкавеса обновлены4 окт 2022

Бенчмарки

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

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

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

  • Vidore3EnergyRetrieval

    main_score

    Результат

    0,0368

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3ComputerScienceRetrieval.v2

    main_score

    Результат

    0,0247

    Общий результат 0,0207
    MTEB

    Публичная таблицаревизия совпадает

  • WITT2IRetrieval

    main_score

    Результат

    0,0527

    Общий результат 0,4192Общий результат 0,06
    MTEB

    Публичная таблицаревизия совпадает

  • FGVCAircraftZeroShot

    main_score

    Результат

    0,249

    MTEB

    Публичная таблицаревизия совпадает

  • STS13VisualSTS

    main_score

    Результат

    0,6326

    MTEB

    Публичная таблицаревизия совпадает

  • AROVisualRelation

    main_score

    Результат

    0,5364

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3TelecomRetrieval

    main_score

    Результат

    0,0183

    MTEB

    Публичная таблицаревизия совпадает

  • EDIST2ITRetrieval

    main_score

    Результат

    0,2505

    MTEB

    Публичная таблицаревизия совпадает

  • MemotionT2IRetrieval

    main_score

    Результат

    0,832

    MTEB

    Публичная таблицаревизия совпадает

  • FORBI2IRetrieval

    main_score

    Результат

    0,4014

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore2BioMedicalLecturesRetrieval

    main_score

    Результат

    0,332

    MTEB

    Публичная таблицаревизия совпадает

  • XM3600T2IRetrieval

    main_score

    Результат

    0,0014

    Общий результат 0,1809Общий результат 0,0484Общий результат 0,0372
    MTEB

    Публичная таблицаревизия совпадает

  • XFlickr30kCoT2IRetrieval

    main_score

    Результат

    0,0124

    MTEB

    Публичная таблицаревизия совпадает

  • STS17MultilingualVisualSTS

    main_score

    Результат

    0,3863

    Общий результат 0,4157
    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3FinanceFrRetrieval

    main_score

    Результат

    0,004

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3NuclearRetrieval

    main_score

    Результат

    0,0085

    Общий результат 0,0088
    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3FinanceEnRetrieval.v2

    main_score

    Результат

    0,0834

    Общий результат 0,0397
    MTEB

    Публичная таблицаревизия совпадает

  • SugarCrepe

    main_score

    Результат

    0,769

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3FinanceFrRetrieval.v2

    main_score

    Результат

    0,0185

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3PhysicsRetrieval.v2

    main_score

    Результат

    0,0563

    MTEB

    Публичная таблицаревизия совпадает

  • EuroSAT

    main_score

    Результат

    0,7421

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3PharmaceuticalsRetrieval.v2

    main_score

    Результат

    0,057

    MTEB

    Публичная таблицаревизия совпадает

  • Food101ZeroShot

    main_score

    Результат

    0,8767

    MTEB

    Публичная таблицаревизия совпадает

  • RParisEasyI2IRetrieval

    main_score

    Результат

    0,0953

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3HrRetrieval.v2

    main_score

    Результат

    0,0071

    Общий результат 0,0283
    MTEB

    Публичная таблицаревизия совпадает

  • MemotionI2TRetrieval

    main_score

    Результат

    0,7261

    MTEB

    Публичная таблицаревизия совпадает

  • SciMMIRT2IRetrieval

    main_score

    Результат

    0,1278

    MTEB

    Публичная таблицаревизия совпадает

  • TinyImageNetClustering

    main_score

    Результат

    0,629

    MTEB

    Публичная таблицаревизия совпадает

  • UCF101

    main_score

    Результат

    0,8194

    MTEB

    Публичная таблицаревизия совпадает

  • ROxfordHardI2IRetrieval

    main_score

    Результат

    0,0728

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3HrRetrieval

    main_score

    Результат

    0,027

    MTEB

    Публичная таблицаревизия совпадает

  • STSBenchmarkMultilingualVisualSTS

    main_score

    Результат

    0,2346

    MTEB

    Публичная таблицаревизия совпадает

  • Imagenet1k

    main_score

    Результат

    0,6753

    MTEB

    Публичная таблицаревизия совпадает

  • RParisHardI2IRetrieval

    main_score

    Результат

    0,043

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore3TelecomRetrieval.v2

    main_score

    Результат

    0,0061

    MTEB

    Публичная таблицаревизия совпадает

  • CUB200I2IRetrieval

    main_score

    Результат

    0,6186

    MTEB

    Публичная таблицаревизия совпадает

  • ROxfordEasyI2IRetrieval

    main_score

    Результат

    0,1919

    MTEB

    Публичная таблицаревизия совпадает

  • Vidore2ESGReportsHLRetrieval

    main_score

    Результат

    0,1284

    MTEB

    Публичная таблицаревизия совпадает

  • GLDv2I2IRetrieval

    main_score

    Результат

    0,2019

    MTEB

    Публичная таблицаревизия совпадает

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

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

CLIP ViT-B/16 — модель OpenAI, обученная сопоставлять изображения с текстовыми описаниями. Она состоит из визуального энкодера на базе Vision Transformer ViT-B/16 и текстового Transformer-энкодера; контрастивное обучение сближает представления соответствующих пар «изображение — текст». Репозиторий содержит вариант с Vision Transformer.

Модель предназначена прежде всего для исследований обобщения и устойчивости компьютерного зрения, в том числе для классификации изображений с произвольными текстовыми категориями без дополнительного обучения. Её можно применять для экспериментального сопоставления изображений с текстовыми метками и поиска изображений в ограниченной, заранее проверенной области. Основной язык использования — английский.

CLIP хуже справляется с тонкими различиями между похожими классами и подсчётом объектов; результаты и смещения могут заметно зависеть от формулировки категорий. В карточке отдельно отмечены демографические перекосы и риски несправедливой классификации. Разработчик не рекомендует развёртывать модель в продуктивных сценариях без тщательного тестирования и исключает наблюдение и распознавание лиц. Сведения о лицензии в предоставленных материалах отсутствуют.

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

  • экспериментальная классификация изображений по текстовым категориям
  • сопоставление изображения с набором описаний на английском языке
  • поиск изображений по текстовому запросу в ограниченном наборе
  • исследование обобщения моделей компьютерного зрения
  • анализ влияния формулировок категорий на классификацию

Ограничения

Модель может ошибаться при тонкой классификации и подсчёте объектов, а результаты и смещения зависят от состава и формулировки классов. В карточке не рекомендуется развёртывание без тщательной проверки; наблюдение и распознавание лиц указаны как недопустимые сценарии.

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

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

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

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

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

Открыть на Hugging Face

Model Card: CLIP

Disclaimer: The model card is taken and modified from the official CLIP repository, it can be found here.

Model Details

The CLIP model was developed by researchers at OpenAI to learn about what contributes to robustness in computer vision tasks. The model was also developed to test the ability of models to generalize to arbitrary image classification tasks in a zero-shot manner. It was not developed for general model deployment - to deploy models like CLIP, researchers will first need to carefully study their capabilities in relation to the specific context they’re being deployed within.

Model Date

January 2021

Model Type

The base model uses a ViT-B/16 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained to maximize the similarity of (image, text) pairs via a contrastive loss.

The original implementation had two variants: one using a ResNet image encoder and the other using a Vision Transformer. This repository has the variant with the Vision Transformer.

Documents

Use with Transformers

from PIL import Image
import requests
from transformers import CLIPProcessor, CLIPModel
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch16")
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch16")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True)
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities

Model Use

Intended Use

The model is intended as a research output for research communities. We hope that this model will enable researchers to better understand and explore zero-shot, arbitrary image classification. We also hope it can be used for interdisciplinary studies of the potential impact of such models - the CLIP paper includes a discussion of potential downstream impacts to provide an example for this sort of analysis.

Primary intended uses

The primary intended users of these models are AI researchers. We primarily imagine the model will be used by researchers to better understand robustness, generalization, and other capabilities, biases, and constraints of computer vision models.

Out-of-Scope Use Cases

Any deployed use case of the model - whether commercial or not - is currently out of scope. Non-deployed use cases such as image search in a constrained environment, are also not recommended unless there is thorough in-domain testing of the model with a specific, fixed class taxonomy. This is because our safety assessment demonstrated a high need for task specific testing especially given the variability of CLIP’s performance with different class taxonomies. This makes untested and unconstrained deployment of the model in any use case currently potentially harmful. Certain use cases which would fall under the domain of surveillance and facial recognition are always out-of-scope regardless of performance of the model. This is because the use of artificial intelligence for tasks such as these can be premature currently given the lack of testing norms and checks to ensure its fair use. Since the model has not been purposefully trained in or evaluated on any languages other than English, its use should be limited to English language use cases.

Data

The model was trained on publicly available image-caption data. This was done through a combination of crawling a handful of websites and using commonly-used pre-existing image datasets such as YFCC100M. A large portion of the data comes from our crawling of the internet. This means that the data is more representative of people and societies most connected to the internet which tend to skew towards more developed nations, and younger, male users.

Data Mission Statement

Our goal with building this dataset was to test out robustness and generalizability in computer vision tasks. As a result, the focus was on gathering large quantities of data from different publicly-available internet data sources. The data was gathered in a mostly non-interventionist manner. However, we only crawled websites that had policies against excessively violent and adult images and allowed us to filter out such content. We do not intend for this dataset to be used as the basis for any commercial or deployed model and will not be releasing the dataset.

Performance and Limitations

Performance

We have evaluated the performance of CLIP on a wide range of benchmarks across a variety of computer vision datasets such as OCR to texture recognition to fine-grained classification. The paper describes model performance on the following datasets:

  • Food101
  • CIFAR10
  • CIFAR100
  • Birdsnap
  • SUN397
  • Stanford Cars
  • FGVC Aircraft
  • VOC2007
  • DTD
  • Oxford-IIIT Pet dataset
  • Caltech101
  • Flowers102
  • MNIST
  • SVHN
  • IIIT5K
  • Hateful Memes
  • SST-2
  • UCF101
  • Kinetics700
  • Country211
  • CLEVR Counting
  • KITTI Distance
  • STL-10
  • RareAct
  • Flickr30
  • MSCOCO
  • ImageNet
  • ImageNet-A
  • ImageNet-R
  • ImageNet Sketch
  • ObjectNet (ImageNet Overlap)
  • Youtube-BB
  • ImageNet-Vid

Limitations

CLIP and our analysis of it have a number of limitations. CLIP currently struggles with respect to certain tasks such as fine grained classification and counting objects. CLIP also poses issues with regards to fairness and bias which we discuss in the paper and briefly in the next section. Additionally, our approach to testing CLIP also has an important limitation- in many cases we have used linear probes to evaluate the performance of CLIP and there is evidence suggesting that linear probes can underestimate model performance.

Bias and Fairness

We find that the performance of CLIP - and the specific biases it exhibits - can depend significantly on class design and the choices one makes for categories to include and exclude. We tested the risk of certain kinds of denigration with CLIP by classifying images of people from Fairface into crime-related and non-human animal categories. We found significant disparities with respect to race and gender. Additionally, we found that these disparities could shift based on how the classes were constructed. (Details captured in the Broader Impacts Section in the paper). We also tested the performance of CLIP on gender, race and age classification using the Fairface dataset (We default to using race categories as they are constructed in the Fairface dataset.) in order to assess quality of performance across different demographics. We found accuracy >96% across all races for gender classification with ‘Middle Eastern’ having the highest accuracy (98.4%) and ‘White’ having the lowest (96.5%). Additionally, CLIP averaged ~93% for racial classification and ~63% for age classification. Our use of evaluations to test for gender, race and age classification as well as denigration harms is simply to evaluate performance of the model across people and surface potential risks and not to demonstrate an endorsement/enthusiasm for such tasks.

Feedback

Where to send questions or comments about the model

Please use this Google Form

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей