Git Product home page Git Product logo

hesaff-pytorch's Introduction

This is implementation of Hessian-Affine local feature detector. It is heavily based on Michal Perdoch C++ implementation https://github.com/perdoch/hesaff

pytaff - current implementation hesamp - Michal Perdoch C++ one.

average

There are several differences:

  1. No SIFT description, the output is image patches. If one needs to, patches could be feed into PyTorchSIFT

  2. Subpixel precision is done via "center-of-responce-mass" inspired by LIFT paper, instead of original iterative quadratic fitting

  3. Instead of setting threshold to control number of detection, this implementation simply outputs top-K local extreme points.

You also might be interested in HesAffNet, which gives significantly better results because of learned affine shape estimation procedure.

If you use this code for academic purposes, please cite the following paper:

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

hesaff-pytorch's People

Contributors

ducha-aiki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hesaff-pytorch's Issues

running error

Hi,

I have tried to run the command: python extract_features_oxaff.py graf1.ppm out.txt 2000. I got the following error:
Traceback (most recent call last):
File "extract_features_oxaff.py", line 36, in
LAFs, resp = HA(var_image)
File "/home/ryan/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/ryan/hessian_affine_local_feature_detector/hesaff-pytorch-master/SparseImgRepresenter.py", line 200, in forward
responses, LAFs, final_pyr_idxs, final_level_idxs = self.multiScaleDetector(x,num_features_prefilter)
File "/home/ryan/hessian_affine_local_feature_detector/hesaff-pytorch-master/SparseImgRepresenter.py", line 84, in multiScaleDetector
scales = sigmas_oct[level_idx - 1:level_idx + 2])
File "/home/ryan/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/ryan/hessian_affine_local_feature_detector/hesaff-pytorch-master/HandCraftedModules.py", line 253, in forward
num_of_nonzero_responces = (nmsed_resp > 0).sum().data[0]
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

Do you know the reasons for this error?

Thanks

Descriptor values?

I ran feature_extractor.py and got results like below:

1.0
906
411.1280822754 216.7289428711 0.0000048985 0.0000001165 0.0000061334
398.0391540527 505.0095214844 0.0103844600 0.0009393070 0.0077745551
342.8026428223 414.6062316895 0.0001460895 0.0000266796 0.0000589753
409.6105346680 654.5926513672 0.0000042293 0.0000002372 0.0000030523
439.0032958984 316.9766540527 0.0062913978 -0.0001653244 0.0018022966
...

I think this only shows affine regions. Can I get descriptor values for each region (n-d features) like hesamp code?

EDIT:

I read readme and I did:

  1. got patches with "patches = extract_patches(x, LAFs, PS = self.PS)"
  2. processed "forward" of SIFTNet for each patch

I think I solved it, but did I do it correctly?

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.