Skip to content

anhtuan284/mediscan

Repository files navigation

MediScan

Advanced Medical Image Analysis Platform powered by YOLO and DenseNet121 models

tensorflow fastapi appsmith strapi docker grafana yolo

Table of Contents

Core Features

  • ๐Ÿ” Advanced Image Analysis

    • Chest X-ray abnormality detection
    • Skin condition assessment
    • Multi-model support
  • โšก Performance

    • Real-time image processing
    • Optimized YOLO implementations
    • Scalable architecture
  • ๐Ÿ›  Technical Capabilities

    • RESTful API architecture
    • Comprehensive metrics monitoring

Application UI Demo

Medical Analysis Interface

DenseNet121 Prediction Disease Probability YOLO Detection Acne Detection

System Dashboard

System Monitoring Dashboard

System Overview

System Flow Architecture

System Flow End-to-end system architecture and data flow

Technology Stack

Tech Stack Complete technology stack overview

Tech Stack Breakdown

  • Data Processing & ML ๐Ÿงฎ

    • TensorFlow, PyTorch, scikit-learn, YOLO
    • Purpose: Model training and data preprocessing
  • AI Server ๐Ÿค–

    • FastAPI, MLflow, DenseNet, YOLO
    • Purpose: Model serving and experiment tracking
  • Frontend ๐ŸŽจ

    • Appsmith
    • Purpose: Medical imaging interface
  • Backend ๐Ÿ“

    • Strapi CMS, SQLite
    • Purpose: Patient data management
  • Monitoring ๐Ÿ“Š

    • Grafana, Prometheus
    • Purpose: System metrics and analytics

Content Management System

Strapi CMS Strapi CMS interface for content management

System Architecture

mediscan/
โ”œโ”€โ”€ .github/                    # GitHub-related configurations (CI/CD, issues, PRs)
โ”œโ”€โ”€ assets/                     # Static assets (e.g., images, icons, documentation)
โ”‚
โ”œโ”€โ”€ be-fastapi/                 # Core Analysis Engine
โ”‚   โ”œโ”€โ”€ main.py                 # Application entrypoint
โ”‚   โ”œโ”€โ”€ utils/                   # Core utilities
โ”‚   โ”‚   โ”œโ”€โ”€ models.py            # Model management & YOLO implementations
โ”‚   โ”‚   โ”œโ”€โ”€ image_processing.py  # Image preprocessing & augmentation
โ”‚   โ”‚   โ””โ”€โ”€ metrics.py           # Performance & inference metrics
โ”‚   โ”œโ”€โ”€ tests/                   # Test suites
โ”‚   โ”‚   โ”œโ”€โ”€ unit/                # Unit tests
โ”‚   โ”‚   โ””โ”€โ”€ integration/         # Integration tests
โ”‚   โ”œโ”€โ”€ models/                  # Pre-trained model storage
โ”‚   โ”‚   โ”œโ”€โ”€ xray/                # X-ray analysis models
โ”‚   โ”‚   โ””โ”€โ”€ skin/                # Skin condition models
โ”‚   โ””โ”€โ”€ requirements.txt         # Python dependencies
โ”‚
โ”œโ”€โ”€ be-fastapi-densenet/        # DenseNet Model Service
โ”‚   โ”œโ”€โ”€ main.py                 # DenseNet application entry
โ”‚   โ”œโ”€โ”€ models/                 # DenseNet model files
โ”‚   โ”‚   โ””โ”€โ”€ DenseNet121_epoch_30.keras
โ”‚   โ”œโ”€โ”€ services/               # Service Layer
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ image_service.py
โ”‚   โ”œโ”€โ”€ utils/                  # DenseNet utilities
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ gradcam.py          # Grad-CAM visualization
โ”‚   โ”œโ”€โ”€ .dockerignore
โ”‚   โ”œโ”€โ”€ .gitignore
โ”‚   โ”œโ”€โ”€ config.py
โ”‚   โ”œโ”€โ”€ docker-compose.yml
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ”œโ”€โ”€ requirements.txt        # DenseNet dependencies
โ”‚   โ”œโ”€โ”€ schemas.py              # API schemas
โ”‚
โ”œโ”€โ”€ be-strapi/                  # Content Management System
โ”‚   โ”œโ”€โ”€ api/                    # API definitions & routes
โ”‚   โ”œโ”€โ”€ config/                 # CMS configurations
โ”‚   โ”œโ”€โ”€ scripts/                # Utility scripts
โ”‚   โ”‚   โ”œโ”€โ”€ seed.js             # Database seeding
โ”‚   โ”‚   โ””โ”€โ”€ backup.js           # Backup utilities
โ”‚   โ”œโ”€โ”€ data/                   # CMS data and content
โ”‚   โ”‚   โ”œโ”€โ”€ uploads/            # Media storage
โ”‚   โ”‚   โ””โ”€โ”€ exports/            # Data exports
โ”‚   โ””โ”€โ”€ package.json            # Node.js dependencies
โ”‚
โ”œโ”€โ”€ dataset/                    # Dataset storage and preprocessing
โ”‚
โ”œโ”€โ”€ fe-appsmith/                # Frontend Appsmith integration
โ”‚   โ””โ”€โ”€ PatientManagementApp.json  # Appsmith configurations
โ”‚
โ”œโ”€โ”€ grafana/                    # Analytics & Monitoring
โ”‚   โ”œโ”€โ”€ dashboards/             # Custom dashboard definitions
โ”‚   โ”‚   โ”œโ”€โ”€ system.json         # System metrics dashboard
โ”‚   โ”‚   โ””โ”€โ”€ model.json          # Model performance dashboard
โ”‚   โ””โ”€โ”€ provisioning/           # Grafana configurations
โ”‚       โ”œโ”€โ”€ datasources/        # Data source configs
โ”‚       โ””โ”€โ”€ notifications/      # Alert configurations
โ”‚
โ”œโ”€โ”€ notebooks/                  # Jupyter notebooks for experimentation
โ”‚
โ”œโ”€โ”€ prometheus/                 # Monitoring metrics collection
โ”‚   โ””โ”€โ”€ prometheus.yaml         # Prometheus data source configurations
โ”œโ”€โ”€ .gitattributes
โ”œโ”€โ”€ CODE_OF_CONDUCT.md          # Code of conduct guidelines
โ”œโ”€โ”€ docker-compose.yml          # Docker orchestration
โ”œโ”€โ”€ LICENSE                     # Open-source license
โ””โ”€โ”€ README.md                   # Project documentation

Development Setup

Requirements

  • Python 3.8+
  • Node.js 18+
  • Docker & Docker Compose
  • GPU support (recommended)

Quick Start

  1. Environment Setup

    git clone https://github.com/your-org/mediscan.git
    cd mediscan
  2. Backend & Monitoring services

    # FastAPI Backend
    cd be-fastapi
    python -m venv venv
    source venv/bin/activate  # Windows: venv\Scripts\Activate.ps1
    pip install -r requirements.txt
    
    # Start API Server
    uvicorn main:app --reload --port 8000
    
    # FastAPI Backend for DenseNet121
    cd be-fastapi-densenet
    python -m venv venv
    source venv/bin/activate  # Windows: venv\Scripts\Activate.ps1
    pip install -r requirements.txt
    
    # Start API Server
    uvicorn main:app --reload --port 5000

    OR with Docker Compose:

    docker-compose up -d
  3. CMS

    # Strapi CMS
    cd be-strapi
    npm install
    npm run develop

API Reference

Core Endpoints

Endpoint Method Description
/predict POST Generic prediction pipeline
/yolo_predict POST X-ray analysis
/acne-yolo-predict POST Skin condition analysis
/metrics GET System metrics
/health GET Service health

Configuration

Environment Variables

Variable Description Default
CORS_ORIGINS Allowed origins *
MODEL_PATH Model directory ./models
PORT Service port 8000

Monitoring

  • Real-time performance metrics
  • Model inference tracking
  • System resource monitoring
  • Custom Grafana dashboards

Contributing

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

License

MIT License - See LICENSE for details

About

A R&D project about apply LCDP and Computer Vision in building medical disease segmentation system

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages