The thermal anomaly area of electrical equipment in the substation is often hidden due to its small thermal area and multiple anomalies overlaid. Accurately identify the thermal area is demanded on the condition detection of electrical equipment, where the anomaly points of electrical equipment in infrared images are generally small and of low resolution. We propose an improved YOLOv4 algorithm for infrared image anomaly area identification, which can detect the thermal generation phenomenon of electrical equipment. We add a new target detection branch to the shallow feature map of 104×104, which can better extract small target semantic information. The training process is enhanced with cosine annealing and mosaic data enhancement. We establish a total of 719 infrared images of five types of thermal anomalies electrical equipment to test our network. The accuracy of our model reach to as high as 96.78%, with a detection speed of 17 f/s and an [email protected] of 94.23%. Compared with SSD, YOLOv4 and Faster RCNN, the algorithm in this paper obtains the highest [email protected] with 94.23%, which is the best performance compared with the original YOLOv4 model in accuracy. The model is robust to noise and luminance disturbances, and still provides good recognition under disturbances.