-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathhubconf.py
28 lines (23 loc) · 1.33 KB
/
hubconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
dependencies = ['torch', 'timm']
import torch
from gazelle.model import get_gazelle_model
def gazelle_dinov2_vitb14():
model, transform = get_gazelle_model('gazelle_dinov2_vitb14')
ckpt_path = "https://github.com/fkryan/gazelle/releases/download/v1.0.0/gazelle_dinov2_vitb14_hub.pt"
model.load_gazelle_state_dict(torch.hub.load_state_dict_from_url(ckpt_path))
return model, transform
def gazelle_dinov2_vitl14():
model, transform = get_gazelle_model('gazelle_dinov2_vitl14')
ckpt_path = "https://github.com/fkryan/gazelle/releases/download/v1.0.0/gazelle_dinov2_vitl14.pt"
model.load_gazelle_state_dict(torch.hub.load_state_dict_from_url(ckpt_path))
return model, transform
def gazelle_dinov2_vitb14_inout():
model, transform = get_gazelle_model('gazelle_dinov2_vitb14_inout')
ckpt_path = "https://github.com/fkryan/gazelle/releases/download/v1.0.0/gazelle_dinov2_vitb14_inout.pt"
model.load_gazelle_state_dict(torch.hub.load_state_dict_from_url(ckpt_path))
return model, transform
def gazelle_dinov2_vitl14_inout():
model, transform = get_gazelle_model('gazelle_dinov2_vitl14_inout')
ckpt_path = "https://github.com/fkryan/gazelle/releases/download/v1.0.0/gazelle_dinov2_vitl14_inout.pt"
model.load_gazelle_state_dict(torch.hub.load_state_dict_from_url(ckpt_path))
return model, transform