There is a newer version of the record available.

Published February 24, 2026 | Version v1
Dataset Restricted

Codes and app for "Mountain gorillas in Virunga: a smartphone application for on device deep learning face recognition and identification"

Authors/Creators

  • 1. ROR icon UniversitĂ© de Strasbourg
  • 2. ROR icon UniversitĂ© Catholique de Lille

Description

🩍 Gorilla Identifier — Project Files

 

Notebooks > Gorilla IA.ipynb
- Photo sorting and dataset preparation
- YOLO gorilla detection training
- ResNet50 individual identification training
- Grad-CAM heatmap visualization

 

Models
- best.pt → Best YOLO model (gorilla detection)
- best_model.pth → Best ResNet50 model (individual identification, 70 gorillas)
- class_names.txt → List of gorilla individual names (used with best_model.pth)

- export_pytorch_android.ipynb → Export model to Android format (Google Colab)

 

Android App
- gorilla_model.ptl → ResNet50 model optimized for mobile (converted from best_model.pth)
- labels.txt → Gorilla names for the app (same as class_names.txt)
- app-debug.apk → Android app (install on phone, works offline, shows Top-3 predictions)

Abstract

Mountain gorillas (Gorilla beringei beringei) are an endangered flagship species whose long‑term recovery depends on accurate, individual‑level monitoring to inform conservation interventions, manage health risks, and quantify demographic and behavioural change. Non‑invasive, scalable identification methods that reduce disturbance and logistical costs are therefore a high conservation priority. Here we present an on‑device deep‑learning pipeline and Android application for automated face detection and individual recognition of mountain gorillas in Virunga National Park, developed from longitudinal photographic archives of two long‑monitored groups (Rugendo, Munyaga). Field images were acquired under a standardized protocol (Canon EOS 6D Mark II, 70–300 mm, no flash), annotated for face bounding boxes and stratified to train a YOLOv8 face detector and a ResNet50-based individual classifier (70 identities; mean ≈74 images/individual). The face achieved extremely high localisation performance (precision 99.5%, recall 99.9%), facilitating reliable crop extraction. The ResNet50 classifier demonstrated robust generalization with training/validation/test accuracies of 87.93%, 96.02% and 96.00% respectively; test set Top‑3 and Top‑5 accuracies were 98.54% and 99.35%. Aggregate per‑individual metrics on the test partition were mean precision = 0.96, mean recall = 0.96 and mean F1 = 0.96, with 90% of individuals achieving F1 ≥ 0.90. Attention‑map and confusion‑pair analyses indicate the model principally attends to biologically meaningful facial features, while residual errors stem from occlusion, extreme poses and class imbalance. The Android app performs all inference and storage locally, preserving data sovereignty and enabling offline field use. We discuss operational deployment, human‑in‑the‑loop validation, and targeted data‑collection strategies to further reduce ambiguous cases and support conservation monitoring at scale.

Keywords: individual identification; wildlife conservation; great apes, primates, embedded technology

Files

Restricted

The record is publicly accessible, but files are restricted. <a href="https://zenodo.org/account/settings/login?next=https://zenodo.org/records/18757935">Log in</a> to check if you have access.