Nuclear magnetic resonance (NMR) is an important tool for characterizing pore size distributions of reservoir rocks. Pore-scale simulations from digital rocks (micro-CT images) provide deep insights into the correlation between pore structures and NMR relaxation processes. Conventional NMR simulations using the random walk method could be computationally expensive at high image resolution and particle numbers. This work introduces a novel machine-learning-based approach as an alternative to conventional random walk simulation for rapid estimation of NMR magnetization signals. This work aims to establish a "value-to-value" model using artificial neural networks to create a nonlinear mapping between the input of Minkowski functionals and surface relaxivity, and NMR magnetization signals as the output. The proposed workflow includes three main steps. The first step is to extract subvolumes from digital rock duplicates and characterize their pore geometry using Minkowski functionals. Then random walk simulations are performed to generate the output of the training dataset. An optimized artificial neural network is created using the Bayesian optimization algorithm. Numerical results show that the proposed model, with fewer inputs and simpler network architecture than the referenced model, achieves an excellent prediction accuracy of 99.9% even for the testing dataset. Proper data preprocessing significantly improves training efficiency and accuracy. Moreover, the inputs of the proposed model are more pertinent to NMR relaxation than the referenced model that used twenty-one textural features as input. This works offers an accurate and efficient approach for the rapid estimation of NMR magnetization signals.