Project 01 · CNN Computer Vision Portfolio

Medical Image Segmentation using U-Net

Upload an image and run the compact U-Net directly in your browser. The model returns a probability map, binary segmentation mask, and visual overlay—without sending the image to a Python server.

TensorFlow.jsU-NetVercel64×64 grayscale
!
Educational demonstration only—not a medical diagnostic tool.

Do not upload private, sensitive, confidential, or personally identifiable medical images. Predictions are machine-learning outputs and must not be used to diagnose, treat, prevent, or manage a medical condition.

Interactive browser inference

Generate a segmentation mask

Your image is processed locally in the browser. It is not uploaded to an application server.

01

Original image

02

Probability map

03

Binary mask

04

Mask overlay

Inference time
Predicted region
Mean probability
Dice vs mask
IoU vs mask
How it works

From image to pixel-level prediction

The same core preprocessing used by the Python project is reproduced in JavaScript for browser inference.

1

Preprocess

Resize to 64×64, convert to one grayscale channel, and normalize pixel values to [0, 1].

2

Encode

Convolution blocks learn local intensity patterns while max pooling builds higher-level features.

3

Decode

Upsampling and skip connections restore spatial detail for precise pixel-level boundaries.

4

Visualize

A sigmoid probability map is thresholded into a mask and blended over the original image.

Responsible AI

Limitations and correct interpretation

What this project demonstrates

  • U-Net encoder-decoder architecture and skip connections
  • Binary mask inference, thresholding, overlays, Dice, and IoU
  • Keras-to-browser weight export and TensorFlow.js inference
  • Static Vercel deployment without a Python backend

What it does not establish

  • No real patient scans were used for training or evaluation
  • The target shapes are simple synthetic elliptical regions
  • Performance on MRI, CT, X-ray, ultrasound, pathology, or dermoscopy is unknown
  • No clinical validation, regulatory review, or prospective evaluation was performed