facebookresearch / VMZ

VMZ: Model Zoo for Video Modeling
Apache License 2.0
1.04k stars 156 forks source link

Broken links in PyTorch model zoo (+ fixes) #126

Closed tchang1997 closed 3 years ago

tchang1997 commented 3 years ago

Hello all,

While trying to load the pretrained R(2+1)D-152 models fine-tuned on Kinetics, I kept running into a KeyError in the model_urls variable in VMZ/pt/vmz/models/utils.py, and upon further inspection, the __init__ constructor in the R(2+1)D module (at VMZ/pt/vmz/models/r2plus1d.py) seems to be passing in malformed keys.

I noticed that a similar issue has been brought up in #105 and #74 (both closed by author), so I wanted to discuss if this is worth making a PR (it's very minor line edits)/how we might integrate these changes.

To fix this, I made the following changes to VMZ/pt/vmz/models/r2plus1d.py:

After running pip install -e . from the appropriate directory and hopping into the interpreter, I was able to download the pretrained model, as expected.

If this looks reasonable, I'm happy to open a PR following the instructions in CONTRIBUTING.md. I can take a look at other models in the zoo and run more rigorous testing as well.

Thank you!

dutran commented 3 years ago

sure, thanks!