Bearings are key components in mechanical equipment, which are widely used in various fields such as automobiles and airplanes. Aiming at the analysis of vibration signal processing under the variable speed condition of bearings, this paper proposes a new bearing fault diagnosis method, which firstly resamples the vibration signals in the angular domain, and then converts the resampled signals into images by the relative position matrix method, and finally uses the transfer learning to automatically extract the features and classify them. To verify the effectiveness of the method, it is tested on the Case Western Reserve University bearing fault dataset and University of Ottawa bearing fault dataset respectively. Compared with other time series to image methods (Recurrence Plot, etc) and other pre-trained models (GoogLeNet, etc), the proposed method has some advantages in terms of accuracy, image generation time, training time, and testing time. The accuracy of the proposed method in this paper reaches more than 90%, which suggests its potential effectiveness in the classification of bearing faults under variable speed working conditions.