Git Product home page Git Product logo

pine's Introduction

Pine

Pine is an aimbot powered by real-time object detection with neural networks.

This software can be tweaked to work smoothly in CS:GO, Fortnite, and Overwatch. Pine also has built-in support for Nvidia's CUDA toolkit and is optimized to achieve extremely high object-detection FPS. It is GPU accelerated and blazingly fast.

Demo

Demo video

Pine Demo GIF=

Installation

  • Install OpenCV with Python3 bindings
  • Install any missing dependencies with Pip
  • Install pywin32, the Windows API bindings for Python.
  • Install the Nvidia CUDA toolkit if you have a compatible GPU
    • If you don't have an Nvidia GPU, Pine will try to use OpenCL instead of CUDA
  • Also for acurate long Quick Mouse Movements please Disable Mouse acceleration. Thanks!
  • Then run the program with Python3.

$ python3 pine.py

What games does it work with?

This release is currently optimized for CS:GO, but I plan adding more game configs in the future

Why Neural Networks?

Well, neural network aimbots are great for a lot of reasons... Probably most importantly, they never access the memory of the game, so they are practically invisible to "Anti-Cheat" sofware. Additionally, they can abstract their capabilities to many different games without code modifications. The only issue:

Neural Network Aimbots have always had one big problem: their target detection is okay, but their inference time is terrible. Even HAAR Cascades are a bad fit, since they have decent speed but horrible accuracy. MobileNetSSD and Faster R-CNN were sorta ok if you had a Nvidia Titan X with CUDA drivers. But let's be honest, who the hell can afford a Titan?

Enter YOLOv3, tiny edition. Detection scores are decent, and inference times are... WHAT? 220 FPS WITH A 33% mAP?! For reference of how absolutely insane this is, SSD513 gets about 8 FPS with 50% mAP.

YOLO Network Speed Graph

Finally, a real-time object-detection network that will run on my dinky AMD M370X from 2015! This network is what inspired me to build Pine.

Architecture

YOLOv3: The Internal Object-Detection Engine

At its core, Pine's internal object detection system relies on a modified version of the YOLOv3 neural network architecture. The detection network is trained on a combination of video game images and the COCO dataset. It is optimized to recognize human-like objects as quickly as possible. The detection engine can be abstracted to many FPS games, including CS:GO, TF2, and more.

YOLO Neural Network

OpenCV: GPU-Enabled Image Processing

OpenCV is at the heart of Pine's image processing capabilities. Not only does it provide an abstraction layer for working with the screen capture data, but it it also allows us to harness the power of GPU hardware by interfacing CUDA and OpenCL. After Pine takes a capture of the user's screen, it uses OpenCV to process that image into a form that is recognizable to the object-detection engine.

OpenCV Image Processing Architecture

Special Thanks

Thanks to everyone who made this project possible. I'd like to give special shoutouts to the following people:

  • FidgetySo for his contributions to the codebase. He leveraged native Windows APIs to improve the performance of Pine by up to 300%.
  • Adrian Rosebrock, PhD, for his invaluable resources on machine learning. Check out his blog: PyImageSearch

pine's People

Contributors

petercunha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pine's Issues

Problem sir

Hi What button should I use to take a picture from the screen?

I cannot convert to .EXE

When I try to convert it to .exe using pyinstaller I get this error ''ImportError : failed to execute script'' How can I solve this?

Slowly moves to target

Hello,
first of all great job. The project works perfectly. I am new to programming and find all this really amazing. I used this for cod warzone and it works. The only issue i have is that when it acquires the target it moves very slowly towards the target. While i am in lobby the program instantly locks on the operator i have chosen but in game it seems like it moves 2 pixels at a time. Again thank you for your time. Great project.

Aims to the ground in Apex

Ive seen a fix to disable raw input in games where this bug occurs but there is no option in apex. Any solutions to this? Has anyone worked on using relative positions instead of abs?

Program won't open.

I've downloaded everything that was asked in the README file, followed every step, but for some reason the program wouldn't load whenever I try opening it with Python. I mean, it does show a cmd for a second and then just shuts immediatly afterwards.
Does any program need to be on while I activate the cheat?
Thanks in advance.
Edit: I'm pretty sure I'm not installing something correctly. Does anyone have a video of him/someone else installing all of these things required? All of the videos that I've found do different things, I've literally done all of them and still can't get the program running.
Do I need all of these extra programs like CMake and everything to install this?
Thanks again and sorry for being dumb lmao.

making a hotkey

can i add a hotkey to the aimbot? if so please tell me how thanks!

Improvements :)

  • Use of YOLOV5 for improved performance
  • Fix the Cuda disabled issue I know its bug because it was actually using cuda
  • add a little random movements so it isnt a deadlock
  • Someway to pause it.
  • General training, allow the community to help.
  • overlay on the screen boxes
  • Add a donation link for people to donate mate you earned it!

Can can I retrain this for another game?

I have a huge data set of pictures and the weights from another YOLOV3 aimbot but when I try to replace the ones in here the python script gets a ton of errors.

Just a note

Based on a similar project I'm working on, I think you're mistaken about a number of things here (or maybe I am which would be great). With yolov3 tiny, I'm getting at best 7ms a frame and that's on a video. I think most implementations batch frames to achieve this. For real time inference, you're sending single frames captured in real time. I think I see something closer to 12-14ms in this case. All this is with a GTX 1080. I'd be interested to know what repo (if at all) you're basing your work on to get the claimed results.

Then as an aside, most repos seem to function slower on Windows by about 5x. Tensor flow or pytorch. Which means it could be a matter of opencv or numpy etc causing issues

I cant open pine.py

when i put "pip install win32gui" in the cmd running in the main directory it come with this error

ERROR: Command errored out with exit status 1:
command: 'C:\Users\admin\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\admin\AppData\Local\Temp\tmp1amgpa5u'
cwd: C:\Users\admin\AppData\Local\Temp\pip-install-usxzf9wp\win32gui
Complete output (20 lines):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_vendor\pep517_in_process.py", line 207, in
main()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_vendor\pep517_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_vendor\pep517_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\admin\AppData\Local\Temp\pip-build-env-jufqitua\overlay\Lib\site-packages\setuptools\build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\admin\AppData\Local\Temp\pip-build-env-jufqitua\overlay\Lib\site-packages\setuptools\build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "C:\Users\admin\AppData\Local\Temp\pip-build-env-jufqitua\overlay\Lib\site-packages\setuptools\build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\admin\AppData\Local\Temp\pip-build-env-jufqitua\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 27, in
from win32.distutils.gui import win32gui_build_ext
File "C:\Users\admin\AppData\Local\Temp\pip-install-usxzf9wp\win32gui\win32\distutils\gui.py", line 6, in
from .command import win32_build_ext
ModuleNotFoundError: No module named 'win32.distutils.command'

ERROR: Command errored out with exit status 1: 'C:\Users\admin\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1008.0_x64__qbz5n2kfra8p0\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\admin\AppData\Local\Temp\tmp1amgpa5u' Check the logs for full command output.

someone help i have been stuck on this for a while

How do I build OpenCV with CUDA?

When I build OpenCV and while it's building it says "CUDA: YES" but I am not sure if CUDA is built properly. I followed a couple of tutorials but it's always the same. Also I don't get a cv2.pyd like other people do so I'm not sure how to even import it into python.
My OS is Windows 10..

Aims at ground

I tried this hack in apex and it works on the menu (aims to the selected character) but it will aim to the ground when targeting a player. Do i have to retrain it? If so how do I go about that? I'm new to this kind of thing.

Mouse moves downwards

Hi,

As soon an object is detected, the mouse is instantly moved downwards, such that the model is staring at the ground.

In some fps, pine resets the set_pos(x, y)

Hi there,

First of all great job. Im studying the project for research analysis also.
FYI in some fps (apex, Pubg), pine seems to work on main menu (autoaims main character selected) but aiming seems to reset to the ground in-game, when cursor comes across an enemy.

If I would take a guess, I would say that object detection returns null coordinates (?) and maybe give no input to said function. Didnt check code or input received, just brainstorming.

G

Error

I try to get this to work on windows since some time now but i cant handle this error

File "C:\Windows\system32\lib\pine.py", line 14, in
from lib.grab import grab_screen
ModuleNotFoundError: No module named 'lib.grab'

i already installed grab_screen via pip

Cursos Issue

whenever it detects an enemy it just aims straight down at my feet.

IndexError: invalid index to scalar variable.

\OneDrive\Desktop\Pine-master\lib\pine.py", line 95, in start
ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
File "C:\Users\banni\OneDrive\Desktop\Pine-master\lib\pine.py", line 95, in
ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.

i cant install opencv-python-4.6.0.66 it gives me errors so that might be the issue

using
async-generator 1.10
attrs 21.4.0
certifi 2022.5.18.1
cffi 1.15.0
charset-normalizer 2.0.12
cryptography 37.0.2
fake-useragent 0.1.11
h11 0.13.0
idna 3.3
imutils 0.5.4
mss 6.1.0
numpy 1.22.4
opencv-python 4.6.0.66
outcome 1.1.0
pip 21.2.4
playsound 1.3.0
pycparser 2.21
pynput 1.7.6
pyOpenSSL 22.0.0
PySocks 1.7.1
python-dotenv 0.20.0
pywin32 304
requests 2.28.0
selenium 4.2.0
setuptools 58.1.0
six 1.16.0
sniffio 1.2.0
sortedcontainers 2.4.0
termcolor 1.1.0
trio 0.21.0
trio-websocket 0.9.2
urllib3 1.26.9
webdriver-manager 3.7.0
wsproto 1.1.0

How do I train this for Fortnite myself.

This works on csgo but I was wondering how to train and config for fortnite myself. Does It auto train, Like I just need to keep playing, I cant find any updated/train files but I would love to make some. Also You say it is for fortnite but it Doesnt work.

Only moves cursor?

is it right that it only moves the cursor? As it wasnt sending input to any actual games.

Else nice job. Is it just trainend with csgo models?

I got a little bug

Traceback (most recent call last):
File "C:\Users\test\Desktop\Pine-master\Pine-master\pine.py", line 13, in
pine.start(ENABLE_AIMBOT=True)
File "C:\Users\test\Desktop\Pine-master\Pine-master\lib\pine.py", line 77, in start
print(colored("[OKAY] Aimbot enabled!", "green"))
TypeError: 'module' object is not callable

how i can fix this problem ?

Import error

Going through the dependencies i can't get past this one:

import win32gui, win32ui, win32con, win32api
ImportError: DLL load failed: The specified module could not be found.

Any ideas?

Very low fps

Hey, my fps it at 30 and it says cuda disabled for some reason, i installed cuda toolkit and everything, cudnn and all that. also it aims to the right foot the whole time for some reason

Only 40fps?

Currently using a Titan V and a i9 10850k 64gb ram and getting very low fps, i rebuilt opencv with cuda and still no luck. any ideas?

Can't find labels path

I'm unable to run the program due to it not being able to find the labels. Am I missing something

====================================
Pine: Neural-Network Aimbot (v0.1)

[INFO] press '0' to quit or ctrl+C in console...
Traceback (most recent call last):
File "C:\Users\User\Documents\Pine-master\pine.py", line 14, in
pine.start(ENABLE_AIMBOT=True)
File "C:\Users\User\Documents\Pine-master\lib\pine.py", line 74, in start
LABELS = open(labelsPath).read().strip().split("\n")
FileNotFoundError: [Errno 2] No such file or directory: '\models\coco-dataset.labels'
[Finished in 0.405s]

Train for COD Warzone

Hi!

Anyone can tell me how to train It? (For warzone or other Game)

And if anyone have trained files for warzone would be nice.

Sorry for my English, greetings from Spain.

Training for CoD cold war

Hey! Its working kinda ok in cod cw but I'd like to train it more properly. Any suggestions how to begin?

How to use Yolov3

I'm trying to use Yolov3 instead of Yolov3-tiny. I downloaded the yolov3.cfg and the yolov3.weights from https://github.com/AlexeyAB/darknet and changed the weights and the config Path

weightsPath = os.path.sep.join([YOLO_DIRECTORY, "yolov3.weights"])
configPath = os.path.sep.join([YOLO_DIRECTORY, "yolov3.cfg"])

But I get this Traceback:

Traceback (most recent call last):
  File "C:/Users/Simp/PycharmProjects/Bots/Cheat/PineCopy/pine.py", line 14, in <module>
    pine.start(aimbot=True, show=True)
  File "C:\Users\Simp\PycharmProjects\Bots\Cheat\PineCopy\lib\pine.py", line 245, in start
    layerOutputs = net.forward(ln)
cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\dnn\src\layers\concat_layer.cpp:95: error: (-201:Incorrect size of input array) Inconsistent shape for ConcatLayer in function 'cv::dnn::ConcatLayerImpl::getMemoryShapes'

I would be very happy if someone could suggest a solution.

About maximum FPS

I have turned on CUDA acceleration. but still can only get about 30FPS (15FPS when I use the CPU). My graphics card is 3050ti. I observe that the GPU does not Full load, is this normal?
What is the maximum FPS that can be achieved?
If I want to increase FPS and improve my performance in the game, what should I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.