Perbandingan CNN Dan ResNet50 Dalam Klasifikasi Tuberkulosis Pada Citra X-Ray Paru - Muhammad Fathir Aulia; Muhammad Ikhsan (Universitas Budi Darma, 2026)
Tuberculosis (TB) remains a global health problem and requires rapid and consistent early screening. Chest X-rays are widely used because they are practical and economical, but manual interpretation is highly dependent on experts, which can lead to subjectivity, fatigue, and delayed diagnosis. This study aims to compare the performance of a basic Convolutional Neural Network (CNN) and a transfer learning-based ResNet50 in classifying lung X-ray images into two classes, namely TB and Normal, as well as to assess the trade-off between accuracy and computational efficiency. The dataset used is a balanced subset of 1,000 images (500 TB and 500 Normal) divided into 70% training data, 15% validation, and 15% testing with a fixed seed to ensure reproducible experiments. Preprocessing was performed by resizing the images to 224×224 pixels and normalizing the pixel values. ResNet50 used a preprocessing scheme in accordance with the pretrained model. Evaluation was performed using a confusion matrix and accuracy, precision, recall, and F1-score metrics. The test results show that CNN achieved an accuracy of 98.00% with three classification errors, while ResNet50 achieved an accuracy of 99.33% with one classification error and average precision, recall, and F1-score metrics above 0.99. In terms of efficiency, the CNN training time was approximately 40.46 seconds, while ResNet50 took a total of approximately 226.99 seconds. In the robustness test, the CNN inference time was approximately ±100 ms/image and ResNet50 was approximately ±1,900 ms/image. These findings indicate that ResNet50 excels in accuracy and generalization stability, while CNN is more efficient for fast response and limited resource requirements.