(NeurIPS 2021) Pytorch implementation of paper "Re-ranking for image retrieval and transductive few-shot classification"

Overview

SSR

(NeurIPS 2021) Pytorch implementation of paper "Re-ranking for image retrieval and transductivefew-shot classification"

[Paper] [Project webpage] [Video] [Slide]

teaser

The project is an extension work to SIB. If our project is helpful for your research, please consider citing :

@inproceedings{shen2021reranking,
  title={Re-ranking for image retrieval and transductive few-shot classification},
  author={Shen, Xi and Xiao, Yang and Hu, Shell Xu, and Sbai, Othman and Aubry, Mathieu},
  booktitle={Conference on Neural Information Processing Systems (NeurIPS)},
  year={2021}
}

Table of Content

1. Installation

Code is tested under Pytorch > 1.0 + Python 3.6 environment.

Please refer to image retrieval and transductive few-shot classification to download datasets.

2. Methods and Results

SSR learns updates for a similarity graph.

It decomposes the N * N similarity graph into N subgraphs where rows and columns of the matrix are ordered depending on similarities to the subgraph reference image.

The output of SSR is an improved similarity matrix.

teaser

2.1 Image retrieval

2.1.1 SSR module

Rows : the subgraph reference image (red) and the query image (green);

Columns : top retrieved images of the query image (green). These images are ordered according to the reference image (red).

teaser

2.1.2 Results

To reproduce the results on image retrieval datasets (rOxford5k, rParis6k), please refer to Image Retrieval

teaser

2.2 Transductive few-shot classification

2.2.1 SSR module

We illustrate our idea with an 1-shot-2way example:

Rows: the subgraph reference image (red) and the support set S;

Columns: the support set S and the query set Q. Both S and Q are ordered according to the reference image (red).

teaser

2.2.2 Results

To reproduce the results on few-shot datasets (CIFAR-FS, Mini-ImageNet, TieredImageNet), please refer to transductive few-shot classification

teaser

3. Acknowledgement

  • The implementation of k-reciprocal is adapted from its public code

  • The implementation of few-shot training, evaluation and synthetic gradient is adapted from SIB

4. ChangeLog

  • 21/10/29, model, evaluation + training released

5. License

This code is distributed under an MIT LICENSE.

Note that our code depends on Pytorch, and uses datasets which each have their own respective licenses that must also be followed.

You might also like...
Pytorch Implementation for NeurIPS (oral) paper: Pixel Level Cycle Association: A New Perspective for Domain Adaptive Semantic Segmentation

Pixel-Level Cycle Association This is the Pytorch implementation of our NeurIPS 2020 Oral paper Pixel-Level Cycle Association: A New Perspective for D

Code for our NeurIPS 2021 paper  Mining the Benefits of Two-stage and One-stage HOI Detection
Code for our NeurIPS 2021 paper Mining the Benefits of Two-stage and One-stage HOI Detection

CDN Code for our NeurIPS 2021 paper "Mining the Benefits of Two-stage and One-stage HOI Detection". Contributed by Aixi Zhang*, Yue Liao*, Si Liu, Mia

Code to reproduce the experiments from our NeurIPS 2021 paper " The Limitations of Large Width in Neural Networks: A Deep Gaussian Process Perspective"

Code To run: python runner.py new --save SAVE_NAME --data PATH_TO_DATA_DIR --dataset DATASET --model model_name [options] --n 1000 - train - t

Companion code for the paper "An Infinite-Feature Extension for Bayesian ReLU Nets That Fixes Their Asymptotic Overconfidence" (NeurIPS 2021)

ReLU-GP Residual (RGPR) This repository contains code for reproducing the following NeurIPS 2021 paper: @inproceedings{kristiadi2021infinite, title=

Code for our NeurIPS 2021 paper 'Exploiting the Intrinsic Neighborhood Structure for Source-free Domain Adaptation'

Exploiting the Intrinsic Neighborhood Structure for Source-free Domain Adaptation (NeurIPS 2021) Code for our NeurIPS 2021 paper 'Exploiting the Intri

This GitHub repository contains code used for plots in NeurIPS 2021 paper 'Stochastic Multi-Armed Bandits with Control Variates.'

About Repository This repository contains code used for plots in NeurIPS 2021 paper 'Stochastic Multi-Armed Bandits with Control Variates.' About Code

Source code of NeurIPS 2021 Paper ''Be Confident! Towards Trustworthy Graph Neural Networks via Confidence Calibration''

CaGCN This repo is for source code of NeurIPS 2021 paper "Be Confident! Towards Trustworthy Graph Neural Networks via Confidence Calibration". Paper L

Code for NeurIPS 2021 paper: Invariant Causal Imitation Learning for Generalizable Policies

Invariant Causal Imitation Learning for Generalizable Policies Ioana Bica, Daniel Jarrett, Mihaela van der Schaar Neural Information Processing System

Official implementation of "Open-set Label Noise Can Improve Robustness Against Inherent Label Noise" (NeurIPS 2021)

Open-set Label Noise Can Improve Robustness Against Inherent Label Noise NeurIPS 2021: This repository is the official implementation of ODNL. Require

Comments
  • Given an embedding list, how to perform ssr on it?

    Given an embedding list, how to perform ssr on it?

    Given an embedding list, how to perform SSR on it? An embedding list includes a list of images that are encoded into embeddings using a neural network.

    opened by algoteam5 3
  • Asking about the dataset

    Asking about the dataset

    What do you mean by "database", "query", and "gt"?

        ### Oxford
        oxford_db = info_oxford['database'].T
        oxford_query = info_oxford['query'].T
        oxford_gt = info_oxford['gt']
    
    
    opened by algoteam5 1
  • No improvements of mAP during training

    No improvements of mAP during training

    I was training the model with my dataset. As the logs say, there were no improvements of mAP during training. Why was that? Or was it because I didn't have the test module? image

    opened by algoteam5 2
  • eval_landmark.compute_map_and_print and related problems?

    eval_landmark.compute_map_and_print and related problems?

    I am trying to reproduce your work by training with another dataset. However, my dataset doesn't have ground-truth file such as good, ok, bad, junk. How should I train the model without using the eval_landmark.compute_map_and_print function?

    opened by algoteam5 3
Owner
xshen
Ph.D, Computer Vision, Deep Learning.
xshen
Official implementation of NeurIPS 2021 paper "One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective"

Official implementation of NeurIPS 2021 paper "One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective"

Ng Kam Woh 71 Dec 22, 2022
Official implementation of NeurIPS 2021 paper "Contextual Similarity Aggregation with Self-attention for Visual Re-ranking"

CSA: Contextual Similarity Aggregation with Self-attention for Visual Re-ranking PyTorch training code for CSA (Contextual Similarity Aggregation). We

Hui Wu 19 Oct 21, 2022
The official implementation of NeurIPS 2021 paper: Finding Optimal Tangent Points for Reducing Distortions of Hard-label Attacks

The official implementation of NeurIPS 2021 paper: Finding Optimal Tangent Points for Reducing Distortions of Hard-label Attacks

machen 11 Nov 27, 2022
Official implementation of NeurIPS'2021 paper TransformerFusion

TransformerFusion: Monocular RGB Scene Reconstruction using Transformers Project Page | Paper | Video TransformerFusion: Monocular RGB Scene Reconstru

Aljaz Bozic 118 Dec 25, 2022
Pytorch implementation of RED-SDS (NeurIPS 2021).

Recurrent Explicit Duration Switching Dynamical Systems (RED-SDS) This repository contains a reference implementation of RED-SDS, a non-linear state s

Abdul Fatir 10 Dec 2, 2022
Official Pytorch implementation of "Unbiased Classification Through Bias-Contrastive and Bias-Balanced Learning (NeurIPS 2021)

Unbiased Classification Through Bias-Contrastive and Bias-Balanced Learning (NeurIPS 2021) Official Pytorch implementation of Unbiased Classification

Youngkyu 17 Jan 1, 2023
The PyTorch implementation of Directed Graph Contrastive Learning (DiGCL), NeurIPS-2021

Directed Graph Contrastive Learning The PyTorch implementation of Directed Graph Contrastive Learning (DiGCL). In this paper, we present the first con

Tong Zekun 28 Jan 8, 2023
This is an official PyTorch implementation of Task-Adaptive Neural Network Search with Meta-Contrastive Learning (NeurIPS 2021, Spotlight).

NeurIPS 2021 (Spotlight): Task-Adaptive Neural Network Search with Meta-Contrastive Learning This is an official PyTorch implementation of Task-Adapti

Wonyong Jeong 15 Nov 21, 2022
Official Pytorch implementation for Deep Contextual Video Compression, NeurIPS 2021

Introduction Official Pytorch implementation for Deep Contextual Video Compression, NeurIPS 2021 Prerequisites Python 3.8 and conda, get Conda CUDA 11

null 51 Dec 3, 2022
This is a pytorch implementation of the NeurIPS paper GAN Memory with No Forgetting.

GAN Memory for Lifelong learning This is a pytorch implementation of the NeurIPS paper GAN Memory with No Forgetting. Please consider citing our paper

Miaoyun Zhao 43 Dec 27, 2022