Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pretrained weights for "osnet_ain_x1_0" are broken #571

Open
darkAlert opened this issue Jan 15, 2024 · 0 comments
Open

pretrained weights for "osnet_ain_x1_0" are broken #571

darkAlert opened this issue Jan 15, 2024 · 0 comments

Comments

@darkAlert
Copy link

There seems to be something wrong with the pretrained weights for "osnet_ain_x1_0".

Recently the following code started causing an error:

model = torchreid.models.build_model(
    name="osnet_ain_x1_0",
    num_classes=100,
    loss="softmax",
    pretrained=True
)
model = torchreid.models.build_model(name=model_name, num_classes=100, loss='softmax', pretrained=True)

File "/venv/torchreid/models/init.py", line 117, in build_model
return __model_factory[name](
File "/venv/torchreid/models/osnet_ain.py", line 548, in osnet_ain_x1_0
init_pretrained_weights(model, key='osnet_ain_x1_0')
File "/venv/torchreid/models/osnet_ain.py", line 490, in init_pretrained_weights
gdown.download(pretrained_urls[key], cached_file, quiet=False)
File "/venv/lib/python3.10/site-packages/gdown/download.py", line 259, in download
filename_from_url = m.groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'

Process finished with exit code 1

But if pretrained=False is set or if you select another model like resnet then the error will disappear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant