GithubHelp home page GithubHelp logo

aksh98 / neural_best_buddies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kfiraberman/neural_best_buddies

0.0 2.0 0.0 277 KB

An algorithm for sparse semantic correspondence between images of different categories

Python 99.75% Shell 0.25%

neural_best_buddies's Introduction

Neural Best-Buddies in PyTorch

This is our PyTorch implementation for the Neural-Best Buddies paper. It is still under active development.

The code was written by Kfir Aberman and supported by Mingyi Shi.

Neural Best-Buddies: Project | Paper

If you use this code for your research, please cite:

Neural Best-Buddies: Sparse Cross-Domain Correspondence Kfir Aberman, Jing Liao, Mingyi Shi, Dani Lischinski, Baoquan Chen, Daniel Cohen-Or, SIGGRAPH 2018.

Prerequisites

  • Linux or macOS
  • Python 2 or 3
  • CPU or NVIDIA GPU + CUDA CuDNN

Run

  • Run the algorithm (demo example)
#!./script.sh
python3 main.py --datarootA ./images/original_A.png --datarootB ./images/original_B.png --name lion_cat --k_final 10

The option --k_final dictates the final number of returned points. The results will be saved at ../results/. Use --results_dir {directory_path_to_save_result} to specify the results directory.

Output

Sparse correspondence:

  • correspondence_A.txt, correspondence_B.txt
  • correspondence_A_top_k.txt, correspondence_B_top_k.txt

Dense correspondence (densifying based on MLS):

  • BtoA.npy, AtoB.npy

Warped images (aligned to their middle geometry):

  • warp_AtoM.png, warp_BtoM.png

Tips

  • If you are running the algorithm on a bunch of pairs, we recommend to stop it at the second layer to reduce runtime (comes at the expense of accuracy), use the option --fast.
  • If the images are very similar (e.g, two frames extracted from a video), many corresponding points might be found, resulting in long runtime. In this case we suggest to limit the number of corresponding points per level by setting --points_per_level 20 (or any other desired number)

Citation

If you use this code for your research, please cite our paper:

@article{aberman2018neural,
  author = {Kfir, Aberman and Jing, Liao and Mingyi, Shi and Dani, Lischinski and Baoquan, Chen and Daniel, Cohen-Or},
  title = {Neural Best-Buddies: Sparse Cross-Domain Correspondence},
  journal = {ACM Transactions on Graphics (TOG)},
  volume = {37},
  number = {4},
  pages = {69},
  year = {2018},
  publisher = {ACM}
}

neural_best_buddies's People

Contributors

kfiraberman avatar

Watchers

James Cloos avatar Akarsha Sehwag 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.