Abstract: Utilizing deep learning methods in medical image analysis has shown promise in enhancing disease detection and diagnosis. In this study, we conducted a detailed comparative analysis of threewidely recognized convolutional neural network (CNN) architectures: VGG16, ResNet50, and a custom CNN model tailored for pneumonia and COVID-19 detection from chest X-ray images. Leveraging transfer learning techniques and meticulously curated datasets, we evaluated the models' performance in accurately identifying respiratory diseases. Our investigation utilized two publicly available datasets, the ChestX-ray14 dataset and the NIH Chest X-ray Dataset, both annotated for pneumonia and COVID-19. Prior to model training, we conducted thorough preprocessing to ensure optimal data quality and consistency. Through rigorous experimentation, we assessed the models' accuracy, sensitivity, and specificity in disease detection. The results revealed nuanced differences in model performance across disease categories. While VGG16 demonstrated robust accuracy in pneumonia detection, ResNet50 exhibited enhanced sensitivity and specificity in identifying COVID-19 cases. Our custom CNN model, leveraging insights from both architectures, showcased competitive performance, emphasizing the importance of tailored model design for optimal diagnostic outcomes. Through comprehensive analysis and discussion, we elucidated the strengths and limitations of each model, considering factors such as computational efficiency, interpretability, and generalizability. Our findings underscore the potential of deep learningbased diagnostic tools in supporting healthcare professionals in timely and accurate disease diagnosis