In this research, model development is carried out under supervised learning, as the system tries to correct and update itself by comparing the outcome with the target result. After all, only one model category is used, enhanced model performance through substituting the selected features with high sensitivity and low accuracy in clinical knowledge. The experimental analysis shows that the Gradient Boosting (GB) XG Boosting model achieves the best result using the original data set to predict PTB-disease. The ensemble model composed of the Adaboost, Bagging, Random Forest, GB, and Multi-Layer Perceptron models is the best to detect. The Ensemble model reaches 97.8 % accuracy, which exceeds each classification’s accuracy. The model is used to help doctors analyze & evaluate medical cases to validate the diagnosis and minimize human error. It effectively mitigates clinical diagnosis in such difficult challenges as microscopic scanning and reduces the likelihood of misdiagnosis. The model differentiates the patient using a voting method of different machine learning classifiers to provide accurate solutions from having only one model. The novelty of this approach lies in its adaptability to the ensemble model that is continually optimizing itself based on data.