asdff icon indicating copy to clipboard operation
asdff copied to clipboard

Checks to see if CUDA is in use, to then use torch instead of numpy.

Open JemiloII opened this issue 1 year ago • 0 comments

https://github.com/Bing-su/asdff/blob/8ac7245fd7aef8504b24da10d6495159c72b0d33/asdff/yolo.py#L71

I've noticed that there numpy used in places. Could we have a torch check to see if device is cuda, and to use torch instead of numpy when a gpu is available? This will greatly speed things up instead of using the cpu in these instances.

PyTorch supports both CPU and GPU acceleration, so an if statement probably wouldn't even be necessary.

JemiloII avatar Oct 19 '23 14:10 JemiloII