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.
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.
Generate a segmentation mask
Your image is processed locally in the browser. It is not uploaded to an application server.
Probability map
Binary mask
Mask overlay
From image to pixel-level prediction
The same core preprocessing used by the Python project is reproduced in JavaScript for browser inference.
Preprocess
Resize to 64×64, convert to one grayscale channel, and normalize pixel values to [0, 1].
Encode
Convolution blocks learn local intensity patterns while max pooling builds higher-level features.
Decode
Upsampling and skip connections restore spatial detail for precise pixel-level boundaries.
Visualize
A sigmoid probability map is thresholded into a mask and blended over the original image.
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