• Chinese Core Journal
  • Chinese Science Citation Database (CSCD) Source journal
  • Journal of Citation Report of Chinese S&T Journals (Core Edition)
HUI Yongyong, ZHAO Chunyu, SONG Zhaoyang, et al. A YOLOv5s algorithm based on BiFPN and Triplet attention mechanism for identifing defective apple[J]. Journal of South China Agricultural University, 2025, 46(3): 419-428. DOI: 10.7671/j.issn.1001-411X.202407012
Citation: HUI Yongyong, ZHAO Chunyu, SONG Zhaoyang, et al. A YOLOv5s algorithm based on BiFPN and Triplet attention mechanism for identifing defective apple[J]. Journal of South China Agricultural University, 2025, 46(3): 419-428. DOI: 10.7671/j.issn.1001-411X.202407012

A YOLOv5s algorithm based on BiFPN and Triplet attention mechanism for identifing defective apple

More Information
  • Received Date: July 09, 2024
  • Available Online: March 02, 2025
  • Published Date: March 05, 2025
  • Objective 

    In order to make full use of context information and integrate multi-scale features, a YOLOv5s algorithm based on BiFPN and Triplet attention mechanism (BTF-YOLOv5s) for identifing defective apple was proposed.

    Method 

    Firstly, the additional weights were introduced to the weighted bidirectional feature pyramid network ( BiFPN ) to learn the importance of different input features. The model realized the repeated fusion of multi-scale features through the top-down and bottom-up bidirectional paths, and improved the multi-scale detection ability. Secondly, the Triplet attention mechanism was applied to the Neck layer to enhance the model's ability to represent the correlation between target and contextual information, so that the model could focus more on the learning of apple features. Finally, the Focal-CIoU loss function was used to adjust the loss weight, so that the model payed more attention to defective apple recognition, and improved the perception ability of the model. Different loss functions were compared through ablation experiments. The position of attention mechanism in YOLOv5 structure was changed, and compared with the mainstream algorithms.

    Result 

    On the basis of the initial YOLOv5s model, BTF-YOLOv5s improved the accuracy, recall and mAP by 5.7, 2.2 and 3.5 percentage points respectively, and the memory usage of the model was 14.7 MB. The average accuracy of BTF-YOLOv5s was 5.7, 3.5, 13.3, 3.5, 2.9, 2.6, 2.8 and 0.3 percentage points higher than those of SSD, YOLOv3, YOLOv4, YOLOv5s, YOLOv7, YOLOv8n, YOLOv8s and YOLOv9, respectively.

    Conclusion 

    The model of BTF-YOLOv5s shows significant superiority in identifing defective apples, which provides certain technical support for the picking robot to realize the automatic sorting of high-quality apples and defective apples in the picking process.

  • [1]
    牛桂草, 宋卓展, 刘畅, 等. 中国苹果贸易竞争力评价与分析[J]. 河北农业科学, 2022, 26(3): 97-100.
    [2]
    李大华, 孔舒, 李栋, 等. 基于改进YOLOv7的苹果表面缺陷轻量化检测算法[J]. 河南农业科学, 2024, 53(3): 141-150.
    [3]
    李大华, 赵辉, 于晓. 基于改进谱聚类的重叠绿苹果识别方法(英文)[J]. 光谱学与光谱分析, 2019, 39(9): 2974-2981.
    [4]
    王迎超, 张婧婧, 贾东霖, 等. 基于K-means聚类和改进MLP的苹果分级研究[J]. 河南农业科学, 2023, 52(1): 161-171.
    [5]
    宋怡焕, 饶秀勤, 应义斌. 基于DT-CWT和LS-SVM的苹果果梗/花萼和缺陷识别[J]. 农业工程学报, 2012, 28(9): 114-118.
    [6]
    张震, 周俊, 江自真, 等. 基于改进YOLO v7轻量化模型的自然果园环境下苹果识别方法[J]. 农业机械学报, 2024, 55(3): 231-242. doi: 10.6041/j.issn.1000-1298.2024.03.023
    [7]
    袁杰, 谢霖伟, 郭旭, 等. 基于改进YOLO v7的苹果叶片病害检测方法[J]. 农业机械学报, 2024, 55(11): 68-74.
    [8]
    张莉, 王晓格, 鲍春, 等. 轻量级多任务的苹果成熟度分类模型(特邀)[J]. 激光与光电子学进展, 2024, 61(20): 141-149.
    [9]
    闫彬, 樊攀, 王美茸, 等. 基于改进YOLOv5m的采摘机器人苹果采摘方式实时识别[J]. 农业机械学报, 2022, 53(9): 28-38.
    [10]
    张阳婷, 黄德启, 王东伟, 等. 基于深度学习的目标检测算法研究与应用综述[J]. 计算机工程与应用, 2023, 59(18): 1-13.
    [11]
    REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149. doi: 10.1109/TPAMI.2016.2577031
    [12]
    HE K, GKIOXARI G, DOIIAR P, et al. Mask R-CNN [C]//Proceedings of the IEEE International Conference on Computer Vision(ICCV). Venice: IEEE, 2017: 2961-2969.
    [13]
    LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[C]// Proceedings of the IEEE International Conference on Computer Vision (ICCV). Venice: IEEE, 2017: 2999-3007.
    [14]
    LIU W, ANGUELOV D, ERHAN D, et al. SSD: Single shot MultiBox detector[C]// Computer Vision – ECCV 2016. Cham: Springer International Publishing, 2016: 21-37.
    [15]
    LIU X D, GONG W Y, SHANG L L, et al. Remote sensing image target detection and recognition based on YOLOv5[J]. Remote Sensing, 2023, 15(18): 4459. doi: 10.3390/rs15184459
    [16]
    LI C, LI L, JIANG H, et al. YOLOv6: A single-stage object detection framework for industrial applications[EB/OL]. arXiv: 2209.02976. (2022-09-07)[2024-06-18]. https://doi.org/10.48550/arXiv.2209.02976.
    [17]
    WANG C Y, BOCHKOVSKIY A, LIAO H M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Vancouver: IEEE, 2023: 7464-7475.
    [18]
    TIAN L L, ZHANG H X, LIU B, et al. VMF-SSD: A novel V-space based multi-scale feature fusion SSD for apple leaf disease detection[J]. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 2023, 20(3): 2016-2028. doi: 10.1109/TCBB.2022.3229114
    [19]
    WANG D D, HE D J. Channel pruned YOLO V5s-based deep learning approach for rapid and accurate apple fruitlet detection before fruit thinning[J]. Biosystems Engineering, 2021, 210: 271-281. doi: 10.1016/j.biosystemseng.2021.08.015
    [20]
    化春键, 孙明春, 蒋毅, 等. 基于改进YOLOv7-tiny的多光谱苹果表层缺陷检测[J]. 激光与光电子学进展, 2024, 61(10): 236-244.
    [21]
    朱琦, 周德强, 盛卫锋, 等. 基于DSCS-YOLO的苹果表面缺陷检测方法[J]. 南京农业大学学报, 2024, 47(3): 592-601.
    [22]
    LIN T Y, DOLLAR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]//2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Honolulu: IEEE, 2017: 936-944.
    [23]
    LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 8759-8768.
    [24]
    TAN M X, PANG R M, LE Q V. EfficientDet: Scalable and efficient object detection[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle: IEEE, 2020: 10778-10787.
    [25]
    HU J, SHEN L, SUN G. Squeeze-and-excitation networks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 7132-7141.
    [26]
    WOO S, PARK J, LEE J Y, et al. CBAM: Convolutional block attention module[C]// Computer Vision – ECCV 2018. Cham: Springer International Publishing, 2018: 3-19.
    [27]
    MISRA D, NALAMADA T, ARASANIPALAI A U, et al. Rotate to attend: Convolutional triplet attention module[C]//2021 IEEE Winter Conference on Applications of Computer Vision (WACV). Waikoloa: IEEE, 2021: 3138-3147.
    [28]
    LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(2): 318-327. doi: 10.1109/TPAMI.2018.2858826
    [29]
    ZHENG Z H, WANG P, LIU W, et al. Distance-IoU loss: Faster and better learning for bounding box regression[J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2020, 34(7): 12993-13000. doi: 10.1609/aaai.v34i07.6999
  • Related Articles

    [1]CHEN Xiao-wei, FAN Hui-ying, LIN Wen-yao, CHENG Xiao-liang, YE Yu, CHEN Chun-li, LIAO Ming. Construction of a Recombinant Baculovirus Surface Displaying S1 Protein of M41 Strain of Infectious Bronchitis Virus[J]. Journal of South China Agricultural University, 2012, 33(3): 398-402. DOI: 10.7671/j.issn.1001-411X.2012.03.025
    [2]Construction of a Pseudotype Baculovirus Expressing S1 Protein of Infectious Bronchitis Virus[J]. Journal of South China Agricultural University, 2010, 31(2). DOI: 10.7671/j.issn.1001-411X.2010.02.025
    [3]CHEN Hong-ying,CUI Bao-an,LI Xin-sheng,ZHAO Li,ZHENG Lan-lan,GUAN Qian. Cloning and Sequence Analysis of gB Gene of Chicken Infectious Laryngotracheitis Virus Henan Isolate[J]. Journal of South China Agricultural University, 2007, 28(2): 99-102. DOI: 10.7671/j.issn.1001-411X.2007.02.025
    [4]GUO Xiao-feng,FU Zhen-fang. Moving the Glycoprotein Gene of Rabies Virus to Promoter-Proximal Position and the Generation of the Virus[J]. Journal of South China Agricultural University, 2006, 27(1): 104-106. DOI: 10.7671/j.issn.1001-411X.2006.01.027
    [5]CHEN Feng, WU Kong-xing, ZHANG Qi, FENG Shou-hua, ZHANG Xiu-li, LIAO Qiu-sheng, CAO Yong-ehang. Identification and serotyping of five infectious bronchitis virus isolates[J]. Journal of South China Agricultural University, 2005, 26(4): 92-95. DOI: 10.7671/j.issn.1001-411X.2005.04.023
    [6]CAO Yong-chang,SHI Quan-cheng,MA Jing-yun,BI Ying-zuo. Fusion expression of viral structural protein VP2 of infectious bursal disease virus in E.coli[J]. Journal of South China Agricultural University, 2004, 25(4): 78-81. DOI: 10.7671/j.issn.1001-411X.2004.04.020
    [7]LIN Rui-qing,LUO Man-lin,HUANG Yu-mao,LIU Zhen-ming,XIN Chao-an. Cloning and expression of foot-and-mouth disease virus type O VP1 gene[J]. Journal of South China Agricultural University, 2004, 25(1): 92-95. DOI: 10.7671/j.issn.1001-411X.2004.01.025
    [8]WU Hong zhuan 1,LIU Fu an 1,ZHU Dao zhong 1,Yee wai CHAN 2,Frederick C.LEUNG 2. Cloning and Partial Sequencing gC Gene of Infectious Laryngotracheitis Virus Beijing E2 Strain[J]. Journal of South China Agricultural University, 2000, (4): 71-73. DOI: 10.7671/j.issn.1001-411X.2000.04.022
    [9]Lin YongqingSupervising Professor:Ou Shou-Zhu. ESTABLISHMENT OF HYBRIDOMA CELL LINES SECRETING MONOCLONAL ANTIBODIES AGAINST AVIAN INFECTIOUS BRONCHITIS VIRUS[J]. Journal of South China Agricultural University, 1989, (4): 93-98.
    [10]Xin Chaoan Gu Feixia Qiu Zhenfang. STUDIES ON VIRAL ARTHRITIS[J]. Journal of South China Agricultural University, 1989, (3): 52-57.
  • Cited by

    Periodical cited type(18)

    1. 崔紫宁,陈建平,梁丽梅. “交叉融合”:“微生物天然产物化学”的跨界教育模式. 工业微生物. 2024(01): 194-196 .
    2. 邓杰,尚楠. 芽孢杆菌群体感应系统研究进展. 生物加工过程. 2024(05): 492-499 .
    3. 乔真,李佳霖,秦松. C6-HSL信号及群体淬灭对海洋聚球藻(Synechococcus)菌藻共栖体系的调控作用. 海洋科学. 2024(09): 52-62 .
    4. 李凤兰,吴天祥,邓代霞,袁丹丹,江守发. 太子参乙醇提取物对灰树花菌体生长及胞外多糖的影响机理初步研究. 食品与发酵科技. 2023(02): 28-34 .
    5. 欧凯玉,逄建龙,张一敏,董鹏程,罗欣,毛衍伟. 天然酚类化合物的抑菌作用及在肉与肉制品中的应用研究进展. 食品科学. 2023(09): 358-366 .
    6. 高鑫,李博. 水产腐败群体感应系统与天然抑菌剂的研究进展. 保鲜与加工. 2023(06): 73-80 .
    7. 郑爱娟,陈星,张广民,王泽栋,陈志敏,常文环,蔡辉益,刘国华. N-酰基高丝氨酸内酯酶对肉仔鸡生长性能、屠宰性能和养分表观代谢率的影响. 动物营养学报. 2023(06): 3607-3616 .
    8. 熊儒恒,阎俊,谢晶. 生物被膜初始黏附调控机制及其在食品品质控制中的应用研究进展. 食品科学. 2023(13): 203-215 .
    9. 杨约萍,高倩倩,宁静,宫佳,胡媛媛,施祖荣. 细菌群体通讯信号及其淬灭研究进展. 仲恺农业工程学院学报. 2022(01): 65-70 .
    10. 廖才江,李会,王士源,熊静,梅翠,刘丹,何玉张,彭练慈,宋振辉,陈红伟. 生物被膜:益生菌肠道定植的新策略. 生物工程学报. 2022(08): 2821-2839 .
    11. 乔真 ,李佳霖 ,秦松 . 海洋藻际环境中细菌群体感应研究进展. 生物学杂志. 2022(05): 93-97+107 .
    12. 王亚军,司运美,李彦娟. 群体感应在生物强化功能菌定殖及降解能力增强中的作用研究进展. 应用生态学报. 2022(10): 2871-2880 .
    13. 李艳群,陈柔雯,林宗豪,田新朋,尹浩. 一株群体感应抑制活性海洋放线菌的筛选与鉴定. 热带海洋学报. 2021(01): 75-81 .
    14. 杨艳北,许晶,沈城辉,许继国,饶友生. N-酰基高丝氨酸内酯酶的生物信息学分析. 甘肃农业科技. 2021(02): 31-37 .
    15. 杨艳北,许晶,李袁飞,贡继尚,饶友生. 沼泽红假单胞菌LuxR家族调控蛋白的生物信息学分析. 江苏农业科学. 2021(06): 40-45 .
    16. 郑钰婷,胡宇如,胡方平,蔡学清. 利用aiiA基因筛选抗烟草青枯病生防菌株及其鉴定. 核农学报. 2021(06): 1322-1328 .
    17. 宋凯,周莲,何亚文. DSF-家族群体感应信号生物合成途径与调控机制研究进展. 微生物学通报. 2021(04): 1239-1248 .
    18. 赵祯,肖翎,戚建华,刘韵怡,王年,郁小娟,宋增福. 群体感应淬灭酶YtnP对草鱼肠道菌群结构的影响. 南方农业学报. 2020(11): 2817-2826 .

    Other cited types(13)

Catalog

    ZHAO Xiaoqiang

    1. On this Site
    2. On Google Scholar
    3. On PubMed
    Article views (147) PDF downloads (47) Cited by(31)

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return