All Projects → DagnyT → Hardnet

DagnyT / Hardnet

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hardnet

Caffe Deepbinarycode
Supervised Semantics-preserving Deep Hashing (TPAMI18)
Stars: ✭ 206 (-41.14%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Deep Steganography
Hiding Images within other images using Deep Learning
Stars: ✭ 136 (-61.14%)
Mutual labels:  nips-2017, convolutional-neural-networks
Retrieval 2017 Cam
Class-Weighted Convolutional Features for Image Retrieval (BMVC 2017)
Stars: ✭ 219 (-37.43%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Vehicle Retrieval Kcnns
vehicle image retrieval using k CNNs ensemble method
Stars: ✭ 81 (-76.86%)
Mutual labels:  convolutional-neural-networks, image-retrieval
symmetrical-synthesis
Official Tensorflow implementation of "Symmetrical Synthesis for Deep Metric Learning" (AAAI 2020)
Stars: ✭ 67 (-80.86%)
Mutual labels:  metric-learning, image-retrieval
Cnnimageretrieval
CNN Image Retrieval in MatConvNet: Training and evaluating CNNs for Image Retrieval in MatConvNet
Stars: ✭ 168 (-52%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Accurate Binary Convolution Network
Binary Convolution Network for faster real-time processing in ASICs
Stars: ✭ 49 (-86%)
Mutual labels:  nips-2017, convolutional-neural-networks
Pytorch Image Retrieval
A PyTorch framework for an image retrieval task including implementation of N-pair Loss (NIPS 2016) and Angular Loss (ICCV 2017).
Stars: ✭ 203 (-42%)
Mutual labels:  image-retrieval, metric-learning
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (-6.86%)
Mutual labels:  convolutional-neural-networks, image-retrieval
GPQ
Generalized Product Quantization Network For Semi-supervised Image Retrieval - CVPR 2020
Stars: ✭ 60 (-82.86%)
Mutual labels:  metric-learning, image-retrieval
Deep Ranking
Learning Fine-grained Image Similarity with Deep Ranking is a novel application of neural networks, where the authors use a new multi scale architecture combined with a triplet loss to create a neural network that is able to perform image search. This repository is a simplified implementation of the same
Stars: ✭ 64 (-81.71%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Pytorch Metric Learning
The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.
Stars: ✭ 3,936 (+1024.57%)
Mutual labels:  image-retrieval, metric-learning
Cnnimageretrieval Pytorch
CNN Image Retrieval in PyTorch: Training and evaluating CNNs for Image Retrieval in PyTorch
Stars: ✭ 931 (+166%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Affnet
Code and weights for local feature affine shape estimation paper "Repeatability Is Not Enough: Learning Discriminative Affine Regions via Discriminability"
Stars: ✭ 191 (-45.43%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Person reid baseline pytorch
Pytorch ReID: A tiny, friendly, strong pytorch implement of object re-identification baseline. Tutorial 👉https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial
Stars: ✭ 2,963 (+746.57%)
Mutual labels:  image-retrieval, metric-learning
Prototypical Networks
Code for the NeurIPS 2017 Paper "Prototypical Networks for Few-shot Learning"
Stars: ✭ 705 (+101.43%)
Mutual labels:  nips-2017, metric-learning
Revisiting deep metric learning pytorch
(ICML 2020) This repo contains code for our paper "Revisiting Training Strategies and Generalization Performance in Deep Metric Learning" (https://arxiv.org/abs/2002.08473) to facilitate consistent research in the field of Deep Metric Learning.
Stars: ✭ 172 (-50.86%)
Mutual labels:  image-retrieval, metric-learning
proxy-synthesis
Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)
Stars: ✭ 30 (-91.43%)
Mutual labels:  metric-learning, image-retrieval
Powerful Benchmarker
A PyTorch library for benchmarking deep metric learning. It's powerful.
Stars: ✭ 272 (-22.29%)
Mutual labels:  image-retrieval, metric-learning
Batch Dropblock Network
Official source code of "Batch DropBlock Network for Person Re-identification and Beyond" (ICCV 2019)
Stars: ✭ 304 (-13.14%)
Mutual labels:  image-retrieval, metric-learning

HardNet model implementation

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

An example how to compile HardNet to Torchscript to be used in C++ code

Notebook

Update April 06 2018

We have added small shift and rot augmentation, which improves results up to 1mAP point on HPatches. It is in HardNet.py, turn on by --augmentation=True. All the weight will be updated soon. Version, which is trained on Brown + HPatches + PS datasets is in progress, stay tuned :)

Re: popular question about BoW retrieval engine

Unfortunately, it is proprietary and we cannot release it. But you can try the following open source repos, both Matlab-based:

Benchmark on HPatches, mAP

HPatches-results

Retrieval on Oxford5k, mAP, Hessian-Affine detector

Descriptor BoW BoW + SV BoW + SV + QE HQE + MA
TFeatLib 46.7 55.6 72.2 n/a
RootSIFT 55.1 63.0 78.4 88.0
L2NetLib+ 59.8 67.7 80.4 n/a
HardNetLibNIPS+ 59.8 68.6 83.0 88.2
HardNet++ 60.8 69.6 84.5 88.3
HesAffNet + HardNet++ 68.3 77.8 89.0 89.5

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
./code/run_me.sh

Logs are stored in tensorboard format in directory logs/

Pre-trained models

Pre-trained models can be found in folder pretrained.

3rd party pre-trained models

Rahul Mitra presented new large-scale patch PS-dataset and trained even better HardNet on it. Original weights in torch format are here.

Converted PyTorch version is here.

HardNet-Datasets-results

Which weights should I use?

For practical applications, we recommend HardNet++.

For comparison with other descriptors, which are trained on Liberty Brown dataset, we recommend HardNetLib+.

For the best descriptor, which is NOT trained on HPatches dataset, we recommend model by Mitra et.al., link in section above.

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

Projects, which use HardNet

AffNet -- learned local affine shape estimator.

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}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].