Distribution network inspection needs to accurately identify and detect insulators in complex outdoor images. In order to improve the detection efficiency and output stability, an intelligent insulator detection method based on YOLOv5 was proposed. A dataset of 5240 inspection images covering porcelain insulators, glass insulators and composite insulators is constructed, including 4192 training images, 524 validation images and 524 test images. In the image processing stage, Mosaic enhancement, scale transformation and brightness adjustment are used to enrich the appearance of the sample. In the detection stage, YOLOv5 is used to complete insulator positioning, confidence prediction and result output. The model achieves 95.1% precision, 93.8% recall and 96.0% mAP@0.5 on the test set, and the average inference time is 21 ms per image. Experimental results show that the proposed method is suitable for insulator identification and detection of distribution lines, and supports intelligent inspection tasks under air and ground inspection conditions.