Code Monkey home page Code Monkey logo

efficient-descriptors's Introduction

Graffter Banner

Revisiting Binary Local Image Description for Resource Limited Devices

📢IMPORTANT📢 BAD is now available in OpenCV as cv::xfeatures2d::TEBLID

This repository contains the source code of BAD (renamed as TEBLID after its inclusion in OpenCV contrib) and HashSIFT descriptors presented in "Revisiting Binary Local Image Description for Resource Limited Devices". When accuracy and efficiency are both important, the descriptors in this repository offer the perfect trade-off for real-time applications and resource limited devices like smartphones, robots or drones.

Graffter header image

Dependencies

The code depends on OpenCV 4.

To install OpenCV ... In Ubuntu 18.04 compile it from sources with the following instructions:
# Install dependencies (Ubuntu 18.04)
sudo apt-get install -y build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
# Download source code
git clone https://github.com/opencv/opencv.git --branch 4.5.2 --depth 1
# Create build directory
cd opencv && mkdir build && cd build
# Generate makefiles, compile and install
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j
sudo make install
  • NOTE: The code also compile with OpenCV 3, but without parallel for's. Thus, the description will be slower.

Compile and Run

We provide the pre-trained execution code of BAD and HashSIFT descriptors. The code contains two demos. The first one estimates the fundamental matrix between two images of the Machine Hall 05 from EuRoC MAV Dataset. The demo detects feature points using ORB detector (FAST + Harris score) and describes using BAD. We draw the RANSAC inliers with less than 3px of epipolar error. The code can be compiled with Cmake:

mkdir build && cd build
cmake .. && make
./stereo_demo [hashsift]

We also show a second demo that registers a pair of planar images.

./homography_demo [hashsift]

The result for the provided images should be several imshows and something like this in the standard output:

*************** Homography estimation demo ***************
Detected features: 1000
Matched features:   64
Inliers percentage:  6.4%

If ORB descriptor is used instead of BAD, only 2.4% of inliers are obtained.

References

If you use this code, you must cite our Robotics and Automation Letters paper:

@ARTICLE{9521740,
  author={Su\'arez, Iago and Buenaposada, Jos\'e M. and Baumela, Luis},
  journal={IEEE Robotics and Automation Letters}, 
  title={Revisiting Binary Local Image Description for Resource Limited Devices}, 
  year={2021},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/LRA.2021.3107024}}

Contact and Licence

We provide a free pre-trained version of the execution code. Full execution and training code can be obtained under license, if you are interested please contact us:

This software was developed by The Graffter S.L. in collaboration with the PCR lab of the Universidad Politécnica de Madrid.

efficient-descriptors's People

Contributors

iago-suarez avatar jmbuena 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

efficient-descriptors's Issues

Responsibility for GPU(opencl) SIDE 'BAD Descriptor'

Hello, I am an HPC(high perfromance computing) Engineer which is interested in and good at visual descriptor/extraction algorithm in order to comtribute to other Visual Alogrithm 's Research, meaning that most of the visual backend algorithm could not concern too much about the fontend speed , I could I contribute on your BAD project.

Question about HASHSIFT params

Great work! I have achieved satisfying performance in my own dataset using BAD.
But i can't figure out what 'cropping_scale' and 'sigma' mean for HASHSIFT. What impact does adjusting these two parameters have on the results?

opencv parallel_for_ not work in mobile device(IOS & Android)

Thanks for your excellent work, I've tried your BAD and HashSIFT descriptors and it works very well! And with opencv greater than 4.0, we can use the parallel_for_ module to speed up the computation of descriptors, it works in my project when in PC. But when I transfer it to my project in mobile device(both ios and android, opencv version > 4.0, by built static lib,), I found the parallel module cannot make any improvement.
I would be thankful for any help!

Descriptors Matching Computational Cost

Hello, I'm trying to reproduce the results of the paper in terms of computational cost using my own computer (intel i7), at the moment I'm able to obtain the same description time in ms using opencv 4.5.5 and oxford dataset.

The issue comes when I arrive to reproduce the matching results, the paper says that detecting 2000 ORB keypoints, descripting them with BAD-256 and matching them using BF Matcher in 100 runs the mean average computational cost is 4.65 ms but I'm obtaining 210 ms.

For the moment I'm using the code that is provided on the repo, called "stereo_demo.cpp", is there something that I'm doing wrong?

Thanks in advance

time cost in computing decsriptors when use HashSIFT

Hi, I've tried your HashSIFT descriptor and it works very well! But we found that the time cost in computing hashsift descriptors(with no parallel_for_) is much slower than opencv SIFT(1000 SIFT keypoints, 261ms vs 80ms in my PC). Is this normal?
Here is part of my sample code:

`

auto sift = cv::SIFT::create(1000);
std::vector<cv::KeyPoint> kpts1, kpts2;
cv::Mat sift_descs1, sift_descs2, hs_descs1, hs_descs2;

sift->detect(img1, kpts1);
sift->detect(img2, kpts2);

auto start = system_clock::now();
sift->compute(img1, kpts1, sift_descs1);
sift->compute(img2, kpts2, sift_descs2);
auto end = system_clock::now();
std::cout << "SIFT compute descs time: " << duration_cast<milliseconds>(end - start).count() << " ms." << std::endl;

auto hashsift = upm::HashSIFT::create(6.75, upm::HashSIFT::SIZE_256_BITS);

start = system_clock::now();
hashsift->compute(img1, kpts1, hs_descs1);
hashsift->compute(img2, kpts2, hs_descs2);
end = system_clock::now();
std::cout << "HashSIFT compute descs time: " << duration_cast<milliseconds>(end - start).count() << " ms." << std::endl;`

Any help will be grateful!

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.