A full-stack application for AI-powered brain tumor detection from MRI images using deep learning.
🔗 Backend API: https://full-stack-brain-tumor-analysis.onrender.com
🔗 Frontend: Deployed on Render (Static Site)
- Single HTML File - No build process, no MIME type issues
- Vanilla JavaScript - No framework dependencies
- Modern CSS - Responsive design
- FastAPI - Modern Python web framework
- TensorFlow 2.15 - Deep learning framework
- Keras - High-level neural network API
- CNN Architecture - Convolutional Neural Network for image classification
- Deep Learning Model - Trained CNN for tumor detection
- Data Augmentation - Improved model accuracy
- Confidence Scores - Detailed prediction metrics
- 🧠 AI-Powered Analysis - Deep learning model for tumor detection
- ⚡ Fast Processing - Get results in seconds
- 📊 Confidence Scores - Detailed prediction metrics
- 🖼️ Image Upload - Drag and drop or click to upload
- 📱 Responsive Design - Works on all devices
- Python 3.9 or higher
- pip (Python package manager)
-
Clone the repository
git clone https://github.com/Sarvandani/Full_stack_Brain_Tumor_Analysis.git cd Full_stack_Brain_Tumor_Analysis -
Install backend dependencies
cd backend pip install -r requirements.txt -
Train the model (if not already trained)
python train_model.py
cd backend
python main.pyThe backend will start on http://localhost:5001
Simply open frontend/index.html in your browser, or use a local server:
cd frontend
python -m http.server 4001Then open http://localhost:4001 in your browser.
Full_stack_Brain_Tumor_Analysis/
├── backend/
│ ├── main.py # FastAPI application
│ ├── train_model.py # Model training script
│ ├── requirements.txt # Python dependencies
│ └── models/ # Trained model (generated)
├── frontend/
│ ├── index.html # Single HTML file (all-in-one)
│ └── images/ # MRI sample images
├── data/
│ └── brain_tumor_dataset/ # Training dataset
├── render.yaml # Render deployment config
└── README.md # This file
- Connect GitHub repository to Render
- Create new Web Service
- Configure:
- Build Command:
cd backend && pip install -r requirements.txt - Start Command:
cd backend && python main.py - Environment Variables:
PORT:5001ALLOWED_ORIGINS: Your frontend URL
- Build Command:
- Create new Static Site on Render
- Configure:
- Build Command:
echo "No build needed" - Publish Directory:
frontend
- Build Command:
- Update backend CORS with frontend URL
Or use render.yaml for automatic deployment.
GET /health- Health checkPOST /predict- Analyze brain MRI image for tumor detectionPOST /train- Train the model (background task)GET /train/status- Check training status
- Backend Port: 5001 (configurable via
PORTenv var) - Frontend Port: 4001 (local development)
- Model Path:
backend/models/brain_tumor_model.keras
This tool is for educational and research purposes only. It should not be used as a substitute for professional medical diagnosis, treatment, or advice. Always consult with qualified medical professionals for medical decisions and diagnosis.
SARVANDANI
For questions, issues, or contributions, please open an issue on GitHub.
The dataset used in this project can be downloaded from: