{"id":23688887,"url":"https://github.com/anidipta/quarter-ball-tracker-using-yolo","last_synced_at":"2025-04-11T07:40:03.481Z","repository":{"id":247391503,"uuid":"825417871","full_name":"Anidipta/Quarter-Ball-Tracker-using-YOLO","owner":"Anidipta","description":"Ball Detection in quarter","archived":false,"fork":false,"pushed_at":"2024-08-19T16:27:40.000Z","size":1600,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T05:12:06.110Z","etag":null,"topics":["colab-notebook","computer-vision","opencv","pillow","python"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anidipta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-07T17:59:02.000Z","updated_at":"2024-09-02T13:08:32.000Z","dependencies_parsed_at":"2024-12-30T00:20:42.239Z","dependency_job_id":"e294e6e2-3001-41c4-b02c-2159fb6b811e","html_url":"https://github.com/Anidipta/Quarter-Ball-Tracker-using-YOLO","commit_stats":null,"previous_names":["anidipta/ai-assignment","anidipta/quarter-ball-tracker-using-yolo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anidipta%2FQuarter-Ball-Tracker-using-YOLO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anidipta%2FQuarter-Ball-Tracker-using-YOLO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anidipta%2FQuarter-Ball-Tracker-using-YOLO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anidipta%2FQuarter-Ball-Tracker-using-YOLO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anidipta","download_url":"https://codeload.github.com/Anidipta/Quarter-Ball-Tracker-using-YOLO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248359180,"owners_count":21090489,"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":["colab-notebook","computer-vision","opencv","pillow","python"],"created_at":"2024-12-30T00:19:52.447Z","updated_at":"2025-04-11T07:40:03.454Z","avatar_url":"https://github.com/Anidipta.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Title: Ball ⚽ Tracking  and Event Detection in Video 🎥\n\n## **Objective:**\nDevelop an advanced computer vision program to track and classify the movement of balls in various colors across different quadrants within a video. The system will record each ball's entry and exit events from each numbered quadrant, displaying this information overlayed on the processed video.\n\n## **Model Details:**\n\nTwo custom YOLOv8x models were employed in this project:\n\n- **🔲 Quadrant Detection Model**: Identifies quadrants in the video to accurately map ball positions.\n  \n- **🏀 Ball Detection Model**: Detects balls, classifies their colors, and tracks their movements to log entry and exit events.\n\n- **⚙️ Combined Model**: Integrates the above models using a cascading object detection approach for comprehensive detection and identification.\n\n## **Links and Results:**\n\n- **📔 Link to the Colab Notebook**: [CLICK HERE](https://colab.research.google.com/drive/1EGUlv8hCES5XOHuVv5tpenP1wSIR0ry1?usp=sharing)\n\n### **🔍 Model Results:**\n\n- **Confusion Matrices**\n  - **Ball Detection Model**: \n    \u003cdiv style=\"display: flex;\"\u003e\n      \u003cdiv style=\"flex: 1; padding: 10px;\"\u003e\n        \u003ch5\u003e📊 Ball Detection Model\u003c/h5\u003e\n        \u003cimg src=\"https://github.com/Anidipta/AI-Assignment/blob/main/Image/confusion_matrix(1).png\" alt=\"Ball Detection Confusion Matrix\" style=\"width: 100%; max-width: 300px;\"\u003e\n      \u003c/div\u003e\n      \u003cdiv style=\"flex: 1; padding: 10px;\"\u003e\n        \u003ch5\u003e📊 Quadrant Detection Model\u003c/h5\u003e\n        \u003cimg src=\"https://github.com/Anidipta/AI-Assignment/blob/main/Image/confusion_matrix.png\" alt=\"Quadrant Detection Confusion Matrix\" style=\"width: 100%; max-width: 300px;\"\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n\n- **Label Analysis**\n  - **Ball Detection Model**: \n    \u003cdiv style=\"display: flex;\"\u003e\n      \u003cdiv style=\"flex: 1; padding: 10px;\"\u003e\n        \u003ch5\u003e📈 Ball Detection Model\u003c/h5\u003e\n        \u003cimg src=\"https://github.com/Anidipta/AI-Assignment/blob/main/Image/labels_correlogram(1).jpg\" alt=\"Ball Detection Label Analysis\" style=\"width: 100%; max-width: 300px;\"\u003e\n      \u003c/div\u003e\n      \u003cdiv style=\"flex: 1; padding: 10px;\"\u003e\n        \u003ch5\u003e📈 Quadrant Detection Model\u003c/h5\u003e\n        \u003cimg src=\"https://github.com/Anidipta/AI-Assignment/blob/main/Image/labels_correlogram.jpg\" alt=\"Quadrant Detection Label Analysis\" style=\"width: 100%; max-width: 300px;\"\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n\n- **Detection Results**\n  - **Ball Detection Model**: \n    \u003cdiv style=\"display: flex;\"\u003e\n      \u003cdiv style=\"flex: 1; padding: 10px;\"\u003e\n        \u003ch5\u003e🔍 Ball Detection Model\u003c/h5\u003e\n        \u003cimg src=\"https://github.com/Anidipta/AI-Assignment/blob/main/Image/results(1).png\" alt=\"Ball Detection Results\" style=\"width: 100%; max-width: 300px;\"\u003e\n      \u003c/div\u003e\n      \u003cdiv style=\"flex: 1; padding: 10px;\"\u003e\n        \u003ch5\u003e🔍 Quadrant Detection Model\u003c/h5\u003e\n        \u003cimg src=\"https://github.com/Anidipta/AI-Assignment/blob/main/Image/results.png\" alt=\"Quadrant Detection Results\" style=\"width: 100%; max-width: 300px;\"\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n\n## **Output:**\n\n### **🎬 Processed Video:**\n\n- Tracks balls with color identification.\n- Displays time stamps in the top left corner.\n- Shows detection boxes with confidence levels.\n\n- **🔗 Link to the Processed Video**: [CLICK HERE](https://drive.google.com/file/d/1c_EzHK5AWmWOBoT0Yf4Q2Zuz8NICl0Jl/view?usp=sharing)\n\n- **🖼️ Demo Image Detected by the Model:**\n  ![Demo Image](https://github.com/Anidipta/AI-Assignment/blob/main/demo%20image.png)\n\n### **📄 Text File:**\n\n- Records events with format: Time, Quadrant Number, Ball Color, Type (Entry or Exit).\n\n- **🔗 Link to the TXT File**: [CLICK HERE](cleaned_result.txt)\n\n## **Tools and Technologies Used:**\n\n- **🧠 YOLOv8x** for advanced object detection.\n- **🔧 OpenCV** for video processing.\n- **🔢 NumPy** for efficient data manipulation.\n- **📊 Pandas** for data management and analysis.\n- **🐍 Python** for scripting and integration.\n- **🔒 Kaggle** for storing videos and models.\n- **🗂️ Roboflow** for dataset preparation (training, testing, and validation).\n\n## **Challenges Faced:**\n\n1. **🔄 Object Tracking and Identification**: Maintaining ball identity across frames despite occlusions and rapid movement.\n2. **⏱️ Real-time Performance**: Processing each video frame in real-time while managing complex models.\n3. **🎯 Accuracy of Detection**: Achieving high detection accuracy under varied lighting and backgrounds.\n4. **🔄 State Management**: Correctly updating the state of balls while tracking multiple objects in dynamic scenes.\n\n## **Usage Instructions:**\n\n1. Clone the repository and navigate to the project directory.\n2. Ensure all required packages are installed by running:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Place your input video in the project directory.\n4. Update the paths in the `process_video` function to point to your input video and desired output locations.\n5. Run the Jupyter notebook to process the video and generate output files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanidipta%2Fquarter-ball-tracker-using-yolo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanidipta%2Fquarter-ball-tracker-using-yolo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanidipta%2Fquarter-ball-tracker-using-yolo/lists"}