mcimpoi / hardnet

Hardnet descriptor model - "Working hard to know your neighbor's margins: Local descriptor learning loss"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HardNet model implementation

HardNet model implementation in PyTorch for NIPS 2017 paper "Working hard to know your neighbor's margins: Local descriptor learning loss"

Requirements

Please use Python 2.7, install OpenCV and additional libraries from requirements.txt

Datasets and Training

To download datasets and start learning descriptor:

git clone https://github.com/DagnyT/hardnet
./run_me.sh

Logs are stored in tensorboard format in directory logs/

Pre-trained models

Pre-trained models can be found in folder pretrained: train_liberty and train_liberty_with_aug

Usage example

We provide an example, how to describe patches with HardNet. Script expects patches in HPatches format, i.e. grayscale image with w = patch_size and h = n_patches * patch_size

cd examples
python extract_hardnet_desc_from_hpatches_file.py imgs/ref.png out.txt

or with Caffe:

cd examples/caffe
python extract_hardnetCaffe_desc_from_hpatches_file.py ../imgs/ref.png hardnet_caffe.txt

Citation

Please cite us if you use this code:

@article{HardNet2017,
 author = {Anastasiya Mishchuk, Dmytro Mishkin, Filip Radenovic, Jiri Matas},
    title = "{Working hard to know your neighbor's margins: Local descriptor learning loss}",
    booktitle = {Proceedings of NIPS},
     year = 2017,
    month = dec}

About

Hardnet descriptor model - "Working hard to know your neighbor's margins: Local descriptor learning loss"


Languages

Language:Python 98.3%Language:Shell 1.7%