Accurate T2 mapping using multi-echo spin-echo data is a time-consuming process due to stimulated echo correction. In this study, we developed an artificial neural network for real-time T2 mapping. The training dataset using both in-vivo data and model-based synthetic data demonstrated the best performance. The resulting T2 map shows mean T2 errors of less than 0.3 ms with minimal computation time (less than 1 sec as opposed to 8.3 hours for conventional method). An additional algorithm was developed to ensure the fidelity of the T2 map at the cost of slightly increased computation time.