  Smart farming and precision agriculture represent game-changer technologies
for efficient and sustainable agribusiness. Miniaturized palm-sized drones can
act as flexible smart sensors inspecting crops, looking for early signs of
potential pest outbreaking. However, achieving such an ambitious goal requires
hardware-software codesign to develop accurate deep learning (DL) detection
models while keeping memory and computational needs under an ultra-tight
budget, i.e., a few MB on-chip memory and a few 100s mW power envelope. This
work presents a novel vertically integrated solution featuring two ultra-low
power System-on-Chips (SoCs), i.e., the dual-core STM32H74 and a multi-core GWT
GAP9, running two State-of-the-Art DL models for detecting the Popillia
japonica bug. We fine-tune both models for our image-based detection task,
quantize them in 8-bit integers, and deploy them on the two SoCs. On the
STM32H74, we deploy a FOMO-MobileNetV2 model, achieving a mean average
precision (mAP) of 0.66 and running at 16.1 frame/s within 498 mW. While on the
GAP9 SoC, we deploy a more complex SSDLite-MobileNetV3, which scores an mAP of
0.79 and peaks at 6.8 frame/s within 33 mW. Compared to a top-notch
RetinaNet-ResNet101-FPN full-precision baseline, which requires 14.9x more
memory and 300x more operations per inference, our best model drops only 15\%
in mAP, paving the way toward autonomous palm-sized drones capable of
lightweight and precise pest detection.
