This study proposes a Convolutional neural networkmodel trained from scratch to classify and detect the presence ofpneumonia from a collection of chest X-ray image samples. Unlikeother methods that rely solely on transfer learning approaches ortraditional handcrafted techniques to achieve a remarkableclassification performance, we constructed a Convolutional neuralnetwork model from scratch to extract features from a given chest Xrayimage and classify it to determine if a person is infected withpneumonia. This model could help mitigate the reliability andinterpretability challenges often faced when dealing with medicalimagery. Unlike other deep learning classification tasks withsufficient image repository, it is difficult to obtain a large amount ofpneumonia dataset for this classification task; therefore, we deployedseveral data augmentation algorithms to improve the validation andclassification accuracy of the CNN model and achieved remarkablevalidation accuracy. Our classification method uses convolutionalneural networks for classifying the images and early diagnosis ofPneumonia. Our findings yield an accuracy of 85.73%, surpassing thepreviously top scoring accuracy of 78.73%