A Candy Defect Detection Method Based on StyleGAN2 and Improved YOLOv7 for Imbalanced Data

被引:0
|
作者
Li, Xingyou [1 ]
Xue, Sheng [1 ]
Li, Zhenye [1 ]
Fang, Xiaodong [1 ]
Zhu, Tingting [1 ]
Ni, Chao [1 ]
机构
[1] Nanjing Forestry Univ, Coll Mech & Elect Engn, Nanjing 210037, Peoples R China
关键词
computer vision; deep learning; defects detection; generative adversarial networks; YOLOv7; VISION;
D O I
10.3390/foods13203343
中图分类号
TS2 [食品工业];
学科分类号
0832 ;
摘要
Quality management in the candy industry is a vital part of food quality management. Defective candies significantly affect subsequent packaging and consumption, impacting the efficiency of candy manufacturers and the consumer experience. However, challenges exist in candy defect detection on food production lines due to the small size of the targets and defects, as well as the difficulty of batch sampling defects from automated production lines. A high-precision candy defect detection method based on deep learning is proposed in this paper. Initially, pseudo-defective candy images are generated based on Style Generative Adversarial Network-v2 (StyleGAN2), thereby enhancing the authenticity of these synthetic defect images. Following the separation of the background based on the color characteristics of the defective candies on the conveyor belt, a GAN is utilized for negative sample data enhancement. This effectively reduces the impact of data imbalance between complete and defective candies on the model's detection performance. Secondly, considering the challenges brought by the small size and random shape of candy defects to target detection, the efficient target detection method YOLOv7 is improved. The Spatial Pyramid Pooling Fast Cross Stage Partial Connection (SPPFCSPC) module, the C3C2 module, and the global attention mechanism are introduced to enhance feature extraction precision. The improved model achieves a 3.0% increase in recognition accuracy and a 3.7% increase in recall rate while supporting real-time recognition scenery. This method not only enhances the efficiency of food quality management but also promotes the application of computer vision and deep learning in industrial production.
引用
收藏
页数:18
相关论文
共 50 条
  • [41] A Driver Abnormal Behavior Detection Method Based on Improved YOLOv7 and OpenPose
    Cai, Xingquan
    Zhou, Shun
    Yao, Jiali
    Cheng, Pengyan
    Hu, Yan
    ADVANCED INTELLIGENT COMPUTING TECHNOLOGY AND APPLICATIONS, ICIC 2023, PT V, 2023, 14090 : 239 - 250
  • [42] Banana Pseudostem Visual Detection Method Based on Improved YOLOV7 Detection Algorithm
    Cai, Liyuan
    Liang, Jingming
    Xu, Xing
    Duan, Jieli
    Yang, Zhou
    AGRONOMY-BASEL, 2023, 13 (04):
  • [43] Steel surface defect detection based on lightweight YOLOv7
    Shi, Tao
    Wu, Rongxin
    Zhu, Wenxu
    Ma, Qingliang
    OPTOELECTRONICS LETTERS, 2025, 21 (05) : 306 - 313
  • [44] Grape Target Detection Method in Orchard Environment Based on Improved YOLOv7
    Sun, Fuchun
    Lv, Qiurong
    Bian, Yuechao
    He, Renwei
    Lv, Dong
    Gao, Leina
    Wu, Haorong
    Li, Xiaoxiao
    AGRONOMY-BASEL, 2025, 15 (01):
  • [45] A Pineapple Target Detection Method in a Field Environment Based on Improved YOLOv7
    Lai, Yuhao
    Ma, Ruijun
    Chen, Yu
    Wan, Tao
    Jiao, Rui
    He, Huandong
    APPLIED SCIENCES-BASEL, 2023, 13 (04):
  • [46] Optimizing YOLOv7 for Semiconductor Defect Detection
    Dehaerne, Enrique
    Dey, Bappaditya
    Halder, Sandip
    De Gendt, Stefan
    METROLOGY, INSPECTION, AND PROCESS CONTROL XXXVII, 2023, 12496
  • [47] Steel surface defect detection based on lightweight YOLOv7
    SHI Tao
    WU Rongxin
    ZHU Wenxu
    MA Qingliang
    Optoelectronics Letters, 2025, 21 (05) : 306 - 313
  • [48] Lightweight UAV Image Drowning Detection Method Based on Improved YOLOv7
    Cui, Yuhao
    Li, Mingqiu
    Huang, Xupeng
    Yang, Yang
    2024 WRC SYMPOSIUM ON ADVANCED ROBOTICS AND AUTOMATION, WRC SARA, 2024, : 350 - 356
  • [49] An improved YOLOv7 method for vehicle detection in traffic scenes
    Wang, Yanwei
    Tian, Ye
    Cheng, Junting
    Meng, Xianglin
    Xie, Zeming
    2023 35TH CHINESE CONTROL AND DECISION CONFERENCE, CCDC, 2023, : 766 - 771
  • [50] Power Insulator Defect Detection Method Based on Enhanced YOLOV7 for Aerial Inspection
    Hu, Jun
    Wan, Wenwei
    Qiao, Peng
    Zhou, Yongqi
    Ouyang, Aiguo
    ELECTRONICS, 2025, 14 (03):