Coder Social home page Coder Social logo

ml-lab / affnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ducha-aiki/affnet

0.0 3.0 0.0 40.03 MB

Code and weights for local feature affine shape estimation paper "Learning Discriminative Affine Regions via Discriminability"

Python 99.55% Shell 0.45%

affnet's Introduction

AffNet model implementation

CNN-based affine shape estimator.

AffNet model implementation in PyTorch for TechReport "Learning Discriminative Affine Regions via Discriminability"

AffNet generates up to twice more correspondeces compared to Baumberg iterations HesAff HesAffNet

Retrieval on Oxford5k, mAP

Detector + Descriptor BoW BoW + SV BoW + SV + QE HQE + MA
HesAff + RootSIFT 55.1 63.0 78.4 88.0
HesAff + HardNet++ 60.8 69.6 84.5 88.3
HesAffNet + HardNet++ 68.3 77.8 89.0 89.5

Datasets and Training

To download datasets and start learning affnet:

git clone https://github.com/ducha-aiki/affnet
./run_me.sh

Pre-trained models

Pre-trained models can be found in folder pretrained: AffNet.pth

Usage example

We provide two examples, how to estimate affine shape with AffNet. First, on patch-column file, in HPatches format, i.e. grayscale image with w = patchSize and h = nPatches * patchSize

cd examples/just_shape
python detect_affine_shape.py imgs/face.png out.txt

Out file format is upright affine frame a11 0 a21 a22

Second, AffNet inside pytorch implementation of Hessian-Affine

2000 is number of regions to detect.

cd examples/hesaffnet
python hesaffnet.py img/cat.png ells-affnet.txt 2000
python hesaffBaum.py img/cat.png ells-Baumberg.txt 2000

output ells-affnet.txt is Oxford affine format

1.0
128
x y a b c 

Citation

Please cite us if you use this code:

@article{AffNet2017,
 author = {Dmytro Mishkin, Filip Radenovic, Jiri Matas},
    title = "{Learning Discriminative Affine Regions via Discriminability}",
     year = 2017,
    month = nov}

affnet's People

Contributors

ducha-aiki avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.