LEGEND COLLEGE PREPARATORY · AI INTERNSHIP

Chest X-Ray CNN Lab

Explore the preprocessing, neural network architecture, and reported evaluation of a pneumonia-versus-normal image classifier.

INTERACTIVE PREPROCESSING

See what the model receives

Upload a non-sensitive sample image. The browser resizes it to 150 × 150 and scales its RGB values to [0, 1], following the notebook's preprocessing configuration.

Runs entirely in your browser

Load an image or the generated sample to begin.

150 × 150Input resolution
1 / 255Pixel rescaling
0.2Training zoom range

Input image

Model-ready preview

This is a preprocessing visualization, not a medical diagnosis or a CNN prediction. No trained model weights were included with the supplied notebook.

Processing trace

  1. Awaiting image input
MODEL ARCHITECTURE · NOTEBOOK CELL 3

Three convolutional stages

Click any layer to inspect its role. This diagram reflects the original TensorFlow/Keras Sequential model.

Select a layer above.

Training configuration

AdamOptimizer
Binary crossentropyLoss
32Batch size
3Epochs in notebook

The notebook defines EarlyStopping(monitor='val_loss', patience=0, restore_best_weights=True). Dropout and stronger augmentation are discussed in the report, but are not active in the submitted model.

REPORTED TEST RESULTS · FINAL REPORT

Accuracy is only part of the story

Switch between the 1-, 3-, and 5-epoch experiments reported in the PDF to recalculate metrics from the published confusion matrices.

—Overall accuracy
—Normal recall (class 0)
—Pneumonia recall (class 1)
623Reported test images

Confusion matrix

Rows: actual class · Columns: predicted class. Class 0 = NORMAL, class 1 = PNEUMONIA (as defined by the report's counts).

Class-level recall

Interpretation

What changed across experiments?

These are historical reported test results, not fresh model execution. The original notebook has no saved trained weights, so this static site does not infer pneumonia from uploaded images. The PDF reports 5-epoch test accuracy near 87% while also discussing validation overfitting; these measure different evaluation sets.

PROJECT DOCUMENTATION

Original work and demo scope

What the original notebook does

Loads chest X-ray folders for train/validation/test, resizes and rescales images, builds a 3-stage CNN, trains using TensorFlow/Keras, evaluates predictions, and displays accuracy/loss learning curves.

What this website executes

Client-side image resize and pixel normalization preview, interactive network-layer explanations, and recalculated metrics from the report's published confusion matrices.

What this website does not do

It does not run TensorFlow training, load model weights, predict an uploaded X-ray's diagnosis, or reproduce the original experiment's test set. To reproduce training, use the linked original notebook with the appropriate chest X-ray dataset.

Ethics and attribution

Educational research demonstration only. Not a medical device. Avoid uploading identifiable patient images. The original student notebook and internship documents are provided as source materials; the browser companion is a separate implementation.