Printed circuit boards (PCB) are manufactured and transported and stored in such a way that many factors can lead to different types of defects. Currently, manual defect detection and machine vision-based defect detection methods have problems such as slow detection speed, high false detection rate and fewer types of defects that can be detected. In this paper, a modeling method for PCB defect detection model based on deep learning is proposed. First, to address the problem of difficult feature extraction due to the small size of PCB defects, the original image is first generated at super-resolution by generative adversarial networks, and then the original backbone network of FasterRCNN is replaced by Restnet101 for feature extraction, with a deeper network ensuring better feature extraction results. Experiments show that the model can effectively detect six types of PCB defects: missing holes, pseudo-copper, short circuit, stray, mouse bite and open circuit.