Skip to content
forked from DagnyT/hardnet

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

Notifications You must be signed in to change notification settings

spongezhang/hardnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HardNet model implementation

HardNet model implementation in PyTorch for 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
./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}",
     year = 2017}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.1%
  • Shell 1.9%