Skip to content

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

Description

@JemiloII

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions