rfdetr-basketball-player-ball-referee-detection
This model is a fine-tuned version of Roboflow/rf-detr-nano on an labeled basketball object detection dataset from Roboflow.
- Roboflow Dataset - https://universe.roboflow.com/roboflow-jvuqo/basketball-player-detection-3-ycjdo/dataset/18
- Same Dataset as above but exported to HF - https://huggingface.co/datasets/koppolusameer/basketball-coco-20260416
It achieves the following results on the evaluation set:
- Loss: 11.6183
- Map: 0.4681
- Map 50: 0.7416
- Map 75: 0.5072
- Map Small: 0.3566
- Map Medium: 0.6316
- Map Large: -1.0
- Mar 1: 0.1966
- Mar 10: 0.5356
- Mar 100: 0.5675
- Mar Small: 0.4527
- Mar Medium: 0.7196
- Mar Large: -1.0
- Map Ball: 0.1805
- Map Player: 0.6228
- Map Referee: 0.601
Model description
The model is the RF-DETR Nano Model (https://huggingface.co/Roboflow/rf-detr-seg-nano).
Intended uses & limitations
Model is finetuned to detect players, ball, and referee in basketball broadcast images. Below are a few limitations
- The ball is only a few pixels in size and often gets mixed with the background and confuses the model (as described by mAP results)
- Images are mostly from Celtics games and hence there may be a lack of training data diversity
Training and evaluation data
- Train, Validation, and Test Splits can be found here - https://huggingface.co/datasets/koppolusameer/basketball-coco-20260416
Training procedure
- Model was trained for 10 epochs and with the same train, valid, and test split as in the dataset
- Training data was randomly augmented before finalizing the train set, where the augmentations done on an image could include at least one of
- Horizontal flipping
- Brightness and Contrast changes
- Saturation changes
- Blurring
- Shifting, scaling, and Rotation
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- num_epochs: 10
Training results
| Training Loss | Epoch | Step | Validation Loss | Map | Map 50 | Map 75 | Map Small | Map Medium | Map Large | Mar 1 | Mar 10 | Mar 100 | Mar Small | Mar Medium | Mar Large | Map Ball | Map Player | Map Referee |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4.9143 | 1.0 | 232 | 11.3188 | 0.221 | 0.3977 | 0.2326 | 0.1807 | 0.317 | -1.0 | 0.0915 | 0.3439 | 0.4561 | 0.3219 | 0.6726 | -1.0 | 0.0166 | 0.3983 | 0.2481 |
| 4.1871 | 2.0 | 464 | 11.5311 | 0.3467 | 0.5833 | 0.3742 | 0.2284 | 0.5233 | -1.0 | 0.1525 | 0.4523 | 0.5193 | 0.402 | 0.6907 | -1.0 | 0.0432 | 0.5413 | 0.4554 |
| 3.7004 | 3.0 | 696 | 11.2214 | 0.4064 | 0.6534 | 0.4668 | 0.2884 | 0.5955 | -1.0 | 0.1653 | 0.4926 | 0.535 | 0.4149 | 0.7117 | -1.0 | 0.0735 | 0.5826 | 0.563 |
| 3.4266 | 4.0 | 928 | 11.3612 | 0.4511 | 0.7327 | 0.488 | 0.3365 | 0.6067 | -1.0 | 0.1886 | 0.5089 | 0.5451 | 0.433 | 0.7104 | -1.0 | 0.1793 | 0.5947 | 0.5794 |
| 3.3002 | 5.0 | 1160 | 11.2677 | 0.4597 | 0.7457 | 0.4972 | 0.3427 | 0.6219 | -1.0 | 0.1866 | 0.5172 | 0.5519 | 0.434 | 0.7134 | -1.0 | 0.1826 | 0.6046 | 0.5919 |
| 2.9916 | 6.0 | 1392 | 11.5505 | 0.4492 | 0.7071 | 0.4981 | 0.3362 | 0.6311 | -1.0 | 0.1911 | 0.5406 | 0.5701 | 0.4528 | 0.7196 | -1.0 | 0.1264 | 0.6157 | 0.6054 |
| 2.7823 | 7.0 | 1624 | 11.5764 | 0.4681 | 0.7337 | 0.5075 | 0.3546 | 0.633 | -1.0 | 0.2004 | 0.5324 | 0.5656 | 0.454 | 0.7156 | -1.0 | 0.1862 | 0.6179 | 0.6001 |
| 2.5629 | 8.0 | 1856 | 11.5485 | 0.4656 | 0.7418 | 0.4926 | 0.3517 | 0.6307 | -1.0 | 0.1959 | 0.529 | 0.5654 | 0.458 | 0.7161 | -1.0 | 0.1816 | 0.623 | 0.5922 |
| 2.3530 | 9.0 | 2088 | 11.6103 | 0.4706 | 0.7454 | 0.5214 | 0.3597 | 0.6312 | -1.0 | 0.1988 | 0.5365 | 0.5687 | 0.4544 | 0.7186 | -1.0 | 0.1886 | 0.6206 | 0.6025 |
| 2.7561 | 10.0 | 2320 | 11.6182 | 0.4674 | 0.7415 | 0.5058 | 0.3555 | 0.6313 | -1.0 | 0.1971 | 0.5356 | 0.5676 | 0.4527 | 0.7197 | -1.0 | 0.1794 | 0.6213 | 0.6015 |
Framework versions
- Transformers 5.10.2
- Pytorch 2.11.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2