The lungs are vital organs in the respiratory system that exchange gases, such as oxygen and carbon dioxide. However, poor air quality can lead to health problems, including lung diseases such as pneumonia, pneumothorax, lung cancer, and tuberculosis. The objective of this study is to develop an automatic detection model that uses the Convolutional Neural Network (CNN) architecture, specifically MobileNetV2, to classify X-ray images into five categories: four types of lung disease and normal lungs. The dataset consists of 2,500 images, which are divided into five classes: 80% for training, 10% for validation, and 10% for testing. Preprocessing includes resizing images to 224 x 224 pixels, normalizing pixel values, and using augmentation techniques to increase data variation. The resulting model demonstrated good performance, achieving a training accuracy of 98.76% and a validation accuracy of 97.20%. Evaluation using a confusion matrix yielded an overall F1 score of 0.94, with the highest value of 0.98 for pneumothorax. These results suggest that the model can accurately detect and classify lung diseases with an overall accuracy of 94.4%. This research significantly contributes to developing an automated lung disease detection system that can be implemented in web- or mobile-based applications and performs well across all classes.
Copyrights © 2025