{"id":26480568,"url":"https://github.com/josiah-mbao/ona-vision","last_synced_at":"2026-05-19T11:05:41.958Z","repository":{"id":282479521,"uuid":"947312326","full_name":"josiah-mbao/Ona-Vision","owner":"josiah-mbao","description":"MLOps Real-time Object Detection and Monitoring using YOLOv8 with automated deployment pipelines and scaling using Kubernetes, Prometheus, and Grafana","archived":false,"fork":false,"pushed_at":"2025-06-30T14:16:41.000Z","size":19229,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T05:03:47.080Z","etag":null,"topics":["computer-vision","mlops","object-detection","prometheus","real-time-video-streaming","yolov8"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josiah-mbao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-12T13:45:22.000Z","updated_at":"2025-06-30T14:16:44.000Z","dependencies_parsed_at":"2025-06-25T23:34:14.204Z","dependency_job_id":"6454be4e-7ade-4d42-8e3f-a88b06ca9cb7","html_url":"https://github.com/josiah-mbao/Ona-Vision","commit_stats":null,"previous_names":["josiah-mbao/realtime-object-detection","josiah-mbao/ona-vision"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/josiah-mbao/Ona-Vision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FOna-Vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FOna-Vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FOna-Vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FOna-Vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josiah-mbao","download_url":"https://codeload.github.com/josiah-mbao/Ona-Vision/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josiah-mbao%2FOna-Vision/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270898880,"owners_count":24664705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","mlops","object-detection","prometheus","real-time-video-streaming","yolov8"],"created_at":"2025-03-20T02:35:33.805Z","updated_at":"2026-05-19T11:05:41.929Z","avatar_url":"https://github.com/josiah-mbao.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg width=\"500\" height=\"395\" alt=\"logo\" src=\"https://github.com/user-attachments/assets/ad7173d1-7dee-471d-8a2e-cc707cf3306c\" /\u003e\n\u003c/p\u003e\n\n# Ona Vision 🎯 — Real-Time Object Detection \u0026 Monitoring with YOLOv8, DeepSORT, and MLOps\n[![GitHub stars](https://img.shields.io/github/stars/josiah-mbao/ona-vision?style=social)](https://github.com/josiah-mbao/ona-vision/stargazers)\n\n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)\n![YOLOv8](https://img.shields.io/badge/YOLOv8-black?style=for-the-badge\u0026logo=opencv\u0026logoColor=white)\n![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?style=for-the-badge\u0026logo=prometheus\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![Kubernetes](https://img.shields.io/badge/Kubernetes-326CE5?style=for-the-badge\u0026logo=kubernetes\u0026logoColor=white)\n![Terraform](https://img.shields.io/badge/Terraform-623CE4?style=for-the-badge\u0026logo=terraform\u0026logoColor=white)\n\n## Tech Stack\n\n- 🐍 Python 3.10\n- 🧠 YOLOv8 (Ultralytics)\n- 🔍 DeepSORT\n- 📦 Docker\n- ☸️ Kubernetes\n- 📊 Prometheus\n- 🧪 FastAPI (for Web UI)\n- 🧱 Terraform (for infra-as-code)\n\n## Table of Contents\n- [Overview](#overview)\n- [The Inspiration](#the-inspiration)\n- [Features](#features)\n- [Web UI](#web-ui)\n- [Multi-Object Tracking (MOT) with DeepSORT](#multi-object-tracking-mot-with-deepsort)\n- [Setup Instructions](#setup-instructions)\n- [How It Works](#how-it-works)\n- [Observability Metrics](#observability-metrics)\n- [Potential Improvements](#potential-improvements)\n- [License](#license)\n- [Author](#author)\n\n\n## Overview\n\nThis project implements real-time object detection using YOLOv8 and streams the processed video over a network. The server captures video from a webcam, performs object detection, and sends the processed frames to a client for display. Additionally, it integrates observability features using Prometheus to monitor system performance and model inference metrics.\n\nOna Vision is a full MLOps pipeline, covering the complete lifecycle of a machine learning model, from training to deployment, monitoring, and scaling. It leverages Docker, Kubernetes, and GitOps to ensure a scalable and reliable production system for object detection and monitoring.\n  \n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"700\" alt=\"demo\" src=\"https://github.com/user-attachments/assets/2263076d-61f8-4ba1-9986-2fc40656acb4\" /\u003e\n\u003c/p\u003e\n\n\n\n### The Inspiration\n\nOna Vision was born out of a frustrating and unfortunate experience I had. I lost — or possibly had my AirPods stolen — at my university library. In an attempt to recover them, I spent nearly an hour in the CCTV office scrubbing through days of footage, trying to figure out what time I was at the library and if the AirPods could be spotted in any frame.\n\nThe process was slow and inefficient—like looking for a needle in a haystack. Unfortunately, I never found my AirPods, but I walked away with an idea.\n\n**Ona Vision** is my attempt to ensure others don’t have to go through that same helpless process. With object detection and tracking built in, this system can help people and institutions monitor and trace specific objects in real-time or recorded video streams. It’s my hope that this technology can make environments a little safer, and surveillance systems a lot smarter.\n\n\n## Features\n- Uses **YOLOv8** for state-of-the-art object detection\n- **Real-time video processing** with OpenCV\n- **Network streaming** using Python sockets\n- **Bounding box rendering** with object labels\n- **Observability integration** with Prometheus for:\n  - FPS (Frames Per Second)\n  - Inference time\n  - CPU and memory usage\n  - Detection confidence and per-class object count\n\n## Web UI\nYou can now launch the detection system and view results from your browser using FastAPI.\n\n\u003cimg width=\"1440\" alt=\"Screenshot 2025-06-26 at 01 32 37\" src=\"https://github.com/user-attachments/assets/029088ab-e3cd-4b42-aa75-ff9d30643e2b\" /\u003e\n\n\n\n### To Run the Web UI:\n```bash\ncd ui\nuvicorn app:app --reload\n```\nThen visit [http://localhost:8000](http://localhost:8000) in your browser.\n\n\n## Multi-Object Tracking (MOT) with DeepSORT\n\n### What is DeepSORT?\nDeepSORT (Deep Simple Online and Realtime Tracker) is an advanced object tracking algorithm that extends the original SORT tracker by adding deep learning-based appearance descriptors. This helps improve object re-identification across frames, making tracking more reliable in crowded or fast-moving scenes.\n\n### Why Use DeepSORT?\n- **Tracks multiple objects across frames** with consistent IDs.\n- **Handles occlusions** (when objects overlap or disappear temporarily).\n- **Re-identifies objects** even if they leave and re-enter the scene.\n- **More accurate tracking** compared to basic object detection.\n\n### How It Works in Ona Vision\n1. **YOLOv8 detects objects** in each frame.\n2. **DeepSORT assigns unique IDs** to detected objects.\n3. **Tracks objects over time**, even if they move, overlap, or briefly disappear.\n4. **Outputs tracking results** with bounding boxes and IDs.\n\n### Performance Impact\n- Adds a **small processing overhead** (~5-10% FPS drop).\n- More stable tracking compared to detection-only mode.\n- Ideal for **surveillance, traffic monitoring, and sports analytics**.\n\n\n## Setup Instructions\n\nInstall Libraries from requirements.txt\n```bash\npip install -r requirements.txt\n```\n\nStart the server which processes frames from webcam or other source\n```bash\npython main.py\n```\n\nDisplay real-time video in web UI (at localhost:8000)\n```bash\ncd ui\nuvicorn app:app --reload\n```\n\n## How It Works\n1. The **server** captures frames from the webcam and runs YOLOv8 for object detection.\n2. Bounding boxes and labels are added to the frame.\n3. The processed frame is serialized and sent to the **client** over a socket connection.\n4. The **client** receives and displays the video in real-time.\n5. **Prometheus metrics** are collected in the background, tracking performance and inference statistics.\n\n## Observability Metrics\n| Metric | Description |\n|--------|-------------|\n| **FPS** | Frames per second for performance monitoring |\n| **Inference Time** | Time taken for YOLOv8 inference per frame |\n| **CPU Usage** | System CPU utilization during processing |\n| **Memory Usage** | System memory consumption during processing |\n| **Detection Confidence** | Average confidence of detected objects per frame |\n| **Class-wise Object Count** | Tracks the number of detected objects per class |\n\n\n## Potential Improvements\n- **Edge deployment** on a Raspberry Pi or Jetson Nano\n- **Cloud integration** to store detection data\n- **Web-based visualization** using FastAPI\n\n## Contributing\nContributions are welcome! If you find a bug or want to add a feature, feel free to open an issue or submit a pull request.\n\nPlease make sure to discuss big changes in an issue first to ensure alignment.\n\n## License\nThis project is open-source under the **Apache 2.0 License**.\n- You are free to use, modify, and distribute the code under the terms of the Apache 2.0 License.\n\n## Author\nJosiah Mbao – Software Engineer | MLOps Developer  \n🔗 GitHub | ✉️ josiahmbaomc@gmail.com\n\n---\nIf you found this project useful, please ⭐ the repo to support the work!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosiah-mbao%2Fona-vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosiah-mbao%2Fona-vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosiah-mbao%2Fona-vision/lists"}