In order to improve the speed and accuracy of LCD defect detection,this paper designs an system for LCD defect detection based on deep learning.Aiming at the problem that the Yolov5 detection algorithm in the real-time detection system has in-sufficient ability to extract global information,this paper constructs the C3TR module based on the Transformer architecture and C3 module and adds it to the Yolov5 basic model.Experimental results show that the proposed algorithm reaches 90.9%and 90.3%in accuracy and recall,respectively,which is improved by 4.1%and 1.4%compared with Yolov5 basic algorithm,respectively.