BackgroundChest diseases are serious health problems that threaten the lives of people. The early and accurate diagnosis of such diseases is very crucial in the success of their treatment and cure. Pneumonia is one of the most widely occurred chest diseases responsible for a high percentage of deaths especially among children. So, detection and classification of pneumonia using the non-invasive chest x-ray imaging would have a great advantage of reducing the mortality rates.ResultsThe results showed that the best input image size in this framework was 64 64 based on comparison between different sizes. Using CNN as a deep features extractor and utilizing the 10-fold methodology the propose artificial intelligence framework achieved an accuracy of 94% for SVM and 93.9% for KNN, a sensitivity of 93.33% for SVM and 93.19% for KNN and a specificity of 96.68% for SVM and 96.60% for KNN.ConclusionsIn this study, an artificial intelligence framework has been proposed for the detection and classification of pneumonia based on chest x-ray imaging with different sizes of input images. The proposed methodology used CNN for features extraction that were fed to two different types of classifiers, namely, SVM and KNN; in addition to the SoftMax classifier which is the default CNN classifier. The proposed CNN has been trained, validated, and tested using a large dataset of chest x-ray images contains in total 5852 images.