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 条
  • [1] An Enhanced Detection Method of PCB Defect Based on Improved YOLOv7
    Yang, Yujie
    Kang, Haiyan
    ELECTRONICS, 2023, 12 (09)
  • [2] A Photovoltaic Panel Defect Detection Method Based on the Improved Yolov7
    Liu, Hongzhi
    Zhang, Fenghe
    2024 5TH INTERNATIONAL CONFERENCE ON MECHATRONICS TECHNOLOGY AND INTELLIGENT MANUFACTURING, ICMTIM 2024, 2024, : 359 - 362
  • [3] Transparent Component Defect Detection Method Based on Improved YOLOv7 Algorithm
    Xiao, Qixun
    Huang, Jingde
    Huang, Zhangyu
    Li, Chenyu
    Xu, Jie
    INTERNATIONAL JOURNAL OF PATTERN RECOGNITION AND ARTIFICIAL INTELLIGENCE, 2023, 37 (14)
  • [4] Rail Surface Defect Detection Based on Improved YOLOv7
    Chen, Renxiang
    Pan, Sheng
    Yang, Lixia
    Gao, Xiaopeng
    Wang, Jianxi
    Journal of Railway Engineering Society, 41 (07): : 18 - 24
  • [5] Steel Surface Defect Detection Based on Improved YOLOv7
    Li, Ming
    Wei, Lisheng
    Zheng, Bowen
    2024 4TH INTERNATIONAL CONFERENCE ON COMPUTER, CONTROL AND ROBOTICS, ICCCR 2024, 2024, : 51 - 55
  • [6] STRIP SURFACE DEFECT DETECTION BASED ON IMPROVED YOLOV7
    Wu, Huixin
    Chen, Kaiyuan
    Ni, Mengqi
    Ma, Lin
    INTERNATIONAL JOURNAL OF INNOVATIVE COMPUTING INFORMATION AND CONTROL, 2024, 20 (05): : 1493 - 1507
  • [7] Research on Low Contrast Surface Defect Detection Method Based on Improved YOLOv7
    Chen, Shuang
    Li, Weipeng
    Yan, Xiang
    Liu, Wen
    Chen, Chao
    Liao, Jinwei
    Chen, Xu
    Shu, Jianqi
    IEEE ACCESS, 2024, 12 : 179997 - 180008
  • [8] A Defect Detection Method Based on YOLOv7 for Automated Remanufacturing
    Satsangee, Guru Ratan
    Al-Musaibeli, Hamdan
    Ahmad, Rafiq
    APPLIED SCIENCES-BASEL, 2024, 14 (13):
  • [9] A fast defect detection method for PCBA based on YOLOv7
    Liu, Shugang
    Chen, Jialong
    Yu, Qiangguo
    Zhan, Jie
    Duan, Linan
    KSII TRANSACTIONS ON INTERNET AND INFORMATION SYSTEMS, 2024, 18 (08): : 2199 - 2213
  • [10] Grape Disease Detection Method Based on StyleGAN2—ADA and Improved YOLO v7
    Zhang L.
    Ba Y.T.
    Zeng Q.
    Nongye Jixie Xuebao/Transactions of the Chinese Society for Agricultural Machinery, 2024, 55 (01): : 241 - 252