Git Product home page Git Product logo

Comments (1)

ShihaoShao-GH avatar ShihaoShao-GH commented on June 3, 2024

Hi, welcome to the image retrieval community! I couldn't give you a concrete script for this (also good for you to practice and more time for me to relax;) ). But in your case, here are the probable steps you could follow, which won't be hard or rather it is super easy:

  1. I don't recommend using our pipeline with parameter in console. Instead, try to build your own pipeline, but with some of my codes as the tools - if you are also new in python then a jupyter might be your choice.
  2. Construct a Dataset object in torch to cover your query and index datasets.
  3. Initialize the model (Grabbed from our code) with your pre-trained weights loaded.
  4. Refer to extract_feature in https://github.com/ShihaoShao-GH/SuperGlobal/tree/main/test/test_utils.py for extracting the global feature for both query and index.
  5. Now, you will have two tensors of global features, where one in shape (#query, dims) and (#index, dims).
  6. Do dot product between them, which gives (#query, #index). Then do torch.argsort(descending=True). You will get the sorted ordered of index for similarity from high to low for a given query.

For the grid search, our paper indicates there is a strong consistency in different datasets for our searching results. So you can directly use them.

from superglobal.

Related Issues (17)

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.