Abstract:The supporting and suspension parts of the catenary are the key infrastructure of the railway catenary. However, due to the long-term contact-induced vibration between pantograph and catenary, the components of the catenary are prone to various defects. Defect monitoring based on 4C images of catenary is the key to operation and maintenance tasks, which directly relates to the safety and reliability of railway transportation. Traditional manual inspection methods face challenges such as high labor intensity, low efficiency, and a high missed detection rate. Therefore, using image processing and artificial intelligence technology to detect defects automatically is a hot issue in this research field. The components of the catenary are diverse in type, and samples of each type of defect are scarce, making the existing deep learning methods that rely on a large number of training samples difficult to apply. To overcome this problem, we proposed a classification method, named defect detection based on variational autoencoder (DefVAE) for catenary. This method was based on the assumption that samples of the same class follow a Gaussian distribution in the feature space. It utilized the potential features from the output of a variational autoencoder (VAE) to determine the feature distribution of known defect samples and generated a large amount of defect data through resampling and decoding in the distribution space to compensate for the lack of samples. During the encoding phase, we incorporated auxiliary label information to increase the inter-class distribution distance in the latent feature space. During the defect classification phase, we adopted an image generation method assisted by sliding labels and combined the reconstruction error to improve the classification accuracy. The results of comparative and ablation experiments on open-source datasets and catenary 4C datasets show that DefVAE outperforms the baseline methods in most indicators on the open-source datasets and has high classification accuracy in the classification of catenary defects.