Skip to content

scape-research/SOSNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOSNet: Second Order Similarity Regularization for Local Descriptor Learning

SOSNet model implementation in PyTorch for the paper:

SOSNet: Second Order Similarity Regularization for Local Descriptor Learning
Yurun Tian, Xin Yu, Bin Fan, Fuchao Wu, Huub Heijnen and Vassileios Balntas
CVPR 2019

[Project page] [Paper] [Poster] [Slides]

Loading the SOSNet demo

The SOSNet model definition can be found in sosnet_model.py.

Below we show an example on how to load the network and run it on a minibatch.

# Init the 32x32 version of SOSNet
sosnet32 = sosnet_model.SOSNet32x32()
net_name = "liberty"
sosnet32.load_state_dict(torch.load(os.path.join('sosnet-weights',"sosnet-32x32-"+net_name+".pth")))
sosnet32.cuda().eval();

# create a random mini-batch of 100 items
x = torch.rand(100,1,32,32).cuda()
# forward feed it to the network
fx = sosnet32(x)
print(fx.size())
# fx.size() -> (100,128)

Matching demo

We provide a demo on how to match two images in the SOSNet-demo notebook.

Citation

Please cite the following work if you use the code:

@InProceedings{sosnet2019cvpr,
author={Yurun Tian and Xin Yu and Bin Fan and Fuchao Wu and Huub Heijnen and Vassileios Balntas },
title = {SOSNet: Second Order Similarity Regularization for Local Descriptor Learning},
booktitle = {CVPR},
year = {2019}}