AI-Powered Brain Tumor Detection using Deep Learning and MRI Analysis
A cutting-edge web application that leverages artificial intelligence to detect brain tumors from MRI scans with 97% accuracy. Built with Flask backend and interactive web interface, this system assists medical professionals in early diagnosis and treatment planning.
- AI-Powered Detection: Deep Learning CNN model trained on thousands of MRI scans
- High Accuracy: 97% accuracy rate on validated datasets
- Instant Results: Get analysis results in less than 5 seconds
- User-Friendly Interface: Intuitive web interface for easy image upload and analysis
- Medical-Grade Analysis: Processes 8 million parameters for comprehensive evaluation
- Patient Information Tracking: Store and display patient name and analysis details
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Modern Bootstrap 5 Design: Clean, professional interface
- Animated Components: Smooth transitions and floating shapes for visual appeal
- Real-time Results Display: Comprehensive result visualization with confidence metrics
- Downloadable Reports: Print-friendly result summaries for medical records
- Navigation Menu: Quick access to home, features, analysis, and resources
- Social Media Integration: Links to developer's professional profiles
- Secure Processing: Images processed securely without permanent storage
- Data Privacy: Uploaded images are temporary and cleared after analysis
- Medical Compliance: Designed with healthcare privacy in mind
- Python: 3.8 or higher
- RAM: 4GB minimum (8GB recommended)
- Disk Space: 2GB for model and dependencies
- GPU (Optional): NVIDIA GPU with CUDA support for faster processing
- Windows 10/11, macOS, or Linux
- pip (Python Package Manager)
- Virtual Environment (recommended)
# Clone the repository
git clone https://github.com/ParasPKP/brain-tumor-detection-using-ml.git# On Windows
python -m venv venv
venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython -c "import tensorflow; import flask; import cv2; print('All dependencies installed successfully!')"The application uses the Brain Tumor Detection dataset from Kaggle.
Dataset Link: Brain Tumor Detection Dataset
-
Create Kaggle Account
- Visit kaggle.com
- Sign up for a free account
-
Download Dataset
- Go to the dataset link above
- Click "Download" button
- Extract the downloaded ZIP file
-
Dataset Information
- Total Images: 7,000+ MRI scans
- Image Format: JPG, PNG
- Image Size: Typically 224x224 pixels
- Classes: No Tumor and Tumor
- Split: Training/Testing ratio
# Make sure virtual environment is activated
# On Windows: venv\Scripts\activate
# On macOS/Linux: source venv/bin/activate
# Run the Flask application
python app.py- Open your web browser
- Navigate to:
http://localhost:5000 - You should see the NeuroAI Detector homepage
# Run on specific port
python app.py --port 8000
# Run on network (accessible from other machines)
# Edit app.py and change: app.run(host='0.0.0.0', port=5000)- Open
http://localhost:5000in your web browser - You'll see the NeuroAI Detector homepage
- Click on "Analyze" in the navigation menu or "Start Analysis" button
- Scroll to the upload section
- Enter the Patient Name (or test identifier)
- Select an MRI scan image file:
- Accepted formats: JPG, PNG
- Recommended size: 224x224 pixels
- Maximum file size: 10MB
- Click "Analyze Image"
- The system will process the image
- Results display includes:
- Tumor Status: "TUMOR DETECTED" or "NO TUMOR DETECTED"
- AI Confidence: Confidence level of prediction
- Technical Metrics: Model accuracy, parameters, processing time
- Patient Information: Name and analysis timestamp
- Analyzed Image: Display of processed MRI scan
- New Analysis: Perform another analysis
- Print Results: Print the results for medical records
- Medical Resources: Access additional medical information
| Component | Technology |
|---|---|
| Backend | Flask 3.1.2 |
| Deep Learning | TensorFlow 2.10.0, Keras 2.10.0 |
| Image Processing | OpenCV 4.12.0, Pillow 11.3.0 |
| Frontend | HTML5, CSS3, Bootstrap 5, JavaScript |
| Web Server | Werkzeug 3.1.3 |
IMPORTANT MEDICAL NOTICE:
This AI analysis tool is designed to assist medical professionals only and should NOT be used as:
- A replacement for professional medical diagnosis
- Standalone clinical decision support
- Medical treatment recommendation tool
- Primary diagnostic tool
Always consult with qualified healthcare providers for:
- Proper diagnosis and interpretation
- Treatment planning and decisions
- Medical management of brain tumors
Early detection and professional medical care are crucial for optimal patient outcomes. This tool is intended to supplement, not replace, professional medical judgment.
- Brain Tumor Diagnosis - Mayo Clinic
- Understanding Brain Tumors - Mayo Clinic
- MRI Technology for Brain Imaging
- Brain Tumor Treatment Options
Paras Parshuramkar
Built with β€οΈ for medical innovation and early disease detection
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to:
- Report bugs
- Suggest improvements
- Submit pull requests
- Fork the repository
For issues, questions, or suggestions:
- Check the troubleshooting section above
- Review the GitHub repository issues
- Contact the developer through GitHub