I. Introduction
The Internet of Things (IoT) is vital in developing intelligent healthcare systems for patient monitoring and diagnosing various diseases using physiological signals and medical images [1]. Tuberculosis is a bacterial infection disorder that affects the person's lungs [2]. Similarly, pneumonia disease is a type of respiratory infection that occurs due to viruses or bacteria [3]. Chest X-ray imaging is widely used in the clinical standard to screen pneumonia, tuberculosis, and other thoracic diseases [3], [4]. Portable radiography imaging has been utilized to diagnose COVID and other diseases [5]. The pathological changes, such as the enhanced bronchovascular markings, consolidation in lungs, and alveolar infiltrates (affected areas of the lung look cloudy) in the chest X-ray images are used to detect pneumonia. Similarly, for tuberculosis, cavitary lesions (dark and fluid-filled regions within lung opacities), pleural effusion, and right-sided infiltration are observed in the chest X-ray images. Chest X-ray images are frequently generated in hospitals with large numbers of patients. It is a time-consuming task for radiologists to manually investigate the chest X-ray of each subject to diagnose tuberculosis and other thoracic diseases [4]. Therefore, automated approaches based on artificial intelligence (AI) algorithms are used to assist radiologists in predicting the type of disease from the chest X-ray images [4]. Developing novel AI-based methods for the automated detection of different thoracic diseases from chest X-ray images is important for IoT-based smart healthcare applications.