https://github.com/rijoslal/braintumordetection_mlops
FastAPI-based Brain Tumor Detection system following MLOps principles, enabling efficient model deployment, automated data handling, and seamless API integration for real-time predictions
https://github.com/rijoslal/braintumordetection_mlops
dagshub dvc fastapi mlflow-tracking-server mlops tensorflow vision-transformer
Last synced: 5 months ago
JSON representation
FastAPI-based Brain Tumor Detection system following MLOps principles, enabling efficient model deployment, automated data handling, and seamless API integration for real-time predictions
- Host: GitHub
- URL: https://github.com/rijoslal/braintumordetection_mlops
- Owner: RijoSLal
- Created: 2025-02-11T08:11:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-03T18:00:18.000Z (11 months ago)
- Last Synced: 2025-08-03T19:35:31.867Z (11 months ago)
- Topics: dagshub, dvc, fastapi, mlflow-tracking-server, mlops, tensorflow, vision-transformer
- Language: Jupyter Notebook
- Homepage: https://dagshub.com/slalrijo2005/BTD
- Size: 6.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BrainTumorDetection_MLOPS
## Overview
BrainTumorDetection_MLOPS is a FastAPI-based brain tumor detection system designed with MLOps principles for efficient model deployment, automated data handling, and seamless API integration. The system uses MLflow for model tracking, DVC for data versioning, and DAGsHub (https://dagshub.com/slalrijo2005/BTD) as the central server for both MLflow and DVC. It employs a Vision Transformer (ViT) model for accurate tumor detection from medical images.
## Features
- **FastAPI-based API** for real-time predictions.
- **MLflow integration** to track model performance and experiments.
- **DVC (Data Version Control)** for handling datasets efficiently.
- **DAGsHub as a unified platform** for MLflow and DVC.
- **Automated pipeline** for data processing and deployment.
## Tech Stack
- **FastAPI** - Web framework for serving the model.
- **MLflow** - Model tracking and experiment logging.
- **DVC** - Data versioning and management.
- **DAGsHub** - Hosting and integration for MLflow and DVC.
## Installation & Setup
### 1. Clone the Repository
```bash
git clone https://github.com/RijoSLal/BrainTumorDetection_MLOPS.git
cd BrainTumorDetection_MLOPS
```
### 2. Set Up Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
### 3. Install Dependencies
```bash
pip install -r requirements.txt
```
### 4. Configure MLflow & DVC
#### Initialize DVC and Add Remote Storage
```bash
dvc init
dvc remote add origin https://dagshub.com/yourusername/BrainTumorDetection_MLOPS.dvc
```
#### Set Up MLflow Tracking
```bash
export MLFLOW_TRACKING_URI=https://dagshub.com/yourusername/BrainTumorDetection_MLOPS.mlflow
```
### 5. Run the FastAPI Server
```bash
uvicorn main:app --host 0.0.0.0 --port 8000
```
## API Endpoints
### **Predict Tumor**
- **Endpoint:** `/docs`
- **Method:** `POST`
- **Payload:**
```json
{
"image": "base64_encoded_image"
}
```
- **Response:**
```json
{
"prediction": "No abnormal growth detected. However, consult a doctor for confirmation"
}
```
## Contributing
Feel free to contribute.
## License
This project is licensed under the MIT License.