The invention discloses a gear defect
visual detection method and
system based on an improved YOLOv5 network. The
system comprises a controller with a built-in improved YOLOv5
network model, a conveying
system composed of a first conveying belt and a second conveying belt, and an
image acquisition module and a rejection mechanism which are built on the conveying system. According to the improvement mode, an unimproved YOLOv5 network is trained through a sample
data set to obtain weight parameters, a
convolution attention mechanism module and a repeated weighted bidirectional feature
pyramid network are added to a YOLOv5
network model, and the weight parameters are migrated to the improved YOLOv5
network model; and training an improved YOLOv5 network model through the
data set, completing the construction of a gear defect detection model, collecting an image through an image collection module, inputting the image into the gear defect detection model for recognition, and rejecting a corresponding defective gear according to a recognition result. According to the invention, accurate identification of gear characteristic defects and automatic detection and sorting of gear multi-surface defects are realized, and the detection efficiency is improved.