This commit is contained in:
Elijah Harmon 2022-09-02 16:31:07 -04:00
commit 18578d12fb
3 changed files with 14 additions and 7 deletions

View File

@ -80,13 +80,15 @@ The guide below starting with *Pre-Setup** will get the `main.py` version runnin
If you are comfortable with your skills, you can run the other 4 versions. You can also get AMD GPUs running the bot using the onnx version. This is advance stuff. **If you are not advance, skip to pre-setup below.** Python 3.9 is recommened if you are going to continue due to packages compatibility issues.
**EXPECT LITTLE TO NO HELP FROM STAFF IN REGARDS TO ANY OF THE ADVANCE SET UP UNLESS YOU ARE A PATREON MEMBER.** This includes openning issues. If you are opening an issue, give full content including but not limited to OS, GPU, RAM, Toolkit version, cuDNN version, tensorRT version, etc.
`main_torch_gpu.py` will be the easiest to get running. You just need to install pip install `cupy` based on your CUDA Toolkti version. This can give up to a 10% performance boost.
`main_onnx_cpu.py` is for those of you who don't have a nvidia CPU. It will be optimized for CPU based compute. You need to `pip install onnxruntime`.
`main_onnx_gpu.py` will give you up to a 100% performance boost. You will need to pip install `onnxruntime` specific for your GPU and toolkit version. An AMD GPU compatible version of `onnxruntime` is available for linux users only right now.
`main_tensorrt_gpu.py` is the BEST. It gives over a 200% performance boost. In our testing, the screenshot engine was the bottleneck. Tensorrt is only available via download from NVIDIA's site. You will need to make an account. Just go to this link and get `TensorRT 8.4 GA`. https://developer.nvidia.com/tensorrt You will need to install it via the .whl file they give you.
`main_tensorrt_gpu.py` is the BEST. It gives over a 200% performance boost. In our testing, the screenshot engine was the bottleneck. Tensorrt is only available via download from NVIDIA's site. You will need to make an account. Just go to this link and get `TensorRT 8.4 GA`. https://developer.nvidia.com/tensorrt You will need to install it via the .whl file they give you. You may also need https://developer.nvidia.com/cudnn.
### REQUIREMENTS
- Nvidia RTX 2050 or higher

View File

@ -12,7 +12,7 @@ from utils.general import (LOGGER, check_file, check_img_size, check_imshow, che
import dxcam
def main():
# Window title to go after and the height of the screenshots
# Window title of the game, don't need the entire name
videoGameWindowTitle = "Counter"
# Portion of screen to be captured (This forms a square/rectangle around the center of screen)

View File

@ -97,6 +97,11 @@ def main():
im = cp.moveaxis(npImg, 3, 1)
im = torch.from_numpy(cp.asnumpy(im)).to('cuda')
#Converting to numpy for visuals
im0 = im[0].permute(1, 2, 0) * 255
im0 = im0.cpu().numpy().astype(np.uint8)
im0 = cv2.cvtColor(im0, cv2.COLOR_RGB2BGR) #Image has to be in BGR for visualization
# Detecting all the objects
results = model(im)
@ -159,10 +164,10 @@ def main():
idx = 0
# draw the bounding box and label on the frame
label = "{}: {:.2f}%".format("Human", confidence * 100)
cv2.rectangle(npImg, (startX, startY), (endX, endY),
cv2.rectangle(im0, (startX, startY), (endX, endY),
COLORS[idx], 2)
y = startY - 15 if startY - 15 > 15 else startY + 15
cv2.putText(npImg, label, (startX, y),
cv2.putText(im0, label, (startX, y),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, COLORS[idx], 2)
# Forced garbage cleanup every second
@ -178,7 +183,7 @@ def main():
# See visually what the Aimbot sees
if visuals:
cv2.imshow('Live Feed', npImg)
cv2.imshow('Live Feed', im0)
if (cv2.waitKey(1) & 0xFF) == ord('q'):
exit()
camera.stop()