GithubHelp home page GithubHelp logo

stivensss / diffusion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fyang93/diffusion

0.0 1.0 0.0 22.57 MB

Efficient Diffusion for Image Retrieval

License: MIT License

Makefile 6.35% Python 93.65%

diffusion's Introduction

This is a faster and improved version of diffusion retrieval, inspired by diffusion-retrieval.

Reference:

If you would like to understand further details of our method, these slides may provide some help.

Features

  • All random walk processes are moved to offline, making the online search remarkably fast

  • In contrast to previous works, we achieved better performance by applying late truncation instead of early truncation to the graph

Requirements

  • Install Facebook FAISS by running conda install faiss-cpu -c pytorch

Optional: install the faiss-gpu under the instruction according to your CUDA version

  • Install joblib by running conda install joblib

  • Install tqdm by running conda install tqdm

Parameters

All parameters can be modified in Makefile. You may want to edit DATASET and FEATURE_TYPE to test all combinations of each dataset and each feature type. Another parameter truncation_size is set to 1000 by default, for large datasets like Oxford105k and Paris106k, changing it to 5000 will improve the performance.

Run

  • Run make download to download files needed in experiments;

  • Run make mat2npy to convert .mat files to .npy files;

  • Run make rank to get the results. If you have GPUs, try using commands like CUDA_VISIBLE_DEVICES=0,1 make rank, 0,1 are examples of GPU ids.

Note: on Oxford5k and Paris6k datasets, the truncation_size parameter should be no larger than 1024 when using GPUs according to FAISS's limitation. You can use CPUs instead.

Authors

diffusion's People

Contributors

fyang93 avatar

Watchers

James Cloos 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.