In this paper, we develop an internet of medical things (IoMT)-based electrocardiogram(ECG) recorder for monitoring heart conditions in practical cases. To remove noise from signals recorded by these non-clinical devices, we propose a cloud-based denoising approach that utilizes deep neural network techniques in the time-frequency domain through the two stages. Accordingly, we exploit the fractional Stockwell transform (FrST) to transfer the ECG signal into the time-frequency domain and apply the deep robust two-stage network (DeepRTSNet) for the noise cancellation.