saifullah-s/pneumonia-detection ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python notebook for detecting pneumonia from chest X ray images using deep learning.

I want it to load and preprocess the images, resize them to a consistent size, normalize them, split them into training and test sets, and then train two approaches, a custom CNN and a fine tuned ResNet 50 model. Please compare them clearly using accuracy, precision, recall, F1 score, and confusion matrices, and show which one performs best.

Also add Grad CAM visualizations so I can see what parts of the X rays the model is using when it makes a prediction. If possible, include a few example outputs and make the notebook easy to run from top to bottom with clear section headings and short explanations.

If you need to look up current TensorFlow or plotting best practices online, feel free to do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab