Fault diagnosis is important to ensure the safety and efficience of mechanical equipment. In recent years, data-driven fault diagnosis methods have received extensive attention and research from many scholars. Different from the traditional fault feature extraction methods that rely on expert experience, this paper proposes a feature extraction method based on deep learning (DL). In order to meet the needs of neural networks for the amount of data, data augmentation is emploied to increase the amount of original data. Then, a novel signal-to-image mapping (STIM) is proposed to convert the one-dimensional vibration signals into two-dimensional grey images, which greatly reduce the human involvement. Finally, a convolutional neural network (CNN) model is established to extract fault features from grey images and realize fault classification. The learning process of the CNN model is analyzed and two different bearing experiment datasets are used to verify the effectiveness of the proposed method.