With the development of the State Grid, the power lines, equipment and transmission scale are expanding. In order to ensure the stability and safety of electricity, it is necessary to patrol and inspect the power towers and other equipment. With the help of deep learning, neural networks can be used to learn the features in patrol image. In this paper, feature learning model named CNN Transformer Detect Anomalies (CTran_DA) is proposed to detect anomalies in patrol images. CTran_DA uses CNN to learn local features in the image, and uses Transformer to learn global features. This paper innovatively combines the advantages of CNN and Transformer to learn the local details as well as the global feature associations in images. By comparing experiments on out self-constructed dataset, the model outperforms state-of-the-art baselines. Moreover, the Floating Point Operations (FLOPs) and parameters of the model in this paper are smaller than other algorithms. In general, CTran_DA is an efficient and lightweight model to detect anomalies in images.