ashkamath / mdetr

Apache License 2.0
969 stars 125 forks source link

Missing pretrained checkpoint for ResNet101 #70

Closed seanzhuh closed 2 years ago

seanzhuh commented 2 years ago

Hi, In mdetr/models/backbone.py, class GroupNormBackbone loads a pretrained checkpoint:

name_map = {
            "resnet50-gn": ("resnet50", "/checkpoint/szagoruyko/imagenet/22014122/checkpoint.pth"),
            "resnet101-gn": ("resnet101", "/checkpoint/szagoruyko/imagenet/22080524/checkpoint.pth"),
}

It seems like the path is on your disk, where do I download these .pth files?

SkylerZheng commented 2 years ago

Hi, I also need these, especially resnet101. I used a pretrained resnet101 model, but the architectures are different, cannot work properly. The precision on refcoco is really bad. Could you help to share the details about the resnet model you used?

alcinos commented 2 years ago

Hello @sean-zhuh and @SkylerZheng

Could you provide more context on what you are trying to do? The GroupNorm backbone are inherited from the DETR codebase but are not really supported for MDETR (and we have never tested them). The model we provide are all trained with regular BatchNorm (frozen)

"The precision on refcoco is really bad" --> Could you elaborate? Did you train it yourself? Did you try the provided refcoco checkpoint?

SkylerZheng commented 2 years ago

Hi @alcinos ,

Thank you very much for your quick response. I will need to use pretrained resnet101 locally, the current resnet backbone download with url, I download the resnet101 with url from huggingface, however, the model architecture is different. Using this, I got really bad precision (using pretrained mdetr on refcoco and do the evaluation on testA split), @1 = 9.7%, but using url, I got 89.55% on testA. But I have managed to solve the problem, by loading the weights from url and save to local file and then load again. @sean-zhuh You can try to see if this works for you as well.

Thank you very much!

Best,