YUN Yuliang, HUANG Jinlong, LI Dehao, et al. Real-time peanut pod recognition method based on lightweight model PPINET[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2025, 41(12): 182-190. DOI: 10.11975/j.issn.1002-6819.202502064
Citation: YUN Yuliang, HUANG Jinlong, LI Dehao, et al. Real-time peanut pod recognition method based on lightweight model PPINET[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2025, 41(12): 182-190. DOI: 10.11975/j.issn.1002-6819.202502064

Real-time peanut pod recognition method based on lightweight model PPINET

  • Convolutional neural network (CNN) algorithms have been confined to recognizing the peanut pod's appearance, such as the high memory consumption, computational complexity, and the difficulty of deployment on resource-constrained edge devices. This study aims to propose an efficient, lightweight, and real-time identification model, named PPINET (peanut pod identification network). Specifically, the embedded systems were designed for the PPINET model. The high accuracy and low latency were achieved to significantly reduce the computational overhead, thereby highly suitable for intelligent agricultural applications. The architecture of the PPINET was integrated with the depthwise separable convolutions and then inverted the residual blocks. Both the number of parameters and floating-point operations (FLOPs) were effectively reduced to extract the discriminative features from the peanut pod images. This lightweight backbone was better performed to efficiently deploy on the low-power edge devices. A lightweight attention module ( multi-query attention (MQA) mechanism) was incorporated to further enhance the feature extraction. Furthermore, the embedded deployment was optimized to strengthen the network’s focus on the key features. Thereby the classification accuracy and robustness were improved under variable conditions. The TuNAS (easy-to-tune and scalable implementation of efficient neural architecture search (NAS) with weight sharing) was adopted to adaptively optimize the model structure for the deployment environments with strict resource constraints. A convolutional unit called Tun was integrated with the multiple configurable inverted residual blocks. The architecture was dynamically adjusted, according to the application needs. The PPINET remained adaptable and efficient over various hardware platforms. Several training strategies were employed to further enhance the performance of the model. A pipeline was also introduced to refine the image preprocessing. Among them, contour extraction and precise cropping were used to mitigate the distortions caused by traditional image scaling. The quality of the training samples significantly improved the generalization for the different appearances of the peanut pod. In addition, a cosine annealing schedule was applied to dynamically adjust the learning rate. The convergence was accelerated to avoid the suboptimal local minima. In deployment, the model was quantized into the RKNN format. The hardware-level acceleration was realized on a Rockchip RK3588 platform equipped with a neural processing unit (NPU). The quantization significantly reduced the memory usage and inference latency with the high performance of the classification. The final model size was only 1.85 MB suitable for the embedded environments, with 0.49 million parameters and a computational complexity of just 0.30 GFLOPs. Experimental results demonstrated that the PPINET achieved an outstanding classification accuracy of 98.65% in the peanut pod. Furthermore, the comparative results showed that the inclusion of the MQA module improved the accuracy of the recognition by up to 2.34% over the conventional attention mechanisms, such as the SE (squeeze-and-excitation) and CBAM (convolutional block attention module), indicating the superior performance-to-efficiency trade-off. In deployment tests, the PPINET was achieved at an inference speed of 321 frames per second (fps) on the RK3588 development board. The better performance significantly outperformed the popular embedded systems, like the Raspberry Pi 4B and Jetson Nano. This real-time processing was effectively used in the automated sorting of the peanut pod. The rapid and accurate classification was essential to improve agricultural productivity. Particularly, the compact architecture and hardware-accelerated design were well-suited for the smart farming applications, fully meeting the requirement of the low-power, real-time AI solutions. In conclusion, the PPINET successfully solved the technical bottlenecks and then deployed the CNN recognition models on the embedded devices using the lightweight and efficient network. A scalable NAS framework was combined with the optimal attention mechanisms and the hardware-friendly quantization. This work can provide a practical and reliable solution to identify the real-time agricultural product in the edge AI applications for precision agriculture.
  • loading

Catalog

    Turn off MathJax
    Article Contents

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return