Skip to content

sohan2311/Medical-Image-Detection-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 Vital Image Analytics - AI-Powered Medical Image Analysis

Python Streamlit Together AI License

An advanced AI-powered medical image analysis application that assists healthcare professionals in analyzing medical imagery using state-of-the-art computer vision models.

VitalImage Analytics Logo

🎯 Overview

VitalImage Analytics is a cutting-edge Streamlit application that leverages Together AI's powerful Llama Vision models to provide detailed analysis of medical images. The application is designed to support healthcare professionals by offering AI-powered insights into X-rays, CT scans, MRIs, and other medical imaging formats.

⚑ Key Features

  • πŸ” Advanced Medical Image Analysis - Powered by Together AI's Llama Vision models
  • 🩻 Multi-Format Support - X-rays, CT scans, MRI, ultrasound, and more
  • πŸ“‹ Comprehensive Reports - Detailed findings, recommendations, and next steps
  • ⚠️ Safety First - Built-in medical disclaimers and safety warnings
  • πŸš€ Easy to Use - Intuitive drag-and-drop interface
  • πŸ”’ Secure - API key management and data protection

πŸ–ΌοΈ Screenshots

Main Interface

Main Interface

Image Upload

Image Upload

Analysis Results

Analysis Results

Page Footer

Page Footer


πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • Together AI API key (Get yours here)
  • Required Python packages (see requirements below)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/vitalimage-analytics.git
    cd vitalimage-analytics
  2. Install dependencies

    pip install -r requirements.txt
  3. Set up your API key

    Create a file named api_key.py in the project root:

    # api_key.py
    api_key = "your_together_ai_api_key_here"
  4. Run the application

    streamlit run main_app.py
  5. Open your browser

    Navigate to http://localhost:8501 to access the application.

πŸ“¦ Requirements

Create a requirements.txt file with the following dependencies:

streamlit>=1.28.0
requests>=2.31.0
Pillow>=10.0.0
pathlib

Install all requirements:

pip install -r requirements.txt

πŸ”§ Configuration

API Key Setup

  1. Sign up for Together AI at api.together.xyz
  2. Generate your API key from the dashboard
  3. Create api_key.py file:
    # api_key.py
    api_key = "sk-your-actual-api-key-here"

Model Configuration

The application uses Together AI's vision models:

  • Default: meta-llama/Llama-Vision-Free (Free tier)
  • Premium: meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo (Paid tier)

To change the model, modify the MODEL_NAME variable in main_app.py:

MODEL_NAME = "meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo"  # For better performance

πŸ₯ Medical Image Support

Supported Formats

  • X-rays (Chest, Bone, Dental)
  • CT Scans (Brain, Chest, Abdomen)
  • MRI Images (Brain, Spine, Joints)
  • Ultrasound (Abdominal, Cardiac)
  • Other medical imaging formats

File Formats

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • Maximum file size: 10MB (recommended)

🎨 User Interface

Main Features

  1. πŸ“€ File Upload

    • Drag and drop medical images
    • Support for multiple formats
    • Image preview before analysis
  2. πŸ” Analysis Engine

    • AI-powered medical image analysis
    • Detailed findings report
    • Confidence levels and recommendations
  3. πŸ“Š Results Display

    • Expandable analysis sections
    • Professional medical terminology
    • Downloadable reports
  4. πŸ“± Responsive Design

    • Mobile-friendly interface
    • Professional medical theme
    • Intuitive navigation

⚠️ Important Medical Disclaimer

CRITICAL: This application is designed for educational and supportive purposes only. It is NOT intended to replace professional medical diagnosis, treatment, or advice. Always consult with qualified healthcare professionals for medical decisions.

Limitations

  • AI analysis should supplement, not replace, professional medical expertise
  • Results may vary based on image quality and complexity
  • Not approved for primary diagnostic use
  • Requires medical professional validation

πŸ› οΈ Development

Project Structure

vitalimage-analytics/
β”œβ”€β”€ main_app.py              # Main Streamlit application
β”œβ”€β”€ api_key.py               # API key configuration
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ README.md               # Project documentation
β”œβ”€β”€ LICENSE                 # License file
β”œβ”€β”€ .gitignore             # Git ignore rules
└── assets/                # Images and resources
    β”œβ”€β”€ logo.png
    └── screenshots/

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ˆ Performance & Scalability

System Requirements

  • RAM: Minimum 4GB, Recommended 8GB+
  • Storage: 1GB free space
  • Network: Stable internet connection for API calls
  • Browser: Modern web browser (Chrome, Firefox, Safari)

API Usage

  • Rate Limits: Follow Together AI's rate limiting guidelines
  • Cost Management: Monitor API usage through Together AI dashboard
  • Optimization: Image compression recommended for faster processing

πŸ” Security & Privacy

Data Protection

  • Images are processed via secure API calls
  • No local storage of medical images
  • API keys stored locally only
  • HIPAA compliance considerations for production use

Best Practices

# Use environment variables for production
import os
api_key = os.getenv('TOGETHER_AI_API_KEY')

πŸ“š Resources & Documentation

Official Documentation

Useful Links

πŸ†˜ Troubleshooting

Common Issues

API Key Errors

Error: Invalid API key
Solution: Check your api_key.py file and ensure the key is correct

Image Upload Issues

Error: Unsupported file format
Solution: Use JPEG or PNG formats only, max 10MB

Model Loading Errors

Error: Model not found
Solution: Check if the model name is correct in MODEL_NAME variable

Getting Help

  • πŸ“§ Create an issue on GitHub
  • πŸ’¬ Check Discussions
  • πŸ“– Read the Wiki

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Together AI for providing powerful vision models
  • Streamlit for the amazing web framework
  • Medical community for inspiration and requirements
  • Open source contributors for various libraries used

πŸ“Š Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests


Made with ❀️ for the healthcare community

⭐ Star this repo | πŸ’‘ Request Feature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages