/ Модель

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

Лицензия
CC BY 4.0
Библиотека
timm
Опубликована
17 авг 2026

GorillaWatch-DINOv2-Giant

Эмбеддинги изображенийИзображение → embedding

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

19скачиваний за 30 дней0лайковвеса обновлены17 авг 2026

Бенчмарки

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

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

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

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

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

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

GorillaWatch-DINOv2-Giant — модель повторной идентификации горилл в естественной среде и для мониторинга популяций, разработанная в рамках проекта GorillaWatch и статьи для WACV 2026. Она предназначена для поиска изображений одной и той же особи в галерее по визуальному сходству, в том числе для особей, не встречавшихся при обучении.

В основе лежит гигантский DINOv2 ViT с патчами 14×14, дообученный на Gorilla-SPAC-Wild с hard-mining triplet loss. Модель принимает изображения размером 518×518 и выдаёт эмбеддинг размерности 256; идентификация выполняется поиском ближайших соседей, а не классификацией по фиксированному набору особей. Для корректной работы требуется преобразование из карточки модели: квадратное изменение размера до 518×518 и нормализация со средним и стандартным отклонением 0,5 по каждому цветовому каналу.

В тестах авторов модель показала поиск между разными встречами как на Gorilla-SPAC-Wild, так и при переносе на записи из Берлинского зоопарка без дообучения на них. Эти результаты относятся к указанным наборам данных и не гарантируют такую же точность на других условиях съёмки или видах животных. Веса распространяются по лицензии CC BY 4.0.

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

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

Ограничения

Модель и её результаты ориентированы на изображения горилл и тестировались на Gorilla-SPAC-Wild и Gorilla-Zoo-Berlin; качество на других видах и условиях съёмки не установлено. Для правильных эмбеддингов необходимо использовать указанное авторами преобразование изображений, а не стандартное преобразование timm для DINOv2.

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

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

Открыть на Hugging Face

GorillaWatch-DINOv2-Giant

Gorilla re-identification model from GorillaWatch: An Automated System for In-the-Wild Gorilla Re-Identification and Population Monitoring (WACV 2026). Further project details can be found here.

A vit_giant_patch14_dinov2.lvd142m DINOv2 backbone fine-tuned with hard-mining triplet loss on Gorilla-SPAC-Wild, projecting to a 256-dimensional embedding. Identification is done by k-NN retrieval against a gallery of embeddings, not by classification. The model has no fixed identity vocabulary, to enable generalisation to individuals unseen during training.

Backbonevit_giant_patch14_dinov2.lvd142m
Input resolution518×518
Embedding dimension256
Parameters1136.9M
Training dataGorilla-SPAC-Wild (face_with_body)

Preprocessing

[!IMPORTANT] This model does not use timm's default DINOv2 transform. It expects a square resize (which only preserves the aspect ratio when the input images are already squared, which is the case in our datasets) and normalization with mean = std = 0.5, not the ImageNet statistics reported in the backbone's default_cfg. Using timm's default transform produces incorrect embeddings.

transforms.Compose([
    transforms.Resize((518, 518)),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]),
])

modeling.py in this repository exposes this as model.get_transform().

Usage

Here we provide a minimal setup to use the model for feature extraction.

Requires torch, timm, safetensors, huggingface_hub and torchvision.

import sys, torch
from huggingface_hub import snapshot_download
from PIL import Image

# Fetch weights, config and the self-contained modeling.py in one go
local_dir = snapshot_download("gorilla-watch/GorillaWatch-DINOv2-Giant")
sys.path.insert(0, local_dir)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
from modeling import load_model

model = load_model(local_dir, device=device)   # already in eval mode
transform = model.get_transform()

image = Image.open("gorilla.png").convert("RGB")
with torch.no_grad():
    embedding = model(transform(image).unsqueeze(0).to(model.device))  # (1, 256)

load_model also accepts the repo id directly (load_model("gorilla-watch/GorillaWatch-DINOv2-Giant")) if you would rather not manage a local directory.

Identity assignment uses k-NN with k=5 under Euclidean distance against a gallery of embeddings. The paper's protocol masks out gallery entries from the same encounter (same camera on the same date) to avoid trivially easy matches. The full evaluation code can be found in our GitHub Repo.

Training

Fine-tuned from the upstream vit_giant_patch14_dinov2.lvd142m DINOv2 checkpoint.

HyperparameterValue
LossOnline triplet, hard mining, Euclidean, margin 0.647
OptimizerAdamW (β=0.9/0.999, ε=1e-7)
Learning rate1.9e-7, cosine annealing to 1e-7
Batch size8 (effective 48 via 6 gradient accumulation steps)
RegularizationL2 = 0.0059, L2-SP = 1.3e-5
Epochs100 max, best-validation-loss checkpoint retained
PrecisionAMP (fp16 autocast, fp32 master weights)
Seed42

The code used to train these models can be found in our Github Repository.

Results

k-NN retrieval accuracy (k=5, Euclidean distance). Gallery entries from the same encounter (same camera on the same date) are masked out, so every match is made across encounters. Macro accuracy averages over identities and is the harder number: it weights rarely-seen individuals equally with frequently-seen ones.

In-domain: Gorilla-SPAC-Wild

Test split of Gorilla-SPAC-Wild, the distribution the model was fine-tuned on.

ProtocolMicro accuracyMacro accuracy
Per image0.55540.4629
Per tracklet (average pooling)0.61210.4451

Out-of-distribution: Gorilla-Zoo-Berlin

Gorilla-Zoo-Berlin is a zero-shot domain-transfer test: the model is applied to footage recorded in the Berlin Zoo, with no fine-tuning on it, so enclosure, lighting, camera hardware and the individuals themselves are all unseen. The numbers are still higher, since the amount of individuals is much lower than in the SPAC dataset. This evaluation clearly shows that the model is able to generalize to new, unseen populations.

ProtocolMicro accuracyMacro accuracy
Per image0.76570.7590
Per tracklet (average pooling)0.82180.8044

Provenance

These weights are bit-identical conversions from the .pth files created in the training process. They were converted to the model.safetensors format for better integration with HuggingFace.

License

This model is released under the CC-BY-4.0 License.

Citation

@inproceedings{GorillaWatch2026,
  title={GorillaWatch: An Automated System for In-the-Wild Gorilla Re-Identification and Population Monitoring},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  author={Maximilian Schall and Felix Leonard Knöfel and Noah Elias König and Jan Jonas Kubeler and Maximilian von Klinski and Joan Wilhelm Linnemann and Xiaoshi Liu and Iven Jelle Schlegelmilch and Ole Woyciniuk and Alexandra Schild and Dante Wasmuht and Magdalena Bermejo Espinet and German Illera Basas and Gerard de Melo},
  year={2026},
  archivePrefix={arXiv},
  eprint={2512.07776}
}

Acknowledgements

The project on which this report is based was funded by the Federal Ministry of Research, Technology and Space under the funding code “KI-Servicezentrum Berlin-Brandenburg” 16IS22092. We acknowledge the support of Sabine Plattner African Charities (SPAC) for their funding to this research. We are grateful to Zoo Berlin for their expert assistance and facility access. This collaboration enabled the development of AI tools capable of being deployed in the wild to directly support gorilla conservation. The responsibility for the content of this publication remains with the authors.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
e7425f2

0 моделей