--- license: apache-2.0 tags: - computer-vision - object-detection - segmentation - yolov8 - soccer - sports-analytics datasets: - roboflow-universe-projects/soccer-players-ckbru --- # Soccer Player Segmentation (YOLOv8n-seg) Instance segmentation model for detecting and segmenting soccer players in match footage. Perfomance ![media_images_segmentation_results_1_cc2f7ba99917fe599e2f](https://cdn-uploads.huggingface.co/production/uploads/695e701164a518e0880191f5/KtdyEPgnunQsc8VHpGCYy.png) ## Model Details - **Model type:** YOLOv8n-seg (instance segmentation) - **Base model:** ultralytics/yolov8n-seg - **Developed by:** lifatsastain - **License:** Apache 2.0 - **Training compute:** Kaggle Tesla T4 ## Dataset - **Source:** FIFA World Cup Qatar 2022 — USA vs Netherlands (Dec 3, 2022) - **Images:** 150 frames extracted from match footage - **Classes:** Ball, Player, Ref - **Annotations:** Bounding boxes converted to segmentation masks using SAM (Segment Anything Model) - **Split:** 103 train / 28 valid / 19 test ## Training - **Epochs:** 100 - **Image size:** 640 - **Batch size:** 16 - **Optimizer:** AdamW - **Experiment tracking:** W&B - The chart ![media_images_training_curves_0_035a970c5f0eb4a3b9ff](https://cdn-uploads.huggingface.co/production/uploads/695e701164a518e0880191f5/dPQBSCdMQdmqGlNtgvrkW.png) ## Evaluation Results | Metric | Score | |--------|-------| | Box mAP50 | 0.919 | | Box mAP50-95 | 0.725 | | Mask mAP50 | 0.917 | | Mask mAP50-95 | 0.539 | | Precision | 0.945 | | Recall | 0.886 | ## How to Use ```python from ultralytics import YOLO model = YOLO("lifatsastain/soccer-player-segmentation") results = model("your_image.jpg") results[0].show()