{"id":29274823,"url":"https://github.com/ginnters/realtime-object-detection-warning","last_synced_at":"2026-05-14T23:03:56.624Z","repository":{"id":301803404,"uuid":"1008769384","full_name":"GinnTers/Realtime-object-detection-warning","owner":"GinnTers","description":"Real-time YOLO-based object detection system with danger zone alerts, Telegram and Email notifications for safety automation.","archived":false,"fork":false,"pushed_at":"2025-06-29T00:31:21.000Z","size":61444,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T01:36:15.763Z","etag":null,"topics":["computer-vision","detection","email-notification","object-detection","opencv","safety","telegram-api","telegram-api-bot","yolo"],"latest_commit_sha":null,"homepage":"","language":"Python","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/GinnTers.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-06-26T04:28:50.000Z","updated_at":"2025-06-29T00:31:24.000Z","dependencies_parsed_at":"2025-06-29T01:46:37.273Z","dependency_job_id":null,"html_url":"https://github.com/GinnTers/Realtime-object-detection-warning","commit_stats":null,"previous_names":["ginnters/objects-detection-for-a-warning-system","ginnters/realtime-object-detection-warning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GinnTers/Realtime-object-detection-warning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GinnTers%2FRealtime-object-detection-warning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GinnTers%2FRealtime-object-detection-warning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GinnTers%2FRealtime-object-detection-warning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GinnTers%2FRealtime-object-detection-warning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GinnTers","download_url":"https://codeload.github.com/GinnTers/Realtime-object-detection-warning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GinnTers%2FRealtime-object-detection-warning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000638,"owners_count":26082819,"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-10-08T02:00:06.501Z","response_time":56,"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","detection","email-notification","object-detection","opencv","safety","telegram-api","telegram-api-bot","yolo"],"created_at":"2025-07-05T05:00:46.743Z","updated_at":"2025-10-08T20:50:35.797Z","avatar_url":"https://github.com/GinnTers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real-Time Object Detection Warning System  \n\u003e Project conducted: May 2024 (was not uploaded at the time)\n\nA real-time computer vision system using YOLO for object detection with danger zone alerts, sound notifications, and automated Telegram \u0026 Email warnings.\n\n---\n\n## Introduction\n\n![Eva](assets/1.jpg)\n\nThis project aims to build an automated **safety warning system** that uses computer vision and object detection to identify intruding objects within a predefined danger zone. When a detected object enters the danger area, the system will:\n\n- Play an alarm sound locally  \n- Send a warning message with image evidence via **Telegram** and **Email**\n\n**Key Applications:**\n- Intruder detection for security systems  \n- Safety monitoring in industrial zones  \n- Automated alerts in self-driving car assistance systems\n\n---\n\n## Dataset\n\n### Source\n- **Images:** 5,074 annotated images (4712 person, 362 non-person)\n- **Model:** Pre-trained YOLOv4 model used for object detection\n\n### Performance\n- **Precision:** 0.9985  \n- **Recall:** 0.9985\n\n![Eva](assets/eva.jpg)\n---\n\n## Tools \u0026 Technologies\n\n- **Languages:** Python  \n- **Libraries:** OpenCV, YOLOv4, Shapely, smtplib, telegram API  \n- **Hardware:** Requires GPU for optimal real-time performance\n\n---\n\n## Project Workflow\n\n### 1. Setup \u0026 Running the System\n\n- Run `code/main.py`  \n- The script will:\n  - Open webcam feed  \n  - Allow the user to define a danger zone by clicking 4 points using the mouse (`D` key to finalize)  \n  - Start real-time object detection using YOLOv4\n  - Continuously check if any detected object’s coordinates fall inside the defined danger zone\n\n### 2. Object Detection\n\n- Utilizes **YOLOv4** to detect objects within the camera feed in real-time.\n- Bounding boxes are drawn around detected objects with labels and confidence scores.\n\n![Eva](assets/detect.webp)\n\n### 3. Danger Zone Checking\n\n- Uses **Shapely** library to:\n  - Define and process the user-drawn polygon as the danger zone\n  - Check if object centroids fall within this zone\n\n![Eva](assets/2.jpg)\n\n### 4. Warning \u0026 Notification\n\n- If an object enters the danger zone:\n  - **Sound alarm:** plays a local audio file as an immediate alert  \n  - **Telegram alert:** sends a photo with a warning message to a pre-configured chat  \n  - **Email notification:** sends an email with the captured frame and warning details\n\n---\n\n## Result\n\nRunning the system displays:\n\n- Real-time webcam window with bounding boxes and danger zone overlay  \n- Console log of detection events and notification status  \n- Sends alerts to configured Telegram chat and Email address when an intrusion is detected\n\n---\n\n## How to Use\n\n1. Clone the repository and install required libraries (`code/setup.txt`).  \n2. Configure your Telegram bot token, chat ID, and email SMTP settings in ``code/main.py``.  \n3. Run:\n   ```bash\n   python main.py\n\n## Project Resources\nTo understand this project in detail:\n- Presentation: Read the project presentation slides in `slide_presentation.pdf`\n- Demo Video: Watch the [demo video](https://www.youtube.com/watch?v=orFa52maBXw) to see the system in action\n\n**Both files are included in this repository for better understanding of the workflow, functionality, and real-world application of the system.**\n\n## Learning Outcomes\n\n- Built a functional real-time object detection system with YOLOv4.\n- Integrated computer vision with notification APIs for automated alerts.\n- Applied spatial geometry checking (Shapely) for zone-based detection.\n- Strengthened skills in Python, OpenCV, and deployment of AI-powered safety solutions.\n\n## Requirements\n- opencv-python\n- numpy\n- imutils\n- python-telegram-bot\n\n**Please install using pip and ensure compatible versions based on your Python environment.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginnters%2Frealtime-object-detection-warning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fginnters%2Frealtime-object-detection-warning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginnters%2Frealtime-object-detection-warning/lists"}