- Member 1: Feryadi Yulius (122450087)
- Member 2: Syadza Puspadari Azhar (122450072)
- Member 3: Dinda Nababan (122450120)
- Member 4: Alyya 1224500
→ START HERE: Step-by-Step Guide
- Kerusakan jalan (pothole) menimbulkan risiko kecelakaan
- Deteksi manual tidak efisien dan memakan waktu
- Perlu sistem otomatis untuk deteksi real-time
- Implementasi Deep Learning dengan YOLOv8 untuk deteksi pothole
- Pipeline MLOps untuk automasi training hingga deployment
- Monitoring dan tracking untuk menjaga kualitas model
- Data Pipeline → Automasi pengolahan data
- Model Training → Training dengan experiment tracking
- Model Evaluation → Validasi performa model
- Deployment → REST API & Container Docker
- Monitoring → Tracking performa production
- CI/CD → Automasi testing dan deployment
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Dataset │ --> │ Training │ --> │ MLflow │
│ Validation │ │ Pipeline │ │ Tracking │
└─────────────┘ └──────────────┘ └─────────────┘
│
▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ User UI │ <-- │ FastAPI │ <-- │ Model │
│ (Streamlit)│ │ Server │ │ Registry │
└─────────────┘ └──────────────┘ └─────────────┘
│
▼
┌──────────────┐
│ Monitoring │
│ System │
└──────────────┘
- YOLOv8 → Model object detection
- Ultralytics → Framework training
- PyTorch → Deep learning engine
- MLflow → Experiment tracking & model registry
- Optuna → Hyperparameter tuning
- DVC → Data version control
- FastAPI → REST API server
- Streamlit → User interface
- Docker → Containerization
- GitHub Actions → Automation pipeline
- Pytest → Unit testing
- Pre-commit → Code quality
- Sumber: Roboflow Pothole Detection Dataset
- Total Images: 665 gambar
- Train: 477 gambar (72%)
- Validation: 143 gambar (21%)
- Test: 45 gambar (7%)
- Classes: 1 (Pothole)
- Resize: 640x640
- Normalization
- Augmentation: flip, rotation, brightness
- Validasi struktur dataset
- Exploratory Data Analysis (EDA)
- Quality checks
- Multi-model training (YOLOv8n, YOLOv8s)
- Hyperparameter tuning dengan Optuna
- Experiment tracking dengan MLflow
- Model versioning
- Metrics: Precision, Recall, F1-Score, mAP
- Confusion matrix
- Test set evaluation
- Model comparison
- Model serving via FastAPI
- Docker containerization
- Multi-model support
- Load balancing
- Inference latency tracking
- Error rate monitoring
- Input drift detection
- Performance metrics
# CLI command
python cli.py train --model yolov8n --epochs 100
# Hyperparameter tuning
python cli.py tune --n-trials 50# Start API server
python cli.py serve
# Access API: http://localhost:8000docker-compose up --build
# Services:
# - MLflow: http://localhost:5000
# - FastAPI: http://localhost:8000
# - User UI: http://localhost:8501
# - Admin UI: http://localhost:8502- Upload gambar untuk deteksi
- Real-time inference
- Visualisasi hasil deteksi
- Download hasil
- Model management
- Performance monitoring
- Experiment comparison
- System health check
- Unit tests: 85%
- Integration tests
- API endpoint tests
- Data validation tests
Push → Tests → Build → Deploy
↓ ↓ ↓ ↓
Code Pytest Docker Production
-
Model Performance
- Accuracy, Precision, Recall
- Inference latency
-
System Metrics
- API response time
- Error rates
- Resource usage
-
Data Quality
- Input distribution
- Drift detection
- Importance of experiment tracking
- Docker containerization benefits
- CI/CD automation value
- Version everything (code, data, model)
- Monitor continuously
- Automate repetitive tasks
- Test thoroughly
- Model quantization untuk inference lebih cepat
- Add more augmentation techniques
- Improve UI/UX
- Multi-class detection (berbagai jenis kerusakan)
- Edge deployment (mobile/embedded)
- Real-time video processing
- Integration dengan GIS system
- YOLOv8 Documentation: https://docs.ultralytics.com/
- MLflow: https://mlflow.org/
- Base Project: https://github.com/prsdm/mlops-project
- FastAPI: https://fastapi.tiangolo.com/
Repository: https://github.com/sains-data/Mlops_RC_04
.
├── src/
│ ├── data/ # Data ingestion, validation, preprocessing
│ ├── training/ # Model training scripts
│ ├── evaluation/ # Model evaluation and testing
│ ├── inference/ # Inference logic
│ ├── api/ # FastAPI endpoints
│ ├── monitoring/ # Monitoring and drift detection
│ └── utils/ # Utility functions
├── ui/ # Streamlit UI (User & Admin)
├── configs/ # Configuration files
├── tests/ # Unit and integration tests
├── .github/workflows/ # CI/CD workflows
├── dataset/ # Dataset directory
├── models/ # Saved models
├── mlruns/ # MLflow tracking
├── docker-compose.yml # Docker orchestration
└── cli.py # CLI interface
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtPlace your dataset in the following structure:
dataset/
├── train/
│ ├── images/
│ └── labels/
├── val/
│ ├── images/
│ └── labels/
└── test/
├── images/
└── labels/
python cli.py train --model yolov8n --epochs 100mlflow ui --port 5000python cli.py serve# User Interface
streamlit run ui/user_app.py
# Admin Interface
streamlit run ui/admin_app.pydocker-compose up --buildServices:
- MLflow: http://localhost:5000
- FastAPI: http://localhost:8000
- User UI: http://localhost:8501
- Admin UI: http://localhost:8502
- ✅ Data validation and integrity checks
- ✅ Exploratory Data Analysis (EDA)
- ✅ Data preprocessing and augmentation
- ✅ Multi-model training (YOLOv8n, YOLOv8s)
- ✅ Hyperparameter tuning with Optuna
- ✅ Experiment tracking with MLflow
- ✅ Comprehensive metrics (Precision, Recall, F1, mAP)
- ✅ Confusion matrix
- ✅ Test set evaluation
- ✅ FastAPI REST API
- ✅ Multi-model serving
- ✅ Docker containerization
- ✅ Inference latency tracking
- ✅ Error rate monitoring
- ✅ Input drift detection
- ✅ User interface for image upload and detection
- ✅ Admin interface for model management
- ✅ Automated testing
- ✅ Model training pipeline
- ✅ Deployment automation
All experiments are tracked including:
- Hyperparameters
- Metrics (mAP, loss, precision, recall)
- Model artifacts
- Confusion matrices
# Training
python cli.py train --model yolov8n --epochs 100 --batch 16
# Evaluation
python cli.py evaluate --model-path models/best.pt
# Testing
python cli.py test --model-path models/best.pt
# Hyperparameter Tuning
python cli.py tune --n-trials 50
# Start API Server
python cli.py serve
# Data Validation
python cli.py validate-datapytest tests/ -v --cov=srcDue Date: December 15, 2025
Team Size: Maximum 4 people
Based on: https://github.com/prsdm/mlops-project