In the process of copper electrorefining, accurate detection of electrode plate faults becomes extremely challenging due to various interfering factors such as the low resolution of the captured infrared images, significant noise interference, and dense electrode plate arrangement. To address these issues, this paper proposes an improved YOLOv5-based electrode plate fault detection algorithm called CBS-YOLOv5. This algorithm incorporates
Coordinate Attention (CA) to help the feature extraction network effectively separate target feature information from noise. A small object detection module is constructed to improve the model's ability to enhance the density of rich small object information by increasing the resolution of the feature map. The Path Aggregation Network (PANet) is replaced with a Bi-directional Feature Pyramid Network (BiFPN) to provide more detailed and flexible feature representations for small object detection. Finally, by integrating the Swin Transformer (STR), the CSP bottleneck structure with 3 convolutions (C3) in the detection layer is transformed into a small object detection head (C3STR), forming a four-head structure with the newly added small object detection layer, significantly improving the model's ability to identify dense small objects. Experimental results show that the proposed CBS-YOLOv5 detection model achieves an accuracy of 88.1%, which is 5.7% higher than the base model. This algorithm achieves high detection accuracy and maintains fast detection speed, meeting the standards for real-time fault detection of electrode plates.