All Projects → IgaoGuru → Sequoia

IgaoGuru / Sequoia

Licence: GPL-3.0 license
A neural network for CounterStrike:GlobalOffensive character detection and classification. Built on a custom-made dataset (csgo-data-collector)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sequoia

Java-Memory-Manipulation
User friendly, Garbage-free, and cross-platform process, module and memory interfacing via the power of Java
Stars: ✭ 51 (-15%)
Mutual labels:  counter-strike, csgo, counterstrike
CSGO-Translator
Simple C# CSGO chat translator
Stars: ✭ 35 (-41.67%)
Mutual labels:  counter-strike, csgo, counterstrike
valve-matchmaking-ip-ranges
Lists of locations & IP addresses of Valve servers
Stars: ✭ 69 (+15%)
Mutual labels:  counter-strike, csgo
Garhal csgo
A project that demonstrates how to screw with CSGO from Kernel Space. (CSGO Kernel Cheat/Hack) All cleaned up, and with updated offsets.
Stars: ✭ 179 (+198.33%)
Mutual labels:  counter-strike, csgo
CSGOItemDB
An API to retrieve accurate CS:GO prices for high- and low-tier items
Stars: ✭ 35 (-41.67%)
Mutual labels:  counter-strike, csgo
Osiris
Free open-source game cheat for Counter-Strike: Global Offensive, written in modern C++. GUI powered by Dear ImGui.
Stars: ✭ 1,851 (+2985%)
Mutual labels:  counter-strike, csgo
Aristois Legit
Full project files for aristois, Counter-Strike: Global Offensive cheat.
Stars: ✭ 110 (+83.33%)
Mutual labels:  counter-strike, csgo
Csgo Multi 1v1
CS:GO Sourcemod plugin to create multi-1v1 arena servers
Stars: ✭ 230 (+283.33%)
Mutual labels:  counter-strike, csgo
Little Anti Cheat
Anti-Cheat for Source Games
Stars: ✭ 77 (+28.33%)
Mutual labels:  counter-strike, csgo
Vac Bypass
Valve Anti-Cheat bypass written in C.
Stars: ✭ 241 (+301.67%)
Mutual labels:  counter-strike, csgo
Ratpoison
Latest Ver: 1.7; Default Menu Key is F1; Charlatano's Successor; dn
Stars: ✭ 239 (+298.33%)
Mutual labels:  counter-strike, csgo
CounterStrike-GlobalOffensive-LiveStat-for-OBS-Studio
Showing you LIVEstats of CS:GO in your Stream like OBS-Studio while playing/streaming.
Stars: ✭ 24 (-60%)
Mutual labels:  csgo, counterstrike
Node Globaloffensive
A Node.js module to connect to and interact with the CS:GO game coordinator. Mostly used to get item data.
Stars: ✭ 96 (+60%)
Mutual labels:  counter-strike, csgo
Csgoverview
A 2D demo replay tool for Counter Strike: Global Offensive.
Stars: ✭ 88 (+46.67%)
Mutual labels:  counter-strike, csgo
Headshotbox
Stars: ✭ 155 (+158.33%)
Mutual labels:  counter-strike, csgo
Anubis
Free open-source training software / cheat for Counter-Strike: Global Offensive, written in C.
Stars: ✭ 81 (+35%)
Mutual labels:  counter-strike, csgo
Goesp
Cross-platform streamproof ESP hack for Counter-Strike: Global Offensive, written in modern C++. Rendering and GUI powered by Dear ImGui.
Stars: ✭ 210 (+250%)
Mutual labels:  counter-strike, csgo
pengWin
An external cheat for the Linux version of Counter-Strike Global Offensive
Stars: ✭ 28 (-53.33%)
Mutual labels:  counter-strike, csgo
Yuki.cfg
csgo config
Stars: ✭ 45 (-25%)
Mutual labels:  counter-strike, csgo
Xena
Lightweight, lighting-fast Java Based Cross-Platform CSGO Cheat
Stars: ✭ 69 (+15%)
Mutual labels:  counter-strike, csgo

Sample Gif

Sequoia - a CS:GO AI detection bot.

C++ CS:GO Windows x86 License
Windows

A neural network for CounterStrike:GlobalOffensive character detection and classification. Built on a custom-made dataset, powered by the csgo-data-collector software. This project was developed by me, mentored by Paulo Abelha.

The project incorporates a fine-tuned version of Ultralitic's YOLOv5, while also using a secondary helper-NN for aiding in the classification task.
After inference, the bounding boxes are processed by the yolo_inference.py file, and the mouse movement is calculated based on the distance from the crosshair (aim) to the enemy's location.

DISCLAIMER: This software was developed with the intention of only being used in private matches, as a proof of concept, causing no harm to other player's experiences. If you wish to cheat in online matches, be aware that there are many other much more practical and efficient ways of doing so.

Prerequisites

  • Python 3.8.x with additional libraries

    list of required libraries:

    ahk>=0.11.1 Cython matplotlib>=3.2.2 mss>=6.1.0 numpy>=1.18.5 opencv-python>=4.1.2 pandas>=1.1.5 pillow PyYAML>=5.3 scipy>=1.4.1 tensorboard>=2.2 torch>=1.6.0 torchvision>=0.7.0 tqdm>=4.41.0

    After installing python, you can install all the necessary libraries with the following command: pip install -r requirements.txt

  • strongly recommended: CUDA Toolkit 10.2: CUDA is Nvidia's framework for high performance GPU computing. This software uses it to run the AI inside the GPU, instead of relying on the CPU, which is much slower. This means you need an Nvidia GPU to get the best possible performance out of the software.

Neural Network Structure

I've drawn this sketch/diagram to illustrate the high-level structure of the AI. First, the screenshot is taken from the detect.py file. After being reshaped into the appropriate dimensions (1, 3, 512, 512), it first goes into the fine-tuned YOLO v.5. After YOLO's processing, the 512x512 image is cropped using the coordinates given by the first NN. From there, the cropped image is resized into a 32x32 image enclosing only the player to be classified. The second NN (Light_Classifier) then returns the final classification results, and the coordinates from YOLO are combined with Light's classification to form the final, complete output.

This slightly more professional-looking diagram illustrates the architecture of the Light_Classifier. The input is a 32x32 image that encloses the player to be classified. It then passes through three convolutional blocks, each containing a 2d convolutional layer, followed by 2d Batch Normalization and a reLU function. In these three blocks, the network "decomposes" the original image into many smaller matrices that represent learned features of the original frame. These could be edges, colors, shapes and dimensions that the NN finds to be important for the task. The outputs of the last convolutional block are then flattened into a one dimensional array, and fed through a sequence of three linear layers, which will "condense" the information grasped by the convolutions into a single digit at the end, representing the acessed probability that the image analyzed is a CounterTerrorist (in this case, if the probability is < 50%, the NN believes the character to be a Terrorist).

Setting up for inference

If you want to test out the model, you can do so using the detect.py file.

The default resolution for the game is 1280x720, but you can change that by adding the "-x" and "-y" flags, then specifying the desired resolution by its x (e.g. 1280) and y (e.g. 720) components. Remember to always keep your game in the top-left corner of your monitor If you notice that the window's window bar is getting captured in the screenshot, you can change the y_offset of the capture by specifying the height of you window bar in pixels with the "-off" flag.

YOLO's and Light's pretrained weights

YOLO was trained on Google Cloud's compute engine with a 12gb Tesla K80. The dataset contained approximately 60k images, and training took 15 epochs. The YOLOv5-S pretrained model was used as the basis for finetuning.

Light was trained on my local computer, with a 3gb gtx 1060. The dataset contained approximately 60k images (same as YOLO's), and training took 25 epochs. The network was randomly initialized with seed 42.

If you leave the -w and -wl flags on detect.py empty, the standard weights will be loaded

using the auto-shooting mechanic [WIP]

By default, auto-shooting is disabled because it is still in development, it's very slow and laggy at the moment. On the other hand, it's functional, so you might want to toggle it using the "-shoot 1" argument. This function has not been tested on other resolutions other than 1280x720, and if you know of a library/method that will emulate mouse movement faster than AHK, please reach me so I can implement it on the project.

Training on custom data

Obtaining data

You will need a lot of data in order to fine-tune these models. Luckily, I've already taken care of that for you. You can use my CS:GO Data-Collector program. Everything about the dataset construction can be found in its own documentation.

Training YOLOv5 and applying weights

If you wish to train YOLOv5 on your own dataset, you can follow Ultralytics own tutorial.

After obtaining your custom weights, you can specify the path to them with the "-w [insert path here]" argument when running detect.py.

Training Light_Classifier and applying weights

The Light_Classifier takes advantage of the csgo-data dataset for training. After obtaining a dataset, you can specify its root path with the argument "-rp [path]" when calling the light_classifier_train.py file.

You can run light_classifier_train.py -h to get a list of all the variables you may want to configure, and its respective flags - such as batch_size, dataset length, number of epochs, learning rate and others.

Acknowledgments

License

Copyright (c) 2020-2021 Igor Rocha

This project is licensed under the GPL 3.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].