/ Модель

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

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

GorillaWatch-DINOv2-Base

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

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

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

Бенчмарки

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

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

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

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

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

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

GorillaWatch-DINOv2-Base — модель компьютерного зрения для повторной идентификации горилл и мониторинга популяций в проекте GorillaWatch. Она разработана для поиска совпадений между фотографиями или видеокадрами: модель извлекает 256-мерный вектор признаков, а идентификация выполняется поиском ближайших соседей по галерее векторов. Фиксированного списка особей у модели нет, поэтому её можно применять и к гориллам, которых не было в обучающей выборке.

В основе лежит ViT-Base с патчами 14×14 из DINOv2, дообученный на Gorilla-SPAC-Wild с hard-mining triplet loss. Входные изображения приводятся к размеру 518×518 и нормализуются со средним и стандартным отклонением 0,5 для каждого канала; стандартное преобразование timm для DINOv2 даёт некорректные эмбеддинги. В README приведены результаты поиска по k ближайшим соседям на Gorilla-SPAC-Wild и при переносе без дообучения на Gorilla-Zoo-Berlin.

Модель предназначена для анализа изображений горилл в полевых наблюдениях и зоопарках. Она выдаёт эмбеддинги, а не готовые метки личности, поэтому для идентификации нужна галерея эталонных эмбеддингов и процедура поиска ближайших соседей. Весовые файлы в safetensors побитово соответствуют конвертированным обученным файлам .pth. Лицензия — CC BY 4.0.

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

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

Ограничения

Модель возвращает векторы признаков, а не готовые идентификаторы: для распознавания нужна галерея и поиск ближайших соседей. Важно соблюдать описанную предобработку 518×518 с нормализацией mean=std=0,5; стандартное преобразование timm приводит к некорректным эмбеддингам.

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

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

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

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

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

Открыть на Hugging Face

GorillaWatch-DINOv2-Base

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_base_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_base_patch14_dinov2.lvd142m
Input resolution518×518
Embedding dimension256
Parameters86.8M
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-Base")
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-Base")) 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_base_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.48400.3980
Per tracklet (average pooling)0.53940.4083

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.72880.7125
Per tracklet (average pooling)0.76360.7424

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…

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

0 моделей