This project is a Streamlit-based web application that generates MRI brain reports using a YOLOv8 model for image segmentation and Google Gemini for AI-powered report generation. The application allows users to upload MRI images, segment them to identify tumors, and generate a detailed PDF report with the segmented image.
- Upload MRI Images: Users can upload MRI images with mask overlays for processing.
- YOLOv8 Segmentation: The application uses a YOLOv8 model to segment and detect regions of interest in the MRI images.
- Google Gemini Integration: The application integrates with Google Gemini to generate detailed MRI reports based on the detected regions.
- PDF Report Generation: The application creates a downloadable PDF report that includes the segmented MRI image and the AI-generated report.
- Upload MRI Image: Users upload an MRI image (PNG, JPG, or JPEG) with mask overlay.
- Image Segmentation: The YOLOv8 model processes the image to segment regions of interest, such as tumors.
- AI Report Generation: Google Gemini generates a detailed report based on the segmented image and findings.
- Download PDF Report: The application generates a PDF file with the segmented image and AI-generated report, which can be downloaded by the user.
To run this application locally, follow these steps:
- Clone the repository:
Copy code
git clone https://github.com/abwahab175/mri-report-generator.git
cd mri-report-generator
- Install the required dependencies:
Copy code
pip install -r requirements.txt
- Run the Streamlit application:
Copy code
streamlit run app.py
- Launch the application by running the above command.
- Upload an MRI image with a mask overlay using the file uploader.
- Click the "Generate PDF Report" button to process the image and generate the report.
- Download the generated PDF report.
- Python 3.x
- Streamlit
- FPDF
- PIL (Pillow)
- YOLOv8
- Google Gemini API
Contributions are welcome! If you have suggestions, enhancements, or bug fixes, please follow the steps below:
- Fork the project.
- Create your feature branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
Distributed under the MIT License. See LICENSE.txt
for more information.
- Abdul Wahab - abwahab175@gmail.com