File size: 453 Bytes
9b7fcdb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
dependencies = ['torch']
from modules.xfeat import XFeat as _XFeat
import torch
def XFeat(pretrained=True, top_k=4096):
"""
XFeat model
pretrained (bool): kwargs, load pretrained weights into the model
"""
weights = None
if pretrained:
weights = torch.hub.load_state_dict_from_url("https://github.com/verlab/accelerated_features/raw/main/weights/xfeat.pt")
model = _XFeat(weights, top_k=top_k)
return model
|