Internet of Things (IoT) technology has been used in medical care as the Internet of Medical Things (IoMT) to gather sensor data for diagnosing and predicting cardiac disease. IoMT allows users to access real-time tracking information and manually estimate the person's health using Machine Learning (ML) algorithms. The primary goal of the study proposal is to categorize data and forecast heart illness using health information and medical imagery. The suggested IoMT-based Heart Health Prediction and Classification (IoMT-HHPC) model is a medical data categorization and forecasting framework in two phases. If the first stage's outcome effectively predicts heart disease, the second step is image classification. Data collected from medical equipment attached to the person's body were initially categorized. Echocardiography (ECG) images were analyzed to forecast cardiac problems. This article used many ML techniques to forecast cardiac disease. An IoMT-HHPC model with ANN achieved an accuracy of 99.02%, surpassing the performance of other ML algorithms.