We present a new method by which the total masses of galaxies including dark matter can be estimated from the kinematics of their globular cluster systems (GCSs). In the proposed method, we apply the convolutional neural networks (CNNs) to the two-dimensional (2D) maps of line-of-sight-velocities (V) and velocity dispersions (σ) of GCSs predicted from numerical simulations of disk and elliptical galaxies. In this method, we first train the CNN using either only a larger number (∼200 000) of the synthesized 2D maps of σ (“one-channel”) or those of both σ and V (“two-channel”). Then we use the CNN to predict the total masses of galaxies (i.e. test the CNN) for the totally unknown dataset that is not used in training the CNN. The principal results show that overall accuracy for one-channel and two-channel data is 97.6 per cent and 97.8 per cent respectively, which suggests that the new method is promising. The mean absolute errors (MAEs) for one-channel and two-channel data are 0.288 and 0.275 respectively, and the value of root mean square errors (RMSEs) are 0.539 and 0.51 for one-channel and two-channel respectively. These smaller MAEs and RMSEs for two-channel data (i.e. better performance) suggest that the new method can properly consider the global rotation of GCSs in the mass estimation. We also applied our proposed method to real data collected from observations of NGC 3115 to compare the total mass predicted by our proposed method and other popular methods from the literature.