Web interface overview
The Skin Cancer Detection AI features a simple, intuitive web interface built with Materialize CSS. Users can upload skin lesion images and receive instant classification results with confidence scores.Interface components
The application includes several key UI elements:Model loading indicator
A progress bar displays while the VGG-16 model loads from the The progress bar automatically hides once the model is ready.
cnn_model/model.json file:Image upload
A file input allows users to select images from their device:The interface accepts any image format supported by modern browsers.
How to use the interface
Wait for model to load
When you first open the application, wait for the “Loading ML Model” message to change to “Loaded ML Model”. This typically takes a few seconds depending on your connection speed.
Select an image
Click the “Select Image” button and choose a skin lesion image from your device. The image will appear in the preview area.
Classify
Click the “Classify Image” button to run the prediction. The model will process the image and display results within seconds.
Classification process
When you click “Classify Image”, the following happens:predict() function:
- Validates that an image has been selected
- Preprocesses the image to 75x100 pixels
- Runs inference using the VGG-16 model
- Extracts the highest-probability classification
- Displays the result and confidence score
The entire classification process happens in your browser - no data is sent to any server.
Example classifications
The model can identify seven different types of skin lesions:Error handling
The interface includes error handling for common issues: No image selected:Privacy and security
Client-side processing
All image processing happens locally in your browser
No data transmission
Images are never uploaded to external servers
Technical details
Framework: Materialize CSS 1.0.0 ML Library: TensorFlow.js 2.0.0 Model format: Keras layers model (converted to TensorFlow.js) Input size: 75x100x3 pixels Output: 7-class probability distributionNext steps
Quick start
Learn how to implement the classification logic
View source
Explore the complete source code