Using transfer learning, this study presents a new method for classifying lung opacity in chest X-ray pictures; the method centers on Keras and the DenseNet201 model. This paper examines the RSNA Pneumonia Detection Challenge dataset and its extensive preprocessing procedures, such as dataset overview, splitting, and balancing. Importantly, Keras has been modified to be DICOM compatible, which solves problems with processing chest X-ray pictures. The generated model is more resilient thanks to the deployment of basic data augmentation techniques, which increase the dataset. The study describes the pretrained DenseNet201 model in great detail, including the extra layers that were added to improve the model's performance on the lung opacity classification task. A comprehensive examination of a model includes looking at its architecture, parameters, and performance indicators including F1-score, recall, and precision. Insights into test-time augmentation tactics are presented in the study's conclusion, with an emphasis on the significance of making two predictions for each image to increase reliability. A 79% success rate in classifying lung opacity in chest X-ray pictures using a combination of transfer learning and Keras is a major step forward for medical imaging as a whole.