An advanced machine learning application for accurate detection and classification of brain tumors from MRI scans.
This project combines state-of-the-art deep learning techniques with a modern web interface to assist medical professionals in the early detection of brain tumors. Leveraging a fine-tuned ResNet-18 model, our system delivers high-accuracy tumor classification while maintaining an intuitive user experience.
- Intelligent Analysis: Deep learning-powered detection of brain tumors from MRI scans
- Multi-Class Classification: Identification of tumor type with confidence scores
- Interactive Dashboard: Clean, responsive UI for easy navigation and results visualization
- Clinical Reporting: Generate comprehensive PDF reports for medical documentation
- Accessibility: Dark/light mode support and responsive design for all devices
- Framework: React 19 with TypeScript
- Styling: TailwindCSS with custom theme integration
- Components: Headless UI for accessible interactive elements
- Visualization: Chart.js for results representation
- Reporting: jsPDF for clinical documentation
- API: FastAPI for high-performance Python backend
- ML Framework: PyTorch with CUDA acceleration support
- Model: Fine-tuned ResNet-18 architecture
- Image Processing: OpenCV and PIL for preprocessing
- Data Handling: Pandas and NumPy for efficient data management
- Python 3.9+
- Node.js 18+
- GPU support recommended for inference (CUDA compatible)
-
Clone the repository:
git clone https://github.com/sarcasticdhruv/brain-tumor-detection.git cd brain-tumor-detection -
Install backend dependencies:
pip install -r requirements.txt
-
Install frontend dependencies:
cd brain-tumor-classifier npm install -
Start the backend server (set up APIs):
cd.. uvicorn app:app --reload
-
In a new terminal, start the frontend:
cd brain-tumor-classifier npm start -
Access the application at http://localhost:3000
-
If you want to RUN by using just one command, and adjust by doing some Manual changes in app.py and app.js
cd brain-tumor-classifier npm run build cd .. uvicorn app:app --host 0.0.0.0 --port 3000
- Upload a T1-weighted MRI scan through the interface
- Review the preprocessing steps applied to the image
- Examine the detection results with confidence metrics
- Generate and download a clinical report if desired
| Metric | Value |
|---|---|
| Accuracy | 97.3% |
| Sensitivity | 96.8% |
| Specificity | 98.1% |
| F1 Score | 0.965 |
Evaluated on a dataset of 3,000 MRI scans across multiple institutions.
We welcome contributions to enhance the system's capabilities:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Brain Tumor MRI Dataset for training data
- FastAPI for the backend framework
- React for the frontend framework
- PyTorch for the machine learning framework