Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JemiloII opened this issue Oct 19, 2023 · 0 comments
Open

Comments

@JemiloII
Copy link

JemiloII commented Oct 19, 2023

bboxes = pred[0].boxes.xyxy.cpu().numpy()

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant