Skip to content

Commit

Permalink
getting the model integration to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Korbar committed Jun 22, 2020
1 parent 53dfb59 commit 7f70adb
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Currently, this codebase supports the following models:


## Suporting Team
This codebase is actively supported by Facebook AI computer vision: @CHJoanna, @weiyaowang, @hengcv, @deeptigp, @dutran, and independent researchers @bjuncek (Quantsight, Oxford VGG).
This codebase is actively supported by Facebook AI computer vision: @CHJoanna, @weiyaowang, @hengcv, @deeptigp, @dutran, and community researchers @bjuncek (Quantsight, Oxford VGG).

3 changes: 3 additions & 0 deletions pt/hubconf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies = ["torch", "torchvision"]

from vmz.models import r2plus1d_34, r2plus1d_152, ip_csn_152, ir_csn_152
6 changes: 6 additions & 0 deletions pt/vmz/models/csn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
def ir_csn_152(pretraining="", progress=False, **kwargs):
avail_pretrainings = [
"ig65m_32frms",
"ig_ft_kinetics_32frms",
"sports1m_32frms",
"sports1m_ft_kinetics_32frms",
]

if pretraining in avail_pretrainings:
Expand Down Expand Up @@ -42,6 +45,9 @@ def ip_csn_152(pretrained=False, progress=False, **kwargs):
def ir_csn_152(pretraining="", progress=False, **kwargs):
avail_pretrainings = [
"ig65m_32frms",
"ig_ft_kinetics_32frms",
"sports1m_32frms",
"sports1m_ft_kinetics_32frms",
]

if pretraining in avail_pretrainings:
Expand Down
4 changes: 3 additions & 1 deletion pt/vmz/models/r2plus1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ def r2plus1d_34(pretraining="", progress=False, **kwargs):

def r2plus1d_152(pretraining="", progress=False, **kwargs):
avail_pretrainings = [
"ig65m_8frms",
"ig65m_32frms",
"ig_ft_kinetics_32frms",
"sports1m_32frms",
"sports1m_ft_kinetics_32frms",
]
if pretraining in avail_pretrainings:
arch = "r2plus1d_" + pretraining
Expand Down
24 changes: 16 additions & 8 deletions pt/vmz/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@

# TODO: upload models and load them
model_urls = {
"r2plus1d_34_kinetics_8frms": "", # noqa: E501
"r2plus1d_34_kinetics_32frms": "", # noqa: E501
"r2plus1d_34_ig65m_8frms": "", # noqa: E501
"r2plus1d_34_ig65m_32frms": "", # noqa: E501
"r2plus1d_152_ig65m_8frms": "", # noqa: E501
"r2plus1d_152_ig65m_32frms": "", # noqa: E501
"ir_csn_152_ig65m_32frms": "", # noqa: E501
"ip_csn_152_ig65m_32frms": "", # noqa: E501
"r2plus1d_34_8_ig65m": "https://github.com/moabitcoin/ig65m-pytorch/releases/download/v1.0.0/r2plus1d_34_clip8_ig65m_from_scratch-9bae36ae.pth", # noqa: E501
"r2plus1d_34_32_ig65m": "https://github.com/moabitcoin/ig65m-pytorch/releases/download/v1.0.0/r2plus1d_34_clip32_ig65m_from_scratch-449a7af9.pth", # noqa: E501
"r2plus1d_34_8_kinetics": "https://github.com/moabitcoin/ig65m-pytorch/releases/download/v1.0.0/r2plus1d_34_clip8_ft_kinetics_from_ig65m-0aa0550b.pth", # noqa: E501
"r2plus1d_34_32_kinetics": "https://github.com/moabitcoin/ig65m-pytorch/releases/download/v1.0.0/r2plus1d_34_clip32_ft_kinetics_from_ig65m-ade133f1.pth", # noqa: E501
"r2plus1d_152_ig65m_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/r2plus1d_152_ig65m_from_scratch_f106380637.pth",
"r2plus1d_152_ig_ft_kinetics_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/r2plus1d_152_ft_kinetics_from_ig65m_f107107466.pth",
"r2plus1d_152_sports1m_32frms": "",
"r2plus1d_152_sports1m_ft_kinetics_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/r2plus1d_152_ft_kinetics_from_sports1m_f128957437.pth",
"ir_csn_152_ig65m_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/irCSN_152_ig65m_from_scratch_f125286141.pth",
"ir_csn_152_ig_ft_kinetics_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/irCSN_152_ft_kinetics_from_ig65m_f126851907.pth",
"ir_csn_152_sports1m_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/irCSN_152_Sports1M_from_scratch_f99918785.pth",
"ir_csn_152_sports1m_ft_kinetics_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/irCSN_152_ft_kinetics_from_Sports1M_f101599884.pth",
"ip_csn_152_ig65m_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/ipCSN_152_ig65m_from_scratch_f130601052.pth",
"ip_csn_152_ig_ft_kinetics_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/ipCSN_152_ft_kinetics_from_ig65m_f133090949.pth",
"ip_csn_152_sports1m_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/ipCSN_152_Sports1M_from_scratch_f111018543.pth",
"ip_csn_152_sports1m_ft_kinetics_32frms": "https://github.com/bjuncek/VMZ/releases/download/test_models/ipCSN_152_ft_kinetics_from_Sports1M_f111279053.pth",
}


Expand Down

0 comments on commit 7f70adb

Please sign in to comment.