Research on improved target detection method based on Canny-YOLO
To address the problem of insufficient defect detection capabilities in current military and industrial products,a fusion enhancement model based on the Canny-YOLOv7 algorithm was proposed focusing on small target defect detection that is com-monly employed in production.The model primarily utilizes the Canny edge detection algorithm to identify potential defect areas in images,enhancing the features of these areas.Based on this,the YOLOv7 model was improved to enhance its generalization abil-ity.First,to improve the model's capability to extract subtle defect features,the ELAN module in the original backbone network was replaced with the Swin Transformer(STR)module.Second,the SIOU loss function was incorporated,enabling the improved model to quickly learn accurate target positioning.Finally,the LeakyReLU activation function was adopted to reduce computational overhead and further improve the model's detection speed.Experimental results demonstrate that,under the same dataset,the pro-posed enhanced model achieves an average detection accuracy of 97.5%,which is 4.6%higher than that of the original YOLOv7 model.Additionally,the detection speed(FPS)reaches 52.45,meeting real-time detection requirements.
deep learningdefect detectionYOLOv7 modelCanny algorithmSwin Transformer