Skip to content

About

So easy, even Stack Overflow judges you.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Painfully Trivial – a hand-drawn banner: a train at a platform and a row of German wheelie bins

🚀 Advanced Machine Learning & Computer Vision Solutions

Deutsche Bahn Delay Prediction | Waste Sorting Assistant

GitHub Badge Python 3.10+ MIT License

PyTorch Docker Ready Streamlit Demo GitHub Actions

Live Demo • Features • Quick Start • Projects • Deployment • Contributing


🎯 Overview

Painfully Trivial showcases two cutting-edge machine learning applications developed as part of our academic journey at TH Deggendorf. These projects demonstrate practical applications of ML/DL in solving real-world problems.

Note

Both projects were developed by Sameer, Fares, and Alex as part of the Machine Learning course and have been successfully graded by the university.

🤔 Why the name?

These projects were assigned as two straightforward academic exercises. They weren't.

What started as routine homework tasks grew into something else entirely: a live computer vision app with a custom-trained YOLOv8 model deployed on Streamlit Cloud, and a regression pipeline backed by 2M+ Deutsche Bahn records with a published research paper. Docker, CI/CD, WebRTC, the works. Trivial in name only.

🌟 Live Demo

Live Demo ML Research Paper

Tip

The demo supports real-time camera input! Allow camera permissions when prompted for the best experience.

📋 Features

🗑️ Waste Sorting Assistant (Computer Vision)

  • Real-time Detection: Identifies German waste bins using YOLOv8
  • 4 Categories: Biomüll, Glas, Papier, Restmüll
  • Live Camera Support: Works with webcam or phone camera
  • Multi-language Instructions: Guides proper waste disposal
  • Custom Dataset: 466 locally captured images from Deggendorf

🚄 Deutsche Bahn Delay Predictor (ML Regression)

  • 92.4% Accuracy: Outperforms baseline predictions
  • 2M+ Records: Trained on extensive Deutsche Bahn dataset
  • Feature Engineering: Temporal patterns, station characteristics
  • Multiple Models: Linear Regression, KNN, Random Forest
  • Production Ready: Includes preprocessing pipeline and deployment code

🚀 Quick Start

Prerequisites

# Python 3.10 or higher
python --version

# CUDA-capable GPU (optional, for faster training)
nvidia-smi

Installation

# Clone the repository
git clone https://github.com/arudaev/Painfully-Trivial.git
cd painfully-trivial

# TODO

Important

For GPU support, install PyTorch with CUDA:

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

📂 Project Structure

painfully-trivial/
├── 📁 cv_garbage/                 # Computer Vision Project
│   ├── 📁 models/                 # Trained YOLO models
│   ├── 📁 YOLO_Dataset/          # Annotated dataset
│   ├── 📁 raw_images/            # Original photos
│   ├── 📄 2-Computer-Vision.py   # Main CV notebook
│   └── 📄 YOLO_Model.py         # Model training scripts
├── 📁 ml_deutsche_bahn/          # ML Regression Project
│   ├── 📄 1-Machine-Learning-v2.py
│   └── 📁 data/
├── 📁 ml_db_paper_web/           # Published Quarto research paper (submodule)
├── 📁 streamlit_app/             # Streamlit Demo App
│   ├── 📄 app.py
│   ├── 📄 pages/
│   └── 📄 utils/
├── 📁 .github/workflows/         # CI/CD Pipeline
├── 📄 Dockerfile
├── 📄 requirements.txt
└── 📄 README.md

🔬 Projects

1. Waste Sorting Assistant (Computer Vision)

🗑️ Click to expand project details

Problem Statement

International students in Deggendorf struggle with the German waste sorting system due to language barriers and unfamiliar color coding.

Solution

A real-time object detection system that:

  • Identifies waste bin types from camera input
  • Provides disposal guidelines in multiple languages
  • Works on mobile devices and laptops

Technical Details

  • Model: YOLOv8 (fine-tuned)
  • Dataset: 466 custom images
  • Classes: 4 (Biomüll, Glas, Papier, Restmüll)
  • Training: 50 epochs, batch size 4
  • Performance: 95%+ mAP@0.5

2. Deutsche Bahn Delay Predictor

🚄 Click to expand project details

Problem Statement

Predict train arrival delays to help passengers plan better and assist DB in operational optimization.

Solution

A supervised regression model that:

  • Predicts delays in minutes
  • Uses historical patterns and station data
  • Achieves 92.4% improvement over baseline

Technical Details

  • Dataset: 2,061,357 records
  • Features: 16 engineered features
  • Models: Linear Regression, KNN, Random Forest
  • Best Model: Random Forest (MSE: 0.8791)
  • Validation: 60-20-20 train-val-test split

Key Insights

  • Departure delay is the strongest predictor
  • Rush hours show higher delays
  • Station-specific patterns matter

📊 Performance Metrics

Waste Sorting Assistant

  • Inference Speed: 19.5 FPS on GPU
  • Accuracy: 95%+ mAP@0.5
  • Model Size: 22.5 MB

DB Delay Predictor

  • Test MSE: 0.8791
  • RMSE: 0.938 minutes
  • Improvement: 92.4% over baseline

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines.

# Fork the repo
# Create your feature branch
git checkout -b feature/AmazingFeature

# Commit your changes
git commit -m 'Add some AmazingFeature'

# Push to the branch
git push origin feature/AmazingFeature

# Open a Pull Request

📝 Citation

If you use this work in your research, please cite:

@misc{painfully-trivial2025,
  author = {Sameer, Fares, Alex},
  title = {Painfully Trivial: ML Solutions for Real-World Problems},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/arudaev/Painfully-Trivial}}
}

👥 Team

Sameer
Sameer

💻 📊 🔬
Fares
Fares

💻 🎨 📱
Alex
Alex

💻 🚀 📝

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • TH Deggendorf - For academic support and resources
  • Prof. Dr. Mayer - Machine Learning course instructor
  • Prof. Dr. Glauner - Computer Vision course instructor
  • Deutsche Bahn - For providing the delays dataset
  • City of Deggendorf - For allowing data collection

Made with ❤️ at TH Deggendorf

Back to top ↑

About

So easy, even Stack Overflow judges you.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages