A sophisticated medical imaging platform that uses deep learning to detect and analyze brain tumors from MRI and CT scans with high accuracy.
This application provides healthcare professionals with an intuitive interface to upload and analyze medical brain scans. Using state-of-the-art convolutional neural networks, the system can detect the presence of tumors and provide AI-generated insights to assist medical professionals.
Note: The GIF above demonstrates the key features of the application.
- Multi-scan Support: Analyze both MRI and CT scans
- High Accuracy Detection: Powered by custom-trained CNN models
- Interactive UI: User-friendly interface with real-time analysis
- AI-powered Suggestions: Get AI-generated insights based on scan results
- PDF Report Generation: Create and download detailed patient reports
- Secure User Authentication: Protect patient data with user accounts
- Frontend: HTML, CSS, JavaScript, Bootstrap 5
- Backend: Flask (Python)
- Deep Learning: TensorFlow, PyTorch
- Database: SQLite with SQLAlchemy ORM
- Authentication: Flask-Login
The brain tumor detection model uses a custom Convolutional Neural Network (CNN) architecture:
- Input layer for processing 224x224 pixel images
- Multiple convolutional layers with ReLU activation
- Max pooling layers for feature extraction
- Dropout layers to prevent overfitting
- Dense layers for classification
- Softmax output layer for multi-class prediction
- Python 3.8 or higher
- pip (Python package manager)
- Git
-
Clone the repository:
git clone https://github.com/heyadrsh/brain-tumor-detection.git cd brain-tumor-detection -
Create and activate a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
# On Windows set FLASK_APP=app.py set FLASK_ENV=development # On macOS/Linux export FLASK_APP=app.py export FLASK_ENV=development
-
Initialize the database:
python recreate_db.py
-
Run the application:
python app.py
-
Open your browser and navigate to:
http://127.0.0.1:5000
- Register/Login: Create an account or log in to access the system
- Select Scan Type: Choose between MRI or CT scan analysis
- Upload Image: Upload a brain scan image for analysis
- View Results: See detection results with confidence scores
- Get AI Insights: Request AI-generated suggestions based on the results
- Generate Report: Create a downloadable PDF report for the patient
- Integration with hospital PACS systems
- Support for additional scan types (PET, fMRI)
- Enhanced AI suggestions with more detailed analysis
- Mobile application for on-the-go access
- Cloud deployment for scalability
Contributions are welcome! Please feel free to submit a Pull Request.
- 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.
Aadarsh Kumar - @heyadrsh - heyadrsh@gmail.com
Built for advancing medical diagnostics through AI