CNN PROJECT 03 · GITHUB PAGES + TENSORFLOW.JS

DenseNet medical image classification, running entirely in your browser.

Upload an image or select a bundled synthetic sample. TensorFlow.js loads the converted DenseNet121 model, performs preprocessing and inference locally, and shows class probabilities without sending the image to a server.

DenseNet121TensorFlow.jsGitHub PagesBrowser inference

INPUT

Choose an image

Synthetic sample imagesSafe portfolio examples

Load an image after the model is ready.

OUTPUT

Prediction results

No prediction yet

Select an image and run the model to view the predicted proxy class, confidence, probabilities, and runtime.

RECORDED EXPERIMENT

Evaluation evidence from the attached synthetic-proxy notebook

These values document the original experiment only. They must not be described as clinical pneumonia-detection performance.

DenseNet test accuracy95.64%Synthetic proxy test set
DenseNet test ROC-AUC0.9934Binary proxy separation
Macro F10.9481Across both proxy classes
Baseline test accuracy92.82%Logistic regression
Confusion matrix for the synthetic proxy experiment
Confusion matrix
ROC curve for the synthetic proxy experiment
ROC curve
Training and validation accuracy curve
Training accuracy

MODEL DESIGN

DenseNet121 transfer-learning pipeline

  1. 01
    Image preparation

    RGB conversion, 28 × 28 compatibility resize, then 96 × 96 browser tensor resize.

  2. 02
    DenseNet normalization

    ImageNet-style channel normalization using the same mean and standard deviation as the training model.

  3. 03
    Frozen DenseNet121 backbone

    Dense connections reuse features and support stable gradient flow during transfer learning.

  4. 04
    Classification head

    Global average pooling, Dense(256), batch normalization, dropout, and a two-class softmax output.

DEPLOYMENT

Why TensorFlow.js on GitHub Pages?

  • Static, free hostingNo Python server is required after deployment.
  • Private-by-design inferenceThe selected image remains in the browser.
  • Portfolio transparencySource, model conversion, CI, metrics, and limitations are visible in one repository.
  • Reproducible publishingGitHub Actions converts the browser model and updates only this project’s Pages subfolder.
i
Responsible use

This browser app demonstrates model engineering, conversion, deployment, and responsible AI communication. It does not establish clinical validity. A real medical classifier requires a licensed clinical dataset, patient-level splitting, external validation, bias analysis, calibration, regulatory review, and qualified medical oversight.