The use of drones to inspect transmission lines is an important task for the energy maintenance department to ensure the stability and safety of power transmission. However, the current electric power inspection is inseparable from the participation of artificial vision. It is necessary to establish an automatic visual recognition technology with high reliability, high flexibility, and low embedded cost. This paper develops an improved YOLOv5S deep-learning-based transmission line disaster prevention safety detection model, called Model E. Compared to the original network, we use the Ghost convolution operation in the Model E network to improve the redundant computation caused by the conventional convolution operation. The BiFPN network structure is adopted to enhance the feature extraction ability of the original PANet network for unsafe objects in the transmission line image. This occurs in the process of Model E transmission line disaster prevention safety detection model learning. Equalized Focal Loss (EFL) is used to improve the Model E sample imbalance problem processing mechanism. The Model E proposed in this paper is 6.9%, 1.7%, 1.7%, and 2.9% higher than the current lightweight mainstream algorithms YOLOv3-Tiny and YOLOv5S, Model C (based on the original YOLOv5S network, the BiFPN structure in the Model E network part is improved), and Model D network (in the Backbone layer, four conventional convolutions are improved as Ghost convolution operations, and the rest of the structure is the same as the Model E network) in mAP@.5 evaluation index. Meanwhile, the size of the model is only 79.5%, 97.7%, 84.9%, and 93.8% of the above algorithm model. The experimental results show that the Model E transmission line disaster prevention and safety detection model proposed in this paper shows stronger competitiveness and advancement, with high reliability, flexibility, and fast detection ability, and can be applied to cost, reliability, and efficiency in order to have a higher standard of practical engineering needs.