Codes and app for "Mountain gorillas in Virunga: deep learning face recognition and identification"
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)
Abstract
1. 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 are therefore a high conservation priority.
2. We developed and evaluated a two-stage deep-learning pipeline for automated face detection and individual recognition, trained on 2,798 field photographs of 70 individuals from five habituated family groups monitored in the Virunga National Park (Democratic Republic of Congo, DRC); we benchmarked classifier performance against 21 park staff in a controlled field evaluation (450 trials).
3. The YOLOv8 face detector achieved near-perfect localisation (precision 99.5%, recall 99.9%); the ResNet50 individual classifier reached 96.0% top-1 test accuracy, with 60% of individuals achieving F1 = 1.000 and 90% achieving F1 ≥ 0.90.
4. The AI classifier substantially outperformed experienced human observers (overall human accuracy 64.2%), with the largest gap on the Humba family (+36 percentage points); the classifier exceeded the median human observer on 23 of 25 individuals evaluated in both settings.
5. Grad-CAM attention maps confirmed that the model primarily attends to biologically meaningful facial landmarks; residual errors are attributable to class imbalance, occlusion, and rapid ontogenetic change in juveniles.
Solution. The pipeline is openly available and designed for practical field deployment; with periodic retraining and human-in-the-loop validation, it provides a non-invasive complement to conventional monitoring that can accelerate veterinary response, improve demographic data quality, and scale responsibly to other habituated great ape populations.
Keywords: individual identification; wildlife conservation; great apes, primates, embedded technology