I have trained a yolov5l model for object detection and classification. I want to use the exported weights to identify images in a program I am creating. I am having trouble finding much of anything on how to use .pt weights in a python program.
I believe I use the "torch.load" method from the pytorch library, but when I try: torch.load(path_to_weights)
I get a ModuleNotFoundError for not having a module named 'models'.
Any help is much appreciated. Thank you very much.