Automatic defect detection in electroluminescence (EL) images of photovoltaic (PV) modules in production line remains as a challenge to replace time‐consuming and expensive human inspection and improve capacity. This paper presents a deep learning‐based automatic detection of multitype defects to fulfill inspection requirements of production line. At first, a database composed of 5983 labeled EL images of defective PV modules is built, and 19 types of identified defects are introduced. Next, a convolutional neural network is trained on top‐14 defects, and the best model is selected and tested, achieving 70.2% mAP50 (mean average precision with at least 50% localization accuracy). Then, through analyzing an object detection‐based confusion matrix, recognition bias and detection compensation in missed defects that restrain the best model's mAP50 are discovered to be harmless to normal/defective module classification in real production line. Finally, after setting specific screen criteria for different types of defects, normal/defective module classification is conducted on additionally collected 4791 EL images of PV modules on 3 days, and the best model achieves balanced scores of 95.1%, 96.0%, and 97.3%, respectively. As a result, this method surely has a highly promising potential to be adopted in real production line.