need help in modifying code to access YOLOv5 for CPU
I am trying to implement a object detection program with Pytorch , OpenCV and YOLOv5 that detect the objects and the type of object from a YouTube video . However, while running, the output console shows that the YOLO version the program is trying to run is for CUDA . I wish to use the YOLO for CPU to implement the project as my computer is not set up for CUDA. I seek assistance on how may I go about modifying the program to utilize the YOLO for CPU ? Thank You Very Much !
Link to GitHub Gist
https://gist.github.com/neitherjames/c3b91033eca3794f8170ee51ee5357d4

From your __init__ it shows that you give the system the option to choose CUDA if it is available. You can force it to run on cpu by stating self.device = 'cpu' on line 23. Then when calling self.model.to(self.device) on line 48, the model is sent to cpu.
