Model reference · open weights

DINO-small-for-animal-identification

Available as managed deployment Embeddings AvitoTech Image embed 1 variants 685 dl/mo

DINO-small-for-animal-identification is an open-weight embedding model from AvitoTech. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byAvitoTech
TypeEmbedding models
TaskImage embed
Parameters (lead)22M
Runs withtransformers
Released2025-12-02
Popularity685 downloads / month
LicenceOpen weights

About

What DINO-small-for-animal-identification is

Fine-tuned DINOv2-Small 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.

Read the full model card

Model Details

  • Base Model: facebook/dinov2-small
  • Input: Images (224x224)
  • Output: Image embeddings (384-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
  • 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:

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

repo = "AvitoTech/DINO-v2-small-for-animal-identification"
processor = AutoImageProcessor.from_pretrained(repo)
model = AutoModel.from_pretrained(repo).eval()

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

image = Image.open("your_image.jpg").convert("RGB")

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

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

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 system

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys dino-small-for-animal-identification for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (dino-small-for-animal-identification below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"dino-small-for-animal-identification","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms