YIN Jianjun, KANG Junqi, XIAO Deqin. Lightweight detection algorithm for duck egg cracks based on improved YOLOv5l[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(5): 216-223. DOI: 10.11975/j.issn.1002-6819.202307259
    Citation: YIN Jianjun, KANG Junqi, XIAO Deqin. Lightweight detection algorithm for duck egg cracks based on improved YOLOv5l[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2024, 40(5): 216-223. DOI: 10.11975/j.issn.1002-6819.202307259

    Lightweight detection algorithm for duck egg cracks based on improved YOLOv5l

    • Accurate and rapid crack detection has been one of the most important steps in duck eggs before processing. The shell of duck eggs may crack, particularly when subjected to the vibration, extrusion, and collision during production, transportation, packaging and storage. The microorganism can then invade through the crack, easy to cause the deterioration of duck eggs. Furthermore, the damage of one duck egg can greatly affect the processing requirements of the whole batch. However, manual detection cannot fully meet the large-scale production in recent years, due to the unstable accuracy rate, low efficiency and industrialization in the poultry egg industry at present. In this study, a lightweight detection was proposed for the multi-column cracks of duck eggs using improved YOLOv5l (you only look once version5 large). The better detection of duck egg was achieved in the simple, small amount of calculation and storage. A LED light was used to illuminate the duck egg under dark conditions. There was the difference of light transmittance between cracked eggshell and intact eggshell. Specifically, the Ghost_conv module was introduced to replace the original convolution in YOLOv5. The calculation and parameters of model were greatly reduced to increase the training speed with more lightweight. In addition, ECA (efficient channel attention) attention mechanism was added to the backbone Network and BIFPN (bi-directional feature pyramid network). The effective information was detected using the attention mechanism. Among them, the BIFPN was used to extract and fuse some features at different scales. The accuracy of model was improved to reduce the missing and wrong detection. At the same time, the fusion of CIoU and α-IoU loss function was used to replace the original GIoU function of YOLOv5, thus accelerating the regression prediction. A dataset of duck egg was obtained with 892 images, where a camera was used to capture duck eggs rolling on a conveyor. The dataset was then enhanced by random cropping, adding noise and mixup, in order to further improve the generalization and robustness of the model. The self-developed dataset of duck egg cracks was utilized to verify the detection performance of the improved model. The results show that the improved YOLOv5l network model shared the high performance. The detection accuracy of the improved model on the test set was 93.8%, which was 6.3 percentage points higher than that of the original YOLOv5l model. The number of parameters, floating point arithmetic and the occupied storage was reduced by 30.6%, 39.4% and 34.6%, respectively. The frame rate of detection was 28.954 frames /s, which was only 3.824 frames /s lower than the original YOLOv5l model. The detection accuracy of the improved YOLOv5l increased by 13.1, 12.5 and 8.2 percentage points, respectively, compared with the common target detection networks, such as single shot MultiBox detector (SSD), YOLOv4, and faster-RCNN (faster region convolutional neural networks). The high-precision detection with the low hardware resources can be expected to provide the promising solutions and technical applications.
    • loading

    Catalog

      /

      DownLoad:  Full-Size Img  PowerPoint
      Return
      Return