Open StaHRocK1992 opened 1 year ago
@StaHRocK1992 I am also facing same problem. Do you have a solution?
@kurvaraviteja355 I didn't find a way to use the custom model via torch.hub. Maybe there is something wrong with the hubconfig.
To use the model, I grabbed all the needed files from the repo itself. After that it's working fine.
Hello guys, I want to use my custom trained model via torch.hub. I load the model like follows:
model = torch.hub.load(source='local', repo_or_dir=r'path\to\local\yolov5_obb', model='custom', path=r'./model/yolov5_obb_best.pt')
The thing is I always get the ERROR:
ImportError: cannot import name 'nms_rotated_ext' from partially initialized module 'utils.nms_rotated' (most likely due to a circular import)
The compliation of nms_rotated was successful. I saw that there where some other issues regarding to that ERROR, but since the complilation was successful I guess there is another issue.
By the way I'm using Windows 10, PyTorch 1.9, CUDA 11.4 and the detect.py is working perfectly fine.
Maybe someone could help me solve this issue.
Thanks in advance.