deep-person-reid icon indicating copy to clipboard operation
deep-person-reid copied to clipboard

pretrained weights for "osnet_ain_x1_0" are broken

Open darkAlert opened this issue 1 year ago • 0 comments

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.

darkAlert avatar Jan 15 '24 12:01 darkAlert