Counting soybean pods is crucial for yield forecasts, yet manual counting is slow and error‑prone. Now, a new ultra‑light AI model can deliver fast, accurate estimates even on cheap devices. The trick lies in three steps: network simplification, weight quantization, and the addition of squeeze‑and‑excitation (SE) self‑attention blocks. These methods shrink the parameter count from over 20 million to under 2 million while keeping accuracy between 84% and 87%. The result is a model that runs on a Raspberry Pi or other edge devices without needing powerful servers. It has also been tested with drone‑captured images, allowing farmers to monitor fields in real time. Compared with bulkier solutions like YOLO POD or SoybeanNet, the new architecture offers similar or better performance but with memory usage reduced by a factor of 9 to 65. Future work aims to enlarge the dataset with photos of diverse soybean varieties and to try other attention mechanisms such as CBAM or ECA, making pod counting even more reliable. The ultimate goal is to bring this technology straight to the fields, turning precision agriculture into an accessible reality for everyone.
The proposed model combines three optimization strategies to drastically cut computational complexity while preserving feature extraction capability. First, network simplification removes redundant layers and reduces channel width, keeping a standard block‑based convolutional architecture. Next, weight quantization converts 32‑bit values to 8‑bit representations, lowering memory usage and speeding inference on low‑power hardware. The core innovation is the integration of SE blocks, which introduce a channel‑specific self‑attention mechanism: the activation tensor is compressed via a squeeze bottleneck and then re‑expanded (excitation) to generate importance weights for each channel. This enables the model to focus on relevant features, improving discrimination between pods and background. During training, a dataset of over 10,000 aerial soybean field images, manually labeled for pod count, was used. Loss was optimized with a combination of cross‑entropy and L1 regression, while the primary metric was correct estimation percentage (accuracy). Results show that despite a 30‑50× reduction in parameters, accuracy remains in the 84‑87% range, comparable to models with over 20 million parameters. Ablation analysis confirmed that removing SE blocks drops accuracy by about 2 percentage points, highlighting their impact. Future work includes testing more sophisticated attention mechanisms (CBAM, ECA) and deploying the model on ARM Cortex‑M microcontrollers to assess real‑field performance under varying lighting and vegetation cover conditions.
