{"id":27020392,"url":"https://github.com/uni-creator/crowd-detection","last_synced_at":"2026-02-17T07:39:47.595Z","repository":{"id":283958802,"uuid":"937578596","full_name":"Uni-Creator/Crowd-Detection","owner":"Uni-Creator","description":"This project implements real-time crowd detection using YOLOv8. It identifies and tracks people in a video feed, detects crowd formation based on proximity, and logs the results in a CSV file.","archived":false,"fork":false,"pushed_at":"2025-03-23T09:37:11.000Z","size":7431,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T10:27:15.844Z","etag":null,"topics":["ai","computer-vision","crowd-detection","csv","deep-learning","object-detection","opencv","python","yolov8"],"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/Uni-Creator.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}},"created_at":"2025-02-23T12:12:05.000Z","updated_at":"2025-03-23T09:37:15.000Z","dependencies_parsed_at":"2025-03-23T10:37:23.022Z","dependency_job_id":null,"html_url":"https://github.com/Uni-Creator/Crowd-Detection","commit_stats":null,"previous_names":["uni-creator/crowd-detection"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uni-Creator%2FCrowd-Detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uni-Creator%2FCrowd-Detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uni-Creator%2FCrowd-Detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uni-Creator%2FCrowd-Detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Uni-Creator","download_url":"https://codeload.github.com/Uni-Creator/Crowd-Detection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247228980,"owners_count":20904953,"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","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":["ai","computer-vision","crowd-detection","csv","deep-learning","object-detection","opencv","python","yolov8"],"created_at":"2025-04-04T18:30:00.363Z","updated_at":"2026-02-17T07:39:42.557Z","avatar_url":"https://github.com/Uni-Creator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crowd Detection Using YOLOv8\r\n![GitHub Repo stars](https://img.shields.io/github/stars/Uni-Creator/Crowd-Detection?style=social)  ![GitHub forks](https://img.shields.io/github/forks/Uni-Creator/Crowd-Detection?style=social)\r\n\r\n## 📌 Project Overview\r\nThis project uses **YOLOv8** for real-time crowd detection in videos. It tracks individuals, groups them based on proximity, and detects crowds that meet a defined threshold.\r\n\r\n## 🚀 Features\r\n- Detects individuals using **YOLOv8**.\r\n- Tracks people across frames and assigns unique IDs.\r\n- Identifies crowd formations based on predefined distance thresholds.\r\n- Saves crowd count per frame in a CSV file.\r\n\r\n## 📂 Installation\r\n### 1️⃣ Clone the Repository\r\n```sh\r\ngit clone https://github.com/yourusername/crowd-detection.git\r\ncd crowd-detection\r\n```\r\n\r\n### 2️⃣ Install Dependencies\r\n```sh\r\npip install -r requirements.txt\r\n```\r\n\r\n### 3️⃣ Run the Crowd Detection\r\n```sh\r\npython crowd_detection.py\r\n```\r\n\r\n## 🔧 Configuration\r\n- **CROWD_THRESHOLD**: Minimum number of people required to be considered a crowd.\r\n- **DISTANCE_THRESHOLD**: Maximum distance between people for them to be considered in the same group.\r\n- **FRAME_THRESHOLD**: Number of frames a person remains tracked before being removed.\r\n\r\n## 📊 Output\r\n- **Live Video Stream**: Displays detected individuals and crowds.\r\n- **CSV Output**: A file `crowd_detection_results.csv` is generated containing:\r\n\r\n| Frame Number | Crowd Count |\r\n|-------------|-------------|\r\n| 100         | 5           |\r\n| 250         | 7           |\r\n\r\n## 📌 Dependencies\r\n- **Python 3.8+**\r\n- **OpenCV**\r\n- **YOLOv8 (Ultralytics)**\r\n- **NumPy**\r\n- **Pandas**\r\n- **SciPy**\r\n\r\n## 📜 License\r\nThis project is licensed under the **MIT License**.\r\n\r\n## ✨ Acknowledgments\r\n- **Ultralytics YOLOv8** for object detection.\r\n- **OpenCV** for image processing.\r\n- **SciPy** for spatial distance calculations.\r\n\r\n---\r\n\r\n### **requirements.txt**\r\n```txt\r\nopencv-python\r\nopencv-python-headless\r\ntorch\r\ntorchvision\r\nnumpy\r\npandas\r\nscipy\r\nultralytics\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funi-creator%2Fcrowd-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funi-creator%2Fcrowd-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funi-creator%2Fcrowd-detection/lists"}