ArnieRamesh/CounterStrike-Dataset
Updated • 7.64k • 42
How to use dhaiwat10/cs2-ai with ultralytics:
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
# pick the weights file from this repo's "Files and versions" tab
weights = hf_hub_download("dhaiwat10/cs2-ai", "<weights>.pt")
model = YOLO(weights)
source = 'http://images.cocodataset.org/val2017/000000039769.jpg'
model.predict(source=source, save=True)dhaiwat10/cs2-ai)
Two-stage neural Counter-Strike 2 aim-and-fire agent trained exclusively on ArnieRamesh/CounterStrike-Dataset (CounterStrike-1K), running closed-loop at 60 FPS in CS2 (-insecure offline aim_botz mode).
| File | Architecture | Size | Training Data | Key Metrics |
|---|---|---|---|---|
pose_detector_v2_best.pt |
YOLO11s-pose (1 class player, 1 keypoint: skull/eyes center) |
19.7 MB | 14,000 images (10k real pro frames across 12 masked shards / all 7 CS2 maps + 4k multi-scale 34–245 px copy-paste aim_botz frames with ledge occlusion), 30 epochs, pose=24.0 |
98.01% skull-hitbox hit rate (97.03% on far bots <60 px, 1.08 px median head error), Box mAP50-95 = 0.930, Pose mAP50-95 = 0.995 |
aim_policy_v2_best.pt |
AimFirePolicy (2-layer GRU, hidden_dim=256, seq_len=8) |
3.3 MB | 60,000 pro combat sequences (51,724 engaged: 28k snap, 30.3k moving-target tracking, 26.6k firing + 8.3k negatives across 21 pro matches / 4,394 clips) | yaw_MAE = 0.542° (moving_target = 0.799°), pitch_MAE = 0.189°, 91.04% directional accuracy, 0.897 fire F1 |
pose_detector_v2_best.pt @ 640×384 FP16)
Evaluated on 464 validation frames (1,271 bots) with CS2 skull radius = 0.065 * gt_box_height:
| Bot Distance Stratum | GT | Recall | Head MAE (px) | Median (px) | Skull Hit % | Effective HS % |
|---|---|---|---|---|---|---|
Far (bh < 60 px) |
413 | 97.82% | 1.22 px | 1.08 px | 97.03% | 94.92% |
Mid (60 <= bh < 110 px) |
398 | 100.00% | 1.74 px | 1.38 px | 97.74% | 97.74% |
Close (bh >= 110 px) |
460 | 98.91% | 3.49 px | 2.99 px | 99.12% | 98.04% |
| ALL | 1,271 | 98.90% | 2.21 px | 1.56 px | 98.01% | 96.93% |
aim_botz Performance (720p @ 60 FPS, AK-47 Only)
bot_stop 1): 12 kills / 30s (24.0 kills/min, including 4 headshots in 2.15s), ~11–13 ms fused FP16 CUDA Graph detection on NVIDIA L4.bot_stop 0): 10 kills / 18 taps (55.6% 1-tap efficiency on moving targets) using aim_policy_v2_best.pt + EMA angular velocity lead.git clone https://github.com/Dhaiwat10/cs2-ai.git
cd cs2-ai
hf download dhaiwat10/cs2-ai --local-dir weights
Run offline evaluation or live in CS2 (-insecure offline practice servers only):
python live/play_cs2.py \
--detector weights/pose_detector_v2_best.pt \
--policy weights/aim_policy_v2_best.pt \
--duration 30 --fps 60 --conf 0.24 --head-y-bias 0.055 \
--sector-deg 105 --clamp-sector --sweep-360
Disclaimer: For offline research and bot practice (
-insecure) only. Never run automated input tools on VAC-secured or online servers.