yolov7-deepsort-tracking
yolov7-deepsort-tracking copied to clipboard
Problem of AssertionError: Invalid device id
Hello, good day. I have a problem regard of ''detector = Detector(classes = [0,17,32])''. After I run it on google colab, it keeps showing "AssertionError: Invalid device id". May I know how to solve it? Thank you
Thanks for putting it out to my notice. It should definitely not come from Detector class until unless you have a variable named device in your code or you're overriding the existing Detector class because the first line of the class inside __init__ is self.device = select_device("cuda" if torch.cuda.is_available() else 'cpu') which means it AUTOMATICALLY selects the device.
Can you please print the whole traceback in a formatted manner so that I can look at it. And it'd be great if you could tell me how to reproduce the error too. Thank you.
Alright, thank you

Can you take the latest pull and let me know if that worked? You must have been using CUDA which I did not check with I suppose. I have only changed self.device inside the Detector class.