xfeat / hubconf.py
qubvel-hf's picture
qubvel-hf HF staff
Clean proj with LFS
9b7fcdb
raw
history blame contribute delete
453 Bytes
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