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.
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
- 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.
Ensure you have the following installed:
- Python 3.x and pip
- Docker and Docker Compose
- PostgreSQL (for the database)
-
Clone the Repository:
git clone https://github.com/EyeVanguard/modeldevelopment.git cd modeldevelopment -
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables: Create a
.envfile with the following keys:DATABASE_URL=postgresql://username:password@localhost:5432/glaucoma_db
-
Run Preprocessing:
python data/preprocess.py
-
Train the Model:
python models/glaucoma_detection.py
-
Run Unit Tests:
pytest tests/
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.
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- Model Development: Refer to models/glaucoma_detection.py for detailed implementation.
- Preprocessing: See data/preprocess.py for dataset preparation steps.
- Database: SQL schemas and queries are available in the
database/folder.
- 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.
This project is developed collaboratively under the EyeVanguard GitHub organization.