Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 509 forks source link

can't load pre-trained weights for YOLO-NAS using the SuperGradients #2064

Open ApodiAlsurihi opened 4 days ago

ApodiAlsurihi commented 4 days ago

💡 Your Question

Hello, I am experiencing an issue while trying to load pre-trained weights for YOLO-NAS using the SuperGradients library. Here is the code snippet I am using:

python Copy code from super_gradients.training import models

model = models.get('yolo_nas_s', num_classes=len(dataset_params['classes']), pretrained_weights="coco" ) When I run this code, I get the following error:

Downloading: "https://sghub.deci.ai/models/yolo_nas_s_coco.pth" to C:\Users\Owner/.cache\torch\hub\checkpoints\yolo_nas_s_coco.pth URLError: <urlopen error [Errno 11001] getaddrinfo failed> It seems there is an issue with accessing the URL to download the pre-trained weights. I suspect it might be network-related, but I'm unsure if there are any alternative links or settings I need to change. Any help or suggestions would be greatly appreciated! Thank you in advance!

Versions

No response

TychoBomer commented 2 days ago

Hi First check this issue where it has been discussed:

https://github.com/Deci-AI/super-gradients/issues/2057

then follow exactly what tatsuya-fukuoka gave as fix.

You basically change the original bucket where weights where stored to the new bucket https://sg-hub-nv.s3.amazonaws.com/. In pretrained_models.py you update the full path to your weights and in checkpoint_utils.py you change the line with unique_filename.

Let me know if you still need help after!