Real-time detection system with automated mouse control that detects and locks onto targets in milliseconds, reacting faster than human reflexes using YOLO and TensorRT for maximum inference performance.
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 . 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. TensorRT engine files(yolov8_csgo_cs2_model.engine) must be exported locally as they are GPU-specific and optimized for your hardware.
For more project, you can check my personal blog website: https://visionbrick.com/
cs_demo_github.mp4
This project is for educational and research purposes only. It should not be used for malicious intentions. The project only supports Counter-Strike: Global Offensive which is no longer playable online since Counter-Strike 2 was released.
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. TensorRT version is implemented for better performance.
yolov8_csgo_cs2_model.pt- Trained YOLOv8 model weightscsgo_extension.py- Real-time detection and auto-aim demo scriptcsgo_extension_tensorrt.py- TensorRT accelerated demo scriptexport_tensorrt.py- Export PyTorch model to TensorRT engine formatmodel-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 for standard PyTorch versionrequirements-tensorrt.txt- Python dependencies for TensorRT version
Requires Python 3.9+ with PyTorch CUDA support
- Install PyTorch with CUDA support: PyTorch Installation Guide
- Install dependencies:
pip install -r requirements.txt - Run the demo:
python csgo_extension.py - Press 'q' to exit
Requires Python 3.9+ with PyTorch CUDA support and TensorRT
- Install PyTorch with CUDA support: PyTorch Installation Guide
- Install dependencies:
pip install -r requirements-tensorrt.txt - Export model to TensorRT:
python export_tensorrt.py - Run TensorRT demo:
python csgo_extension_tensorrt.py - Press 'q' to exit