{"id":24455268,"url":"https://github.com/giangson-5/object_detection_with_yolov11","last_synced_at":"2026-04-25T11:32:37.950Z","repository":{"id":271892905,"uuid":"912901676","full_name":"GiangSon-5/Object_Detection_with_YOLOV11","owner":"GiangSon-5","description":"This project uses YOLOv11 to detect five vehicle types: Ambulance, Bus, Car, Motorcycle, and Truck. Key steps include data preparation, training, evaluation using mAP@50, and deployment in ONNX format, focusing on improving detection for underrepresented classes.","archived":false,"fork":false,"pushed_at":"2025-01-10T14:44:55.000Z","size":482,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T07:27:37.945Z","etag":null,"topics":["computer-vision","deep-learning","detection","jupyter-notebook","kaggle","yolo"],"latest_commit_sha":null,"homepage":"https://www.kaggle.com/code/nguyenquyetgiangson/q2-object-detection","language":null,"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/GiangSon-5.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-01-06T16:17:27.000Z","updated_at":"2025-01-10T14:44:58.000Z","dependencies_parsed_at":"2025-01-10T15:44:07.185Z","dependency_job_id":"eb4eccee-608b-4372-843c-bdf4b6e12860","html_url":"https://github.com/GiangSon-5/Object_Detection_with_YOLOV11","commit_stats":null,"previous_names":["giangson-5/object_detection_with_yolov11"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GiangSon-5/Object_Detection_with_YOLOV11","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GiangSon-5%2FObject_Detection_with_YOLOV11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GiangSon-5%2FObject_Detection_with_YOLOV11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GiangSon-5%2FObject_Detection_with_YOLOV11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GiangSon-5%2FObject_Detection_with_YOLOV11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GiangSon-5","download_url":"https://codeload.github.com/GiangSon-5/Object_Detection_with_YOLOV11/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GiangSon-5%2FObject_Detection_with_YOLOV11/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259857249,"owners_count":22922721,"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":["computer-vision","deep-learning","detection","jupyter-notebook","kaggle","yolo"],"created_at":"2025-01-21T02:12:56.014Z","updated_at":"2026-04-25T11:32:32.914Z","avatar_url":"https://github.com/GiangSon-5.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Overview\n\n# I am using Kaggle's GPU for my project, and here is the link to my project (If you can't access it, it's because I set it to private mode): \n[Kaggle Notebook: Q2: Object Detection](https://www.kaggle.com/code/nguyenquyetgiangson/q2-object-detection)\n\n# DEMO:\n![Demo1](https://github.com/GiangSon-5/Object_Detection_with_YOLOV11/blob/main/images/demo1.jpg)\n\n![Demo2](https://github.com/GiangSon-5/Object_Detection_with_YOLOV11/blob/main/images/demo2.jpg)\n\n![Demo5](https://github.com/GiangSon-5/Object_Detection_with_YOLOV11/blob/main/images/demo5.jpg)\n\n# 1. Steps Taken in the Project\n\nThis project focuses on object detection using YOLOv11 to identify five types of vehicles: Ambulance, Bus, Car, Motorcycle, and Truck. The following steps were performed:\n\n## Data Preparation\n- The dataset was reorganized to match YOLO's required structure.\n- Images and labels were separated into train, valid, and test directories, ensuring compatibility with the YOLO framework.\n\n## Configuration Creation\n- A configuration file (`vehicle_classes_config.yaml`) was created, specifying dataset paths, class names, and the number of classes.\n\n## Model Training\n- The pre-trained YOLOv11 model (`yolo11m.pt`) was fine-tuned on the prepared dataset.\n- Training parameters included 30 epochs, a batch size of 16, and a learning rate of 0.001, with additional optimizations like AdamW optimizer and warmup epochs.\n\n## Evaluation and Prediction\n- The model's performance was assessed using mAP (Mean Average Precision) @ 50 for all classes.\n- Predictions on test samples were visualized with bounding boxes overlayed on the images.\n\n## Model Export\n- The trained model was exported in ONNX format for further deployment or integration.\n\n# 2. Tools and Libraries Used\n\n## Programming Language\n- Python\n\n## Libraries\n- `os`, `shutil`: File and directory management.\n- `matplotlib`: Visualization of prediction results.\n- `ultralytics`: YOLO model training, validation, and prediction.\n\n## Environment\n- Kaggle Notebook, which provides GPU support and integrated dataset handling.\n\n# 3. Overall Performance Metrics\n- **mAP@50**: 0.713\n- **Precision**: 0.693\n- **Recall**: 0.725\n\n### Reasons for Performance\n- **Imbalanced Dataset**: The five labels were not equally represented, leading to better performance on dominant classes like Car and Ambulance while underrepresented classes (Truck, Motorcycle) performed poorly.\n- **High Precision**: Indicates fewer false positives, but the imbalance likely skewed predictions toward majority classes.\n- **Moderate Recall**: Suggests missed detections, likely due to insufficient samples for some classes.\n\n### Suggestions for Improvement\n- Balance the dataset with augmentation or sampling techniques.\n- Use class-weighted loss to mitigate class imbalance.\n\n![Val](https://github.com/GiangSon-5/Object_Detection_with_YOLOV11/blob/main/images/val.jpg)\n\n# 4. Model Evaluation and Improvements\n### Strengths\n- Reliable detection for well-represented classes.\n- Reasonable precision across all classes.\n\n### Limitations\n- Poor performance for underrepresented classes.\n- Struggles with edge cases and occlusions.\n\n### Improvements\n- Augment the dataset to increase diversity and balance.\n- Optimize hyperparameters for better generalization.\n- Test on unseen datasets to evaluate robustness.\n\n# 5. Explanation of Project Files\n\n## Dataset\nOrganized into a directory structure:\n- `/images/train`, `/images/valid`, `/images/test`\n- `/labels/train`, `/labels/valid`, `/labels/test`\n\n## Configuration File (vehicle_classes_config.yaml)\n- Specifies dataset paths, number of classes (`nc=5`), and class names.\n\n## Python Script\n- Handles data preparation, model training, validation, and predictions.\n- Includes code for exporting the model in ONNX format.\n\n## Visualization\n- Results were saved and visualized using Matplotlib.\n\n# 6. YOLOv11 Integration in the Project\n\nThe integration of YOLOv11 followed these steps:\n\n## Model Initialization\n- The pre-trained YOLOv11 weights were loaded using the Ultralytics library.\n\n## Training\n- The model was trained on the provided dataset with fine-tuning to adapt to the specific classes.\n\n## Validation and Export\n- Post-training, the model was validated and exported to ONNX format for deployment.\n\n## Prediction\n- Predictions were run on the test set, and results were visualized with bounding boxes.\n\nThis structured integration of YOLOv11 ensured efficient model training and deployment while maintaining flexibility for further improvements.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiangson-5%2Fobject_detection_with_yolov11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiangson-5%2Fobject_detection_with_yolov11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiangson-5%2Fobject_detection_with_yolov11/lists"}