/ Модель

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

Лицензия
Apache 2.0
Архитектура
clip · dense
Библиотека
transformers
Опубликована
2 дек 2025

CLIP-ViT-base-for-animal-identification

Эмбеддинги изображенийИзображение → embedding3 профессии

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

115скачиваний за 30 дней1лайквеса обновлены12 авг 2026

Бенчмарки

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

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

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

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

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

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

CLIP-ViT-Base Fine-tuned for Animal Identification — модель компьютерного зрения от AvitoTech, дообученная на базе openai/clip-vit-base-patch32 для распознавания и повторной идентификации отдельных кошек и собак. Она формирует 512-мерные эмбеддинги изображений и предназначена для сравнения фотографий животных, поиска совпадений и проверки личности животного. Для обработки изображений используется входной размер 224×224 пикселя; модель построена на архитектуре CLIP и работает через библиотеку Transformers.

В карточке приведены результаты оценки на наборах изображений кошек и собак, включая ROC AUC и точность поиска в топ-K; при этом показатели различаются между наборами и задачами, а в тестах на собаках точность Top-1 заметно ниже, чем на кошках. Модель выпущена под лицензией Apache-2.0. README не сообщает поддерживаемые языки или длину контекста; модель принимает изображения и возвращает векторы признаков.

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

  • поиск совпадений между фотографиями потерявшегося и найденного питомца
  • повторная идентификация кошки или собаки по фотографии
  • проверка, изображено ли одно и то же животное на двух снимках
  • поиск питомца в базе ветеринарных записей
  • сопоставление фотографий животных для мониторинга и учёта

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

CLIP-ViT-Base Fine-tuned for Animal Identification

Fine-tuned CLIP-ViT-Base model for individual animal identification, specializing in distinguishing between unique cats and dogs. This model produces robust image embeddings optimized for pet recognition, re-identification, and verification tasks.

Model Details

  • Base Model: openai/clip-vit-base-patch32
  • Input: Images (224x224)
  • Output: Image embeddings (512-dimensional)
  • Task: Individual animal identification and verification

Training Data

The model was trained on a comprehensive dataset combining multiple sources:

  • PetFace Dataset: Large-scale animal face dataset with 257,484 unique individuals across 13 animal families
  • Dogs-World: Kaggle dataset for dog breed and individual identification
  • LCW (Labeled Cats in the Wild): Cat identification dataset
  • Web-scraped Data: Additional curated images from various sources

Total Dataset Statistics:

  • 1,904,157 total photographs
  • 695,091 unique individual animals (cats and dogs)

Training Details

Training Configuration:

  • Batch Size: 116 samples (58 unique identities × 2 photos each)
  • Optimizer: Adam with learning rate 1e-4
  • Training Duration: 10 epochs
  • Transfer Learning: Final 5 transformer blocks unfrozen, lower layers frozen to preserve pre-trained features

Loss Function: The model is trained using a combined loss function consisting of:

  1. Triplet Loss (margin α=0.45): Encourages separation between different animal identities
  2. Intra-Pair Variance Regularization (ε=0.01): Promotes consistency across multiple photos of the same animal

Combined as: L_total = 1.0 × L_triplet + 0.5 × L_var

This approach creates compact feature clusters for each individual animal while maintaining large separation between different identities.

Performance Metrics

The model has been benchmarked against various vision encoders on multiple pet recognition datasets:

Cat Individual Images Dataset

ModelROC AUCEERTop-1Top-5Top-10
CLIP-ViT-Base0.98210.06040.83590.95790.9711
DINOv2-Small0.99040.04220.85470.96600.9764
SigLIP-Base0.98990.03900.86490.97570.9842
SigLIP2-Base0.98940.03880.86600.97720.9863
Zer0int CLIP-L0.98810.05090.87680.97670.9845
SigLIP2-Giant0.99400.03440.88990.98680.9921
SigLIP2-Giant + E5-Small-v2 + gating0.99290.03440.89520.98720.9932

DogFaceNet Dataset

ModelROC AUCEERTop-1Top-5Top-10
CLIP-ViT-Base0.97390.07720.43500.64170.7204
DINOv2-Small0.98290.05710.55810.75400.8139
SigLIP-Base0.97920.06060.58480.77460.8319
SigLIP2-Base0.97760.06720.59250.78560.8422
Zer0int CLIP-L0.98140.06250.62890.80920.8597
SigLIP2-Giant0.99260.03260.74750.90090.9316
SigLIP2-Giant + E5-Small-v2 + gating0.99200.03140.78180.92330.9482

Combined Test Dataset (Overall Performance)

ModelROC AUCEERTop-1Top-5Top-10
CLIP-ViT-Base0.97520.07290.65110.81220.8555
DINOv2-Small0.98480.05460.71800.86780.9009
SigLIP-Base0.98110.05720.73590.88310.9140
SigLIP2-Base0.97930.06310.74000.88890.9197
Zer0int CLIP-L0.98420.05650.76260.89940.9267
SigLIP2-Giant0.99120.03780.82430.94710.9641
SigLIP2-Giant + E5-Small-v2 + gating0.98820.04220.84280.95760.9722

Metrics Explanation:

  • ROC AUC: Area Under the Receiver Operating Characteristic Curve - measures the model's ability to distinguish between different individuals
  • EER: Equal Error Rate - the error rate where false acceptance and false rejection rates are equal
  • Top-K: Accuracy of correct identification within the top K predictions

Basic Usage

Installation

pip install transformers torch pillow

Get Image Embedding

import torch
import torch.nn.functional as F
from PIL import Image
from transformers import AutoImageProcessor, AutoModel

# Load model and processor
processor = AutoImageProcessor.from_pretrained("AvitoTech/CLIP-ViT-base-for-animal-identification")
model = AutoModel.from_pretrained("AvitoTech/CLIP-ViT-base-for-animal-identification")

device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device).eval()

# Load and process image
image = Image.open("your_image.jpg").convert("RGB")

with torch.no_grad():
    inputs = processor(images=[image], return_tensors="pt").to(device)
    image_features = model.get_image_features(**inputs)
    image_features = F.normalize(image_features, dim=1)

print(f"Embedding shape: {image_features.shape}")  # torch.Size([1, 512])

Citation

If you use this model in your research or applications, please cite our work:

@Article{jimaging12010030,
AUTHOR = {Kudryavtsev, Vasiliy and Borodin, Kirill and Berezin, German and Bubenchikov, Kirill and Mkrtchian, Grach and Ryzhkov, Alexander},
TITLE = {From Visual to Multimodal: Systematic Ablation of Encoders and Fusion Strategies in Animal Identification},
JOURNAL = {Journal of Imaging},
VOLUME = {12},
YEAR = {2026},
NUMBER = {1},
ARTICLE-NUMBER = {30},
URL = {https://www.mdpi.com/2313-433X/12/1/30},
ISSN = {2313-433X},
ABSTRACT = {Automated animal identification is a practical task for reuniting lost pets with their owners, yet current systems often struggle due to limited dataset scale and reliance on unimodal visual cues. This study introduces a multimodal verification framework that enhances visual features with semantic identity priors derived from synthetic textual descriptions. We constructed a massive training corpus of 1.9 million photographs covering 695,091 unique animals to support this investigation. Through systematic ablation studies, we identified SigLIP2-Giant and E5-Small-v2 as the optimal vision and text backbones. We further evaluated fusion strategies ranging from simple concatenation to adaptive gating to determine the best method for integrating these modalities. Our proposed approach utilizes a gated fusion mechanism and achieved a Top-1 accuracy of 84.28% and an Equal Error Rate of 0.0422 on a comprehensive test protocol. These results represent an 11% improvement over leading unimodal baselines and demonstrate that integrating synthesized semantic descriptions significantly refines decision boundaries in large-scale pet re-identification.},
DOI = {10.3390/jimaging12010030}
}

Use Cases

  • Individual pet identification and re-identification
  • Lost and found pet matching systems
  • Veterinary record management
  • Animal behavior monitoring
  • Wildlife conservation and tracking

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

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

GPU в ailist

Универсальный рантайм · transformers · image-feature-extraction

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

Подбираем GPU…

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

0 моделей