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 条
  • [31] Research on Automated Fiber Placement Surface Defect Detection Based on Improved YOLOv7
    Wen, Liwei
    Li, Shihao
    Dong, Zhentao
    Shen, Haiqing
    Xu, Entao
    APPLIED SCIENCES-BASEL, 2024, 14 (13):
  • [32] Surface Defect Detection Algorithm for Strip Steel Based on Improved YOLOv7 Model
    Wang, Zhu
    Liu, Weisheng
    IAENG International Journal of Computer Science, 2024, 51 (03) : 308 - 316
  • [33] Underwater Target Detection Based on Improved YOLOv7
    Liu, Kaiyue
    Sun, Qi
    Sun, Daming
    Peng, Lin
    Yang, Mengduo
    Wang, Nizhuan
    JOURNAL OF MARINE SCIENCE AND ENGINEERING, 2023, 11 (03)
  • [34] Mask wearing detection based on improved YOLOv7
    Fu Hui-chen
    Gao Jun-wei
    Che Lu-yang
    CHINESE JOURNAL OF LIQUID CRYSTALS AND DISPLAYS, 2023, 38 (08) : 1139 - 1147
  • [35] Helmet Detection Algorithm Based on Improved YOLOv7
    Yilihamu, Yaermaimaiti
    Liu, Yajie
    Xi, Lingfei
    Wang, Ruohao
    AUTOMATIC CONTROL AND COMPUTER SCIENCES, 2024, 58 (06) : 642 - 655
  • [36] Ship Detection and Recognition Based on Improved YOLOv7
    Wu, Wei
    Li, Xiulai
    Hu, Zhuhua
    Liu, Xiaozhang
    CMC-COMPUTERS MATERIALS & CONTINUA, 2023, 76 (01): : 489 - 498
  • [37] Underwater Target Detection Based on Improved YOLOv7
    Fu, Junshang
    Tian, Ying
    IAENG International Journal of Computer Science, 2024, 51 (04) : 422 - 429
  • [38] A Flame Detection Algorithm Based on Improved YOLOv7
    Yan, Guibao
    Guo, Jialin
    Zhu, Dongyi
    Zhang, Shuming
    Xing, Rui
    Xiao, Zhangshu
    Wang, Qichao
    APPLIED SCIENCES-BASEL, 2023, 13 (16):
  • [39] Driver fatigue detection based on improved YOLOv7
    Li, Xianguo
    Li, Xueyan
    Shen, Zhenqian
    Qian, Guangmin
    JOURNAL OF REAL-TIME IMAGE PROCESSING, 2024, 21 (03)
  • [40] Road Pothole Detection Based on Improved YOLOv7
    Ma, Ronggui
    Wang, Jianyu
    Huang, Xunyan
    Zhao, Lulu
    Xu, Meiyu
    2024 9TH INTERNATIONAL CONFERENCE ON COMPUTER AND COMMUNICATION SYSTEMS, ICCCS 2024, 2024, : 190 - 195