Pneumonia significantly threatens human health, especially in children and the elderly. Diagnosing pneumonia using chest radiographs is time consuming and requires expert interpretation. This study proposes a comparative analysis of two algorithm models, namely Support Vector Machine (SVM) and Convolutional Neural Network (CNN), in CNN algorithm, it specifically uses DenseNet121 and InterceptionV3 architectures for the classification of chest X-ray images in pneumonia and normal categories. The methods used include data preprocessing with normalization and augmentation. The dataset is split into training and testing subsets, and implementation of SVM and CNN algorithms for classification. Kaggle provided the dataset for this study, comprising 5,863 chest X-ray images. Metrics such as accuracy, precision, recall, and F1-score calculated from the confusion matrix were used to evaluate the model’s effectiveness. The test findings show that the DenseNet121 model has the best performance among the three models, with an accuracy, recall, and F1-score of 94%. The InceptionV3 model achieved 89% in accuracy, recall, and F1 score, which is higher than DenseNet121. Meanwhile, the SVM model showed the lowest performance with an accuracy of 81%, precision of 85%, recall of 81%, and F1-score of 79%. These outcomes signifies that Convolutional Neural Network (CNN) architectures, particularly DenseNet121, have superior capabilities in extracting complex features from chest X-ray images and show great potential to be applied in automatic and accurate pneumonia detection systems.
Keywords: pneumonia; image classification; support vector machine; densenet121; inceptionV3; chest X-ray