model = torch.hub.load('ultralytics/yolov5', 'custom', path='./best.pt', force_reload=True) Exception: cannot instantiate 'PosixPath' on your system. Cache may be out of date, try force_reload=True or see https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading for help. I tried redirect the posixpath to windowspath : import pathlib temp = pathlib.PosixPath pathlib.PosixPath = pathlib.WindowsPath I tried loading from local source like this : model = torch.hub.load('path/to/yolov5', 'custom', path='path/to/best.pt', source='local') # local repo Continue reading...