DeepFaune-UK v1.2: ONNX Model Weights for UK Mammal and Bird Species Detection and Classification
Description
Description:
DeepFaune-UK is a two-stage detection and classification pipeline for automated identification of UK wildlife in camera-trap imagery, developed as part of the Trap Tracker platform (traptracker.co.uk). In version 1.2, the first stage is MegaDetector v6 (YOLOv10-e, 1280-pixel input), used exactly as released and without fine-tuning. It locates animals, people and vehicles in each frame. People and vehicles keep the detector's label; each animal detection is cropped and passed to a dedicated classifier, which assigns one of 28 UK species or class labels. Both stages are exported in ONNX format for cross-platform inference without the original training framework. Crop padding, input size and normalisation are stored in the exported classifier, so deployment reproduces the training-time pre-processing exactly.
What's new in v1.2:
- Off-the-shelf detector. The fine-tuned detector of v1.1 has been replaced by the unmodified MegaDetector v6. On images from previously unseen sites it found substantially more animals: about 97% vs. 84% of annotated animals in our out-of-distribution evaluation.
- Animal-only classifier. Person and calibration-pole classes have been removed from the classifier, because people and vehicles are labelled directly by the detector. The classifier therefore covers 28 animal classes rather than 30.
- Trained on detector crops. The classifier is trained on crops of real detector output rather than ground-truth boxes, so it sees the same kind of input it receives in deployment.
- Independent benchmark. v1.2 has been evaluated on more than 21,000 hand-verified images from sites not used in training (see Performance).
Supported classes (28):
Accipiter gentilis (goshawk), Bos taurus (cattle), Buteo buteo (buzzard), Canis familiaris (dog), Capercaillie (cock), Capercaillie (hen), Capra hircus (goat), Capreolus capreolus (roe deer), Cervus elaphus (red deer), Columba palumbus (wood pigeon), Corvus corone (carrion crow), Dama dama (fallow deer), Equus caballus (horse), Erinaceus europaeus (hedgehog), Felis catus (cat), Martes martes (pine marten), Meles meles (badger), Muntiacus reevesi (muntjac), Numenius arquata (curlew), Numenius arquata chick, Oryctolagus cuniculus (rabbit), Ovis aries (sheep), Passer domesticus (house sparrow), Phasianus colchicus (pheasant), Sciurus carolinensis (grey squirrel), Sciurus vulgaris (red squirrel), Sus scrofa (wild boar), Vulpes vulpes (fox).
Person and vehicle are reported by the detector.
Training data:
The classifier was fine-tuned on UK camera-trap images collected through conservation deployments over nearly a decade and contributed by multiple partner organisations. After restricting the data to animal classes, 45,931 annotated images remained. These were divided into training, validation and test sets with a leakage-controlled split, giving 53,492 crops: 42,719 training, 5,410 validation and 5,363 test. The dataset covers daylight RGB and infrared night-time images, motion blur, partial occlusion, multi-animal frames, juveniles and adults, manufacturer overlays and timestamps, and a wide range of UK habitats and deployment settings.
Raw training images are not released, because many were provided under partner-specific data agreements that pre-date this open model release.
Training setup:
- Architecture: Vision Transformer ViT-L/14 with a DINOv2 backbone, fine-tuned from the DeepFaune European camera-trap classifier (release v1.4), with a new randomly initialised 28-class head.
- Approach: two-phase transfer learning. First the head was trained with the backbone frozen (5 epochs). Then the last 4 of 24 transformer blocks were unfrozen at a low learning rate (1 × 10⁻⁵), with early stopping on validation macro-F1. Training used a class-balanced sampler and label smoothing of 0.1.
- Input resolution: 182 × 182, matching the DeepFaune backbone.
- Training time: 23 epochs, 48 minutes.
- Hardware, framework and export: NVIDIA RTX A6000; PyTorch / timm; ONNX.
Performance:
Held-out test set (training-distribution sites). On 5,363 test crops, the classifier achieves a macro-averaged F1 of 0.991 and an overall accuracy of 0.992. The lowest-scoring classes are curlew chick (F1 0.945), adult curlew (0.967) and red deer (0.970). Red and grey squirrel both score F1 0.99.
- Out-of-distribution set (unseen sites). The full pipeline was evaluated on 21,640 hand-verified MammalWeb citizen-science images from sites absent from the training data:
- It named the exact species in 89.4% of images (95% CI 89.0–89.8%). DeepFaune v1.5.0 and SpeciesNet did so in 55.2% and 60.5% respectively, mainly because those models lack many UK species-level labels.
- When all models were scored at DeepFaune's coarser label resolution, v1.2 reached 89.5%, compared with 91.8% for DeepFaune v1.5.0 and 74.7% for SpeciesNet.
Known limitations:
- Performance at new sites is lower than on the held-out test set.
- The main out-of-distribution errors were roe deer predicted as fallow deer, and empty frames labelled as cat or sheep.
- Red squirrel was barely represented in the out-of-distribution set (three images), and all three were labelled grey squirrel. Any application that acts automatically on the red/grey distinction, such as a species-selective trap or feeder, should apply a conservative confidence threshold and be validated on local imagery before deployment.
- Accuracy should be checked against ground truth for any new deployment.
Intended use:
For conservation practitioners, ecologists and citizen-science projects to automate species identification in camera-trap datasets. It is aimed particularly at under-resourced organisations that lack the compute or machine-learning expertise to train models from scratch.
Acknowledgements:
The classifier is fine-tuned from the DeepFaune European camera-trap classifier. Full credit goes to the DeepFaune initiative (Rigoudy, Dussert, Miele, Chamaillé-Jammes and colleagues) for the foundational work this builds on. The detector is MegaDetector v6 (Microsoft AI for Good Lab / PyTorch-Wildlife), used without modification.
Related publications:
- The earlier DeepFaune-UK work is described in arXiv:2606.10940.
- A benchmark of v1.2 against DeepFaune v1.5.0 and SpeciesNet, including the out-of-distribution evaluation summarised above, is in preparation.
License:
- Classifier (deepfaune_uk_v1.2_stage2_classifier.onnx): CC BY-SA 4.0, as required by the ShareAlike terms of the DeepFaune weights it is derived from.
- Detector (deepfaune_uk_v1.2_stage1_detector.onnx): an ONNX export of MegaDetector v6, redistributed under its original licence (AGPL-3.0).
Citation: Please cite arXiv:2606.10940 and this Zenodo record when using this model in published work. Please also cite DeepFaune (Rigoudy et al., 2023) and MegaDetector.
Files
deepfaune_uk_v1.2_stage2_classifier.txt
Additional details
Software
- Repository URL
- https://github.com/traptracker-ai
- Programming language
- Python
- Development Status
- Active