Skip to content

Latest commit

ย 

History

History
139 lines (102 loc) ยท 5.01 KB

File metadata and controls

139 lines (102 loc) ยท 5.01 KB

Model Development ๐Ÿง ๐Ÿ“ˆ

This repository focuses on developing and deploying machine learning models for the AI-Powered Glaucoma Detection Platform, EyeVanguard. Here, we aim to create robust, scalable, and efficient models to analyze FUNDUS images and provide accurate glaucoma detection. This repository also includes MLOps integration for seamless development, deployment, and monitoring of AI models.


๐Ÿ“‚ Project Structure

modeldevelopment/
โ”œโ”€โ”€ data/                     # Dataset storage and preprocessing scripts
โ”‚   โ”œโ”€โ”€ raw/                  # Raw dataset files
โ”‚   โ”œโ”€โ”€ processed/            # Preprocessed datasets
โ”‚   โ”œโ”€โ”€ preprocess.py         # Script for data cleaning and transformation
โ”œโ”€โ”€ models/                   # Trained AI models and training scripts
โ”‚   โ”œโ”€โ”€ glaucoma_detection.py # Model architecture and training pipeline
โ”‚   โ”œโ”€โ”€ evaluate.py           # Model evaluation script
โ”‚   โ”œโ”€โ”€ saved_models/         # Directory for saved models
โ”œโ”€โ”€ pipelines/                # MLOps pipelines for CI/CD
โ”‚   โ”œโ”€โ”€ train_pipeline.yml    # Pipeline for training and evaluating models
โ”‚   โ”œโ”€โ”€ deploy_pipeline.yml   # Pipeline for model deployment
โ”œโ”€โ”€ tests/                    # Unit tests for models and preprocessing
โ”‚   โ”œโ”€โ”€ test_preprocess.py    # Test cases for data preprocessing
โ”‚   โ”œโ”€โ”€ test_model.py         # Test cases for model performance
โ”œโ”€โ”€ scripts/                  # Utility scripts for various tasks
โ”‚   โ”œโ”€โ”€ inference.py          # Script for running inference with trained models
โ”‚   โ”œโ”€โ”€ upload_to_db.py       # Script for pushing model results to the database
โ”œโ”€โ”€ database/                 # PostgreSQL integration for model outputs
โ”‚   โ”œโ”€โ”€ schema.sql            # Database schema for storing analysis results
โ”‚   โ”œโ”€โ”€ queries.sql           # SQL queries for accessing and updating data
โ”œโ”€โ”€ Dockerfile                # Docker configuration for containerizing model development
โ”œโ”€โ”€ docker-compose.yml        # Docker Compose for integrating services
โ”œโ”€โ”€ requirements.txt          # Python dependencies
โ”œโ”€โ”€ .env                      # Environment variables for the project
โ”œโ”€โ”€ README.md                 # Documentation for the repository (you are here!)
โ””โ”€โ”€ .gitignore                # Git ignore rules

๐Ÿš€ Features

  • Glaucoma Detection Model: State-of-the-art AI model for analyzing FUNDUS images.
  • Data Preprocessing: Robust scripts for cleaning and preparing datasets.
  • MLOps Pipelines: Automating model training, testing, and deployment using CI/CD.
  • PostgreSQL Integration: Save and manage detection results in a relational database.
  • Docker Support: Containerization for consistent development and deployment.

๐Ÿ“ฆ Getting Started

๐Ÿ–ฅ๏ธ Prerequisites

Ensure you have the following installed:

  • Python 3.x and pip
  • Docker and Docker Compose
  • PostgreSQL (for the database)

๐Ÿ› ๏ธ Setup Instructions

  1. Clone the Repository:

    git clone https://github.com/EyeVanguard/modeldevelopment.git
    cd modeldevelopment
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Set Up Environment Variables: Create a .env file with the following keys:

    DATABASE_URL=postgresql://username:password@localhost:5432/glaucoma_db
  4. Run Preprocessing:

    python data/preprocess.py
  5. Train the Model:

    python models/glaucoma_detection.py
  6. Run Unit Tests:

    pytest tests/

๐Ÿ“Š MLOps Integration

This repository includes CI/CD pipelines to streamline the development and deployment process:

  • Training Pipeline: Automatically trains and evaluates models on new datasets.
  • Deployment Pipeline: Deploys the best-performing model to production.
  • Monitoring: Tracks model performance and database updates.

๐Ÿ› ๏ธ Run Pipelines Locally

To test pipelines locally, use the following commands:

# Train pipeline
docker-compose -f pipelines/train_pipeline.yml up

# Deploy pipeline
docker-compose -f pipelines/deploy_pipeline.yml up

๐Ÿ“š Documentation


๐Ÿ”ฎ Future Enhancements

  • Hyperparameter Optimization: Automate hyperparameter tuning for better performance.
  • Advanced Models: Incorporate ensemble learning for improved accuracy.
  • Model Monitoring: Implement tools like Prometheus and Grafana for monitoring model performance.

๐Ÿ™Œ Contributors

This project is developed collaboratively under the EyeVanguard GitHub organization.