AbstractTrains with a different number of carriages can induce stress responses with varying amplitudes in the long-span steel bridges, which consequently cause different levels of fatigue damage. To better evaluate the fatigue life of bridges, it is important to obtain the volume and types of different trains running on bridges. To overcome errors in identifying the different trains caused by electronic noise and, to more efficiently utilize machine learning techniques, the original train weigh-in-motion (WIM) time series are encoded into images. Subsequently, a support vector machine (SVM) based approach is proposed to classify trains with a different number of carriages. The method is divided into three steps: data conversion for image preprocessing, feature extraction for machine learning, and train category classification with SVM. In the image preprocessing step, the time history of the WIM train passing data is saved into image format. In the feature extraction step, the Histogram of Oriented Gradients (HOG) is obtained in row vectors for each image as input for machine learning. In the train carriage classification step, SVM is adopted as the machine learning model to predict different train types. To verify the proposed approach, train WIM data from the structural health monitoring (SHM) system of a suspension bridge are employed, and an accuracy of 97.5% is achieved in the classification of trains when considering noisy datasets. Compared with other state-of-the-art machine learning algorithms, i.e., AdaBoost, K-Nearest Neighbor (KNN), and Linear Classification (LC) Model, the SVM leads to the highest prediction accuracy and shortest computation time.