Abstract:The quality of electrode is extremely important for the display effect of liquid crystal panel. To solve the problem of difficult detection due to the variety of electrode defects, small scale and complex background, an electrode defect detection method for liquid crystal panels is proposed based on improved YOLOv7 algorithm. Firstly, the CBAM attention module was embedded into the YOLOv7 backbone network to suppress background information interference and strengthen defect features. Secondly, the feature information of the shallow networks and deep networks was fused by cross-level connection operation. Then, the C2f module was integrated into the feature pyramid network to lightweight the model and improve the training speed. Finally, the WIoU was used to replace the loss function of the YOLOv7 model to reduce the harmful gradient caused by low quality labeling and improve the defect location performance. By a customized electrode defect dataset, the results showed that the proposed algorithm was able to achieve an average detection accuracy of 67. 8% for large scratch, scratch, shell and dirt on electrodes with a per-sheet detection time of 5. 6 ms.