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 条
  • [21] Defect detection of small object solder joints based on improved YOLOv7
    Liu, Zhaolong
    Cao, Wei
    Gao, Junwei
    CHINESE JOURNAL OF LIQUID CRYSTALS AND DISPLAYS, 2024, 39 (10)
  • [22] Research on Surface Defect Detection of Strip Steel Based on Improved YOLOv7
    Lv, Baozhan
    Duan, Beiyang
    Zhang, Yeming
    Li, Shuping
    Wei, Feng
    Gong, Sanpeng
    Ma, Qiji
    Cai, Maolin
    SENSORS, 2024, 24 (09)
  • [23] Improved YOLOv7 Algorithm for Wood Surface Defect Detection
    Jiang, Xingwang
    Zhao, Xingqiang
    Computer Engineering and Applications, 2024, 60 (07) : 175 - 182
  • [24] Automotive Parts Defect Detection Based on YOLOv7
    Huang, Hao
    Zhu, Kai
    ELECTRONICS, 2024, 13 (10)
  • [25] A detection method for dead caged hens based on improved YOLOv7
    Yang, Jikang
    Zhang, Tiemin
    Fang, Cheng
    Zheng, Haikun
    Ma, Chuang
    Wu, Zhenlong
    COMPUTERS AND ELECTRONICS IN AGRICULTURE, 2024, 226
  • [26] Pedestrian Detection Method in Infrared Image Based on Improved YOLOv7
    Liu, Zhengyan
    Dai, Chaoyue
    Li, Xu
    Proceedings of 2023 IEEE 3rd International Conference on Information Technology, Big Data and Artificial Intelligence, ICIBA 2023, 2023, : 946 - 954
  • [27] An efficient method of pavement distress detection based on improved YOLOv7
    Yi, Cancan
    Liu, Jun
    Huang, Tao
    Xiao, Han
    Guan, Hui
    MEASUREMENT SCIENCE AND TECHNOLOGY, 2023, 34 (11)
  • [28] A New Lunar Dome Detection Method Based on Improved YOLOv7
    Tian, Yunxiang
    Tian, Xiaolin
    SENSORS, 2023, 23 (19)
  • [29] Research on optimization method of strip surface defect detection based on YOLOv7
    Qu, Yining
    Shen, Xiaorong
    Ren, Jinpeng
    PROCEEDINGS OF 2023 7TH INTERNATIONAL CONFERENCE ON ELECTRONIC INFORMATION TECHNOLOGY AND COMPUTER ENGINEERING, EITCE 2023, 2023, : 222 - 226
  • [30] Research on Steel Surface Defect Detection with Improved YOLOv7 Algorithm
    Gao, Chunyan
    Qin, Shen
    Li, Manhong
    Lyv, Xiaoling
    Computer Engineering and Applications, 2024, 60 (07) : 282 - 291