Skip to content

Does Ultralytics uses Gpu if GPU is available #2643

Answered by glenn-jocher
nuhmanpk asked this question in Q&A
Discussion options

You must be logged in to vote

@nuhmanpk hello! Yes, Ultralytics YOLOv8 will automatically use a GPU if it's available and CUDA is properly installed on your system. You don't need to manually move the image to the GPU before inference; the model's predict method handles that for you.

Regarding the output you're seeing, it represents the detection result for your image. Here's a brief explanation of the components:

  • type: torch.Tensor: Indicates that the boxes are stored in a PyTorch tensor.
  • shape: torch.Size([1, 6]): The shape of the tensor, where 1 indicates the number of detections and 6 represents the attributes of each detection.
  • dtype: torch.float32: The data type of the tensor elements, which is 32-bit floating-…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nuhmanpk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants