Instructions to use fvossel/csgo-player-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use fvossel/csgo-player-detection with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("fvossel/csgo-player-detection") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +106 -0
- yolo26n_csgo_20260727-231745.onnx +3 -0
- yolo26n_csgo_20260727-231745.pt +3 -0
README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
library_name: ultralytics
|
| 4 |
+
pipeline_tag: object-detection
|
| 5 |
+
tags:
|
| 6 |
+
- yolo
|
| 7 |
+
- yolo26
|
| 8 |
+
- object-detection
|
| 9 |
+
- counter-strike
|
| 10 |
+
- cs2
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# YOLO26 player detection for CS2 — 640x640 native crops
|
| 14 |
+
|
| 15 |
+
Detects player bodies and heads, split by team, on a **640x640 centre crop at
|
| 16 |
+
native resolution**. Trained on [fvossel/csgo-object-detection](https://huggingface.co/datasets/fvossel/csgo-object-detection), plus a small set of images that dataset does not redistribute.
|
| 17 |
+
|
| 18 |
+
> ### ⚠ Intended use
|
| 19 |
+
>
|
| 20 |
+
> This model was trained to study how well a detector performs on a real-time task
|
| 21 |
+
> and what that costs in latency. It is part of a demonstration project, and it is
|
| 22 |
+
> **explicitly not meant to be used for cheating.**
|
| 23 |
+
>
|
| 24 |
+
> Use it offline, against bots, or on your own `-insecure` server. Not on a
|
| 25 |
+
> VAC-secured server, not in matchmaking, not on an account you care about.
|
| 26 |
+
>
|
| 27 |
+
> Pointing a detector at a screen is the easy half. Acting on it is where it falls
|
| 28 |
+
> apart: synthetic mouse input is flagged as injected by the operating system
|
| 29 |
+
> itself, and a system that reacts in milliseconds produces an aim distribution no
|
| 30 |
+
> human produces. Neither is a gap that a more careful implementation closes. The
|
| 31 |
+
> [project repository](https://github.com/fvossel/CSGOAimAssistant) explains this in full and includes the tooling
|
| 32 |
+
> to measure it.
|
| 33 |
+
|
| 34 |
+
## Metrics
|
| 35 |
+
|
| 36 |
+
Measured on a **persistent holdout of 1204 images** that no
|
| 37 |
+
training run has ever seen. The split is block-wise by scene, not per frame — a
|
| 38 |
+
random per-frame split puts near-identical neighbouring frames on both sides and
|
| 39 |
+
inflates the numbers.
|
| 40 |
+
|
| 41 |
+
| | mAP50 | mAP50-95 | Precision | Recall |
|
| 42 |
+
|---|---|---|---|---|
|
| 43 |
+
| overall | 0.905 | 0.727 | 0.937 | 0.840 |
|
| 44 |
+
|
| 45 |
+
| Class | Instances | Precision | Recall | mAP50 | mAP50-95 |
|
| 46 |
+
|---|---|---|---|---|---|
|
| 47 |
+
| `ct_body` | 563 | 0.922 | 0.867 | 0.919 | 0.797 |
|
| 48 |
+
| `ct_head` | 511 | 0.930 | 0.831 | 0.888 | 0.608 |
|
| 49 |
+
| `t_body` | 677 | 0.930 | 0.833 | 0.908 | 0.784 |
|
| 50 |
+
| `t_head` | 634 | 0.967 | 0.828 | 0.906 | 0.718 |
|
| 51 |
+
|
| 52 |
+
Class `none` (ID 0) is an empty placeholder kept so the IDs stay stable.
|
| 53 |
+
|
| 54 |
+
Inference 3.9 ms per image at the reported batch size,
|
| 55 |
+
on the training machine.
|
| 56 |
+
|
| 57 |
+
## Usage
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
from ultralytics import YOLO
|
| 61 |
+
|
| 62 |
+
model = YOLO("yolo26n_csgo_20260727-231745.pt")
|
| 63 |
+
results = model.predict("crop.png", conf=0.25, iou=0.5)
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
**Feed it a 640x640 centre crop cut at native resolution, not a resized
|
| 67 |
+
screenshot.** A 1920x1080 frame scaled down to 640 shrinks a head from roughly
|
| 68 |
+
13x17 px to 4x6 px, which is not the scale this model was trained on. This is the
|
| 69 |
+
single most common way to get bad results out of it.
|
| 70 |
+
|
| 71 |
+
## Training
|
| 72 |
+
|
| 73 |
+
| | |
|
| 74 |
+
|---|---|
|
| 75 |
+
| Base weight | `yolo26n.pt` |
|
| 76 |
+
| Epochs | 150 |
|
| 77 |
+
| Batch | 32 |
|
| 78 |
+
| Image size | 640 |
|
| 79 |
+
| Optimizer | auto, cosine LR |
|
| 80 |
+
| Mosaic | 1.0, closed for the last 15 epochs |
|
| 81 |
+
|
| 82 |
+
Augmentation is deliberately conservative: no rotation, no vertical flip, limited
|
| 83 |
+
hue and scale. The game renders a fixed, upright world — augmenting it into poses
|
| 84 |
+
that cannot occur costs capacity without buying robustness.
|
| 85 |
+
|
| 86 |
+
Only images **confirmed by hand** were trained on. The labelling loop pre-annotates
|
| 87 |
+
with a larger model and then confirms or corrects each image; unchecked model
|
| 88 |
+
output never reaches training.
|
| 89 |
+
|
| 90 |
+
## Files
|
| 91 |
+
|
| 92 |
+
* `yolo26n_csgo_20260727-231745.pt` — PyTorch weight, the one to use
|
| 93 |
+
* `yolo26n_csgo_20260727-231745.onnx` — portable ONNX export
|
| 94 |
+
|
| 95 |
+
No TensorRT engine is published. An `.engine` is tied to the exact GPU, driver and
|
| 96 |
+
TensorRT version it was built on. Build your own:
|
| 97 |
+
|
| 98 |
+
```bash
|
| 99 |
+
python scripts/export.py --weights yolo26n_csgo_20260727-231745.pt --format engine
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
## Licence
|
| 103 |
+
|
| 104 |
+
The training images show Counter-Strike 2 and are derivative of Valve's assets.
|
| 105 |
+
The weights are published for research. Check whether your intended use is covered
|
| 106 |
+
before building on this.
|
yolo26n_csgo_20260727-231745.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02280f5844eded6d42b8631abe16369bc8cffb0dcba935ecd69cccf737c219a9
|
| 3 |
+
size 9807900
|
yolo26n_csgo_20260727-231745.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e96daa887a67af2d976f1918323eae9c05d39fd878da0dbb5d50c1a11f8c97d
|
| 3 |
+
size 5410821
|