This project aims to detect enemy players inside the game in real-time and point the player’s aim directly to the enemy’s head to fire the weapon. I collected the dataset inside the game by taking screenshots from time to time while playing. After collecting images, annotation was done with LabelImg. You can find the dataset on my Kaggle page, link: https://www.kaggle.com/datasets/merfarukgnaydn/counter-strike-2-body-and-head-classification
The dataset is small for now, but the results are really good. Lots of people gave me feedback about the data quality, and they were all positive because the images are from the game, not from real life. Therefore, there aren’t any differences in environments, there aren’t any sharp lighting changes between images, or shape differences in objects. The `yolov8_csgo_cs2_model.pt` file uses the YOLOv8 nano model as its pretrained backbone for this project.
For more project, you can check my personal blog website: https://visionbrick.com/
cs_demo_github.mp4
there is no Raw input and Mouse acceleration options in cs2 , therefore even models can detect players without problem in cs2 there is problem with mouse movements . As soon as they add this setting options to CS2 , this will work without problem for sure
yolov8_csgo_cs2_model.pt
- Trained YOLOv8 model weightsYolov8_cs2_csgo_demo.py
- Real-time detection and auto-aim demo scriptmodel-training.ipynb
- Training notebook with model training processmodel-results/
- Training results and model evaluation metricstest_images/
- Sample test images for demonstrationconfiguration_files/
- YAML configuration files for trainingrequirements.txt
- Python dependencies with exact versions
- Install PyTorch with CUDA support for optimal performance: PyTorch Installation Guide
- Install dependencies:
pip install -r requirements.txt
- Run the demo:
python Yolov8_cs2_csgo_demo.py
- Press 'q' to exit