petercunha / Pine

:evergreen_tree: Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
MIT License
442 stars 76 forks source link

How to enable Cuda Acceleration? #8

Open ixayy opened 5 years ago

ixayy commented 5 years ago

I've installed the toolkit, cant seem to understand how to enable the Acceleration inside of Pine however.

petercunha commented 5 years ago

There's a bug right now that makes acceleration always appear as off. Just make sure you have the CUDA drivers installed and everything should work fine.

Acceleration is enabled but it just doesn't tell you -- I'm working on a bug fix for this.

ixayy commented 5 years ago

I still only get about 20fps though, is that expected from a 1050 Ti or should it be higher?

xrv0 commented 5 years ago

I still only get about 20fps though, is that expected from a 1050 Ti or should it be higher?

@ixayy should be higher I get about 150 using a 1060

Sent with GitHawk

ixayy commented 5 years ago

I still only get about 20fps though, is that expected from a 1050 Ti or should it be higher?

@ixayy should be higher I get about 150 using a 1060

Sent with GitHawk

Could you possibly give me the instructions to properly get the acceleration working? I feel like I've done something wrong here.

xrv0 commented 5 years ago

Make sure you installed cuda and cuDDN correctly. If it still doesnt work, you could try to compile darknet and see if you get any errors

OzgunKB commented 5 years ago

Make sure you installed cuda and cuDDN correctly. If it still doesnt work, you could try to compile darknet and see if you get any errors

I use it darknet with GTX 1070. I installed Cuda and CuDDN. Working.

I couldn't solve this problem. cuda

FidgetySo commented 4 years ago

You need to have a custom-built OpenCV with Cuda enabled

bakaInc commented 4 years ago

@AutisticDragon just install opencv-contrib-python or make own build with WITH_CUDA=ON ?

regiumlepidi commented 4 years ago

980ti, going at about 30 fps, while CUDA seems OFF. Why is this? anybody can help?

YADJ123 commented 3 years ago

980ti, going at about 30 fps, while CUDA seems OFF. Why is this? anybody can help?

go to pine/lib/pine.py edit and search and then replace # load our YOLO object detector trained on COCO dataset (2 classes)

and determine only the output layer names that we need from YOLO

print("[INFO] loading neural-network from disk...")
net = cv2.dnn.readNetFromDarknet(configPath, weightsPath)
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)

make sure both are cuda