ultra-lightweight CNNs
Extremely small CNNs, intended for insect detection on microcontrollers
- Classification
- MobileNetv2
- closed vocabulary
- input: image
1 asset
Intended use. One or two sentences on what this model is for, and the situation it was built for. A reader who is scanning five entries should be able to tell from this paragraph whether this one is theirs.
Architecture and training
This is a collection of very small models, with fewer than 450k parameters. They are quantised to run on low powered microcontroller platforms, which is the primary design choice, to enable insect detection on these compute-limited devices.
They are based on the MobileNetv2 architecture. Models have also been quantised using TFLite.
They are trained on a mixture of iNaturalist data and field datasets of insects on flat backgrounds.
Inputs and outputs
It accepts images and produces a confidence value [0, 1], of that image containing an insect.
The documented Ecto-Trigger TFLite score profile follows the author deployment guide at revision a603943. The quantized runtime returns a (1,1) unsigned-byte tensor with one image-level insect-presence score, rather than instance boxes. The unquantized Keras model has a floating-point sigmoid output. This profile is source-inspected; released-artifact inference and physical deployment have not been probed.
Performance
Reports 0.964 AUROC on test set of train distribution data. Reports 0.872 AUROC on a variant of the AMI camera traps dataset.
Limitations
These models are for a highly specific circumstance. They intended to aid the design of future insect camera traps by providing a way to perform insect detection on a low-powered microcontroller.
The extremely small size of these models likely limits thier applicability to general purpose datasets. So, fine-tuning may be required.
Also, the creating the runtime environment to use this sort of model requires some understanding of microcontrollers and how to programme them.
How to obtain the weights
Weights are downloadable on GitHub: https://github.com/rossGardiner/ecto-trigger/tree/main/model_weights
Citation
@article{https://doi.org/10.1111/2041-210x.70098, author = {Gardiner, Ross J. and Rowlands, Sareh and Simmons, Benno I.}, title = {Towards scalable insect monitoring: Ultra-lightweight CNNs as on-device triggers for insect camera traps}, journal = {Methods in Ecology and Evolution}, volume = {17}, number = {2}, pages = {357-370}, keywords = {artificial intelligence, biodiversity monitoring, camera trap, conservation technology, edge computing, insect camera trap, insects, TinyML}, doi = {https://doi.org/10.1111/2041-210x.70098}, url = {https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210x.70098}, eprint = {https://besjournals.onlinelibrary.wiley.com/doi/pdf/10.1111/2041-210x.70098}, abstract = {Abstract Camera traps, combined with AI, have emerged to achieve automated, scalable biodiversity monitoring. However, passive infrared (PIR) sensors that typically trigger camera traps are poorly suited for detecting small, fast-moving ectotherms such as insects. Insects comprise over half of all animal species and are key components of ecosystems and agriculture. The need for an appropriate and scalable insect camera trap is critical in the wake of concerning reports of declines in insect populations. This study proposes an alternative to the PIR trigger: ultra-lightweight convolutional neural networks running on low-powered hardware to detect insects in a continuous stream of captured images. We train such models to distinguish insect images from backgrounds. Our design achieves zero latency between trigger and image capture. Our models are rigorously tested and achieve high accuracy ranging from 91.8% to 96.4% AUROC on test data and 58.8% to 87.2% AUROC on field data from distributions unseen during training. The high specificity of our models ensures minimal saving of false positive images, maximising deployment storage efficiency. High recall scores indicate a minimal false negative rate, maximising insect detection. Analysis using saliency maps shows the learned representation of our models to be robust, with low reliance on spurious background features. Our method is also shown to operate deployed on off-the-shelf, low-powered microcontroller units, consuming a maximum power draw of less than 300 mW. This paves the way for scalable systems with longer deployment times. Overall, we fully define the properties of a successful trigger for camera traps and show how lightweight AI models, made bespoke for efficient hardware, can be realised with a specific focus on insect ectotherms. We provide these models to the community alongside a complete codebase for future modifications, and we demonstrate how they can be deployed on an example ESP32-S3 microcontroller platform. This step potentiates a major advancement for ectotherm camera traps and insect monitoring.}, year = {2026}}