Check out the live application 🔗LINK
A Streamlit application for classifying brain MRI scans to detect tumors using multiple deep learning models. The app generates saliency maps to highlight important regions and provides expert explanations using advanced language models.
Untitled.mov
- Image Classification: Classify MRI scans into Glioma, Meningioma, Pituitary, or No Tumor.
- Multiple Models: Compare predictions and saliency maps from Xception, ResNet, and Custom CNN models.
- Saliency Maps: Visualize model focus areas on MRI scans.
- Explanations: Generate expert-level explanations using Gemini, Llama, or ChatGPT language models.
- Probability Distribution: View probability distributions across different classes and models.
- Framework: Streamlit
- Deep Learning: TensorFlow, Keras
- Visualization: OpenCV, Plotly
- Language Models: OpenAI, Google Generative AI, Llama
-
Clone the Repository
git clone https://github.com/aishasalim/btc.git cd btc -
Create a Virtual Environment
python@3.11 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables
Create a
.envfile in the project root with the following keys:GROQ_API_KEY=your_groq_api_key OPEN_AI_KEY=your_openai_api_key GOOGLE_API_KEY=your_google_api_key
-
Run the Streamlit App
streamlit run app.py
-
Interact with the App
- Upload a brain MRI image (
.jpg,.jpeg,.png). - Select one or more models to compare.
- View classification results, saliency maps, and probability distributions.
- Generate expert explanations using the selected language model.
- Upload a brain MRI image (
-
Transfer Learning - Xception
- Input Size: 299x299
- Weights: Pre-trained on ImageNet
-
ResNet
- Input Size: 224x224
- Custom architecture with ResNet50 base
-
Custom CNN
- Input Size: 224x224
- Custom convolutional neural network
- Python 3.10+
- Streamlit
- TensorFlow
- Keras
- OpenCV
- Plotly
- Google Generative AI SDK
- OpenAI SDK
- Other dependencies listed in
requirements.txt