Real-time species detection on embedded hardware
A compact detector that finds and names 225 mammal species on a binocular's small chip, trained partly on AI-generated images.
A binocular should recognise the animal you are looking at, offline and directly on the device. That needs a compact object detector for 225 mammal species that runs in real time on a battery-powered embedded processor (Qualcomm QCS605). Two things make this hard: the hardware cannot run large models, and for rare species there are only a few openly licensed photos. The thesis asks how to train a compact detector under these conditions. It compares knowledge distillation with direct fine-tuning and fills the gaps for under-represented species with AI-generated training images.

What I did
- Built a training set from openly licensed photos (iNaturalist, GBIF, Wikimedia Commons and others), cleaned automatically with MegaDetector, a vision-language model and CLIP: 222,073 real photos after filtering.
- Compared ten image-generator configurations, among them gpt-image-2, Gemini, FLUX.2 and Stable Diffusion 3.5, and generated 23,850 images for the rarest species.
- Fine-tuned the large SpeciesNet model as a teacher and distilled it into compact YOLO detectors (YOLO26n, YOLOv5s), compared with direct training.
- Set up an evaluation with a mixed test set (real and generated) and analysed the domain shift between the two.
- Exported the models and measured their speed on embedded hardware, with a Raspberry Pi as a stand-in for the target chip.
- Tracked all experiments with MLflow; the training environment runs in Docker.
Rare animals and a small chip
The first problem is data. Lions and red foxes have been photographed millions of times; the binturong, a shaggy tree-dweller from Southeast Asia, has not. At the start, 114 of the 225 classes had fewer than 100 openly licensed photos, and 30 had none. Even after combining five sources, the 50 rarest classes averaged about 67 usable photos each.
The second problem is compute. The quickest working solution is a pipeline of two existing networks: a detector finds “an animal” and a classifier names each crop. That works, but the classifier runs once per animal, so a herd of zebras costs more than a single fox. The question was whether one small detector can do both jobs if part of its training data is generated.
Which image generator?
Asked for a binturong, open-weight models running on our own GPU tended to draw something closer to a small bear, while the API models drew a binturong. To back that impression with numbers, ten generator configurations each produced the same 1,200 images, and the same YOLO26n detector was trained on each set and scored on real photos.


Two observations carried over into the rest of the work. A higher price did not reliably buy better training images once the field was narrowed down. And the prompt matters as much as the model: cutting the prompt of two API models to 75 tokens cost each of them almost half of its accuracy.

How much generated data is too much?
The 225 classes were split into bands by how many real photos exist. Classes trained on 100 real and 100 generated images reached an mAP of 58.8 % on real photos, against 59.1 % for classes with 200 real images. The rarest classes, trained on generated images alone, reached 30.0 %: about half, but without generated images these classes would be missing from the model.

A generated test set, on the other hand, is misleading. The classes that score 99 % on generated test images score 30 % on real photos. Every number in the thesis is therefore reported on real photos.

One nano detector instead of two networks
On a Raspberry Pi, the YOLO26n detector with 2.7 million parameters answers in 423 ms and reaches an mAP of 52.9 %. It is about 83 times faster than the large two-network reference system and about 13 times faster than the detector-plus-classifier pipeline, at a cost of 7 percentage points of mAP. Knowledge distillation from the large system did not help here: the distilled model reached 47.9 %, the directly trained one 52.9 %, most likely because the labels came from the same models that acted as teacher.

The obvious next step is 8-bit quantisation for the chip’s DSP, which the thesis did not measure.