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

loading lvis model in colab #5

Open
nikky4D opened this issue Apr 30, 2021 · 1 comment
Open

loading lvis model in colab #5

nikky4D opened this issue Apr 30, 2021 · 1 comment

Comments

@nikky4D
Copy link

nikky4D commented Apr 30, 2021

Hi,

Is there a sample on how to load the lvis model in colab, similar to what is currently done with torch.hub?

@nikky4D
Copy link
Author

nikky4D commented Apr 30, 2021

I can follow the format in hubconf.py. Is the backbone for the LVIS model also a Resnet101? I'm making something like this, however it is throwing errors:

`

def mdetr_resnet101_lvis(pretrained=False, return_postprocessor=False):

model = _make_detr("resnet101")
if pretrained:
    checkpoint = torch.hub.load_state_dict_from_url(
        url="https://zenodo.org/record/4721981/files/lvis10_checkpoint.pth",
        map_location="cpu",
        check_hash=True,
    )
    model.load_state_dict(checkpoint["model"])
if return_postprocessor:
    return model, PostProcess()
return model

`

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