A brain tumor MRI image classifier built with Teachable Machine (transfer learning) and deployed as a TensorFlow.js web app for in-browser inference.
This project was created for the AI course and focuses on dataset preparation, model training/validation, and lightweight deployment on the web.
https://diegomalagrida.me/mri-tumor-classifier/app/
The project trains an image classification model to recognize 4 classes from brain MRI scans:
- Glioma
- Meningioma
- Pituitary
- No tumor
The workflow includes dataset balancing, image resizing/normalization, hyperparameter exploration (epochs, batch size, learning rate), and evaluation on an external test set.
The final model is exported to TensorFlow.js and integrated into a simple web interface that displays class probabilities and supports a confidence threshold for uncertain predictions.
If you want to run the project, you only need a modern web browser and a simple static server.
To run it locally:
- Clone the repository.
- Start a local static server (e.g., VS Code Live Server or
python -m http.server). - Open the app in your browser and:
- Upload an MRI image, or
- Pick one from the sample library (if included).
To avoid CORS issues, do not open the HTML file directly. Always use a local server when loading the TensorFlow.js model files.