InsCLR: Improving Instance Retrieval with Self-Supervision

Related tags

Deep Learning insclr
Overview

InsCLR: Improving Instance Retrieval with Self-Supervision

This is an official PyTorch implementation of the InsCLR paper.

Download Dataset

Dataset Image Annotation
The Oxford Buildings Dataset download download
The Paris Dataset download download
Google Landmarks Dataset v2 download download
R-1M distractor download
INSTRE download download

We also provide scripts for downloading these datasets (see download).

Training

To meet the performance reported in the paper, you need several training stages, and each training stage may have a different config, but they share a common pipeline.

Generally, a training stage includes the following steps.

Extract Features

Using backbone pretrained on ImageNet or trained on previous stage to extract features of Google Landmarks Dataset v2 or INSTRE.

export CUDA_VISIBLE_DEVICES=0,1,2,3
export PYTHONPATH=$PWD
python3 tools/compute_candidate_pool.py --cfg configs/instre/base.yaml --task feature --dataset instre --name s0_r50 --pretrain imagenet

Compute Candidate Pool for Each Image

As mentioned in Section 3.1: Setup for training samples.

export CUDA_VISIBLE_DEVICES=0,1,2,3
export PYTHONPATH=$PWD
python3 tools/compute_candidate_pool.py --task neighbor --dataset instre --name s0_r50

Configuration

There are two different configs we use in the whole training, we call them base and impr config, respectively.

For Google Landmarks Dataset v2, We use base config for the first three training stages, and impr config in the fourth training stage, so the whole training contains four stages. And for INSTRE, only one base config training stage is considered.

Start Training

export CUDA_VISIBLE_DEVICES=0,1,2,3
export PYTHONPATH=$PWD
tools/train_net.py --cfg /path/to/config
You might also like...
A library built upon PyTorch for building embeddings on discrete event sequences using self-supervision

pytorch-lifestream a library built upon PyTorch for building embeddings on discrete event sequences using self-supervision. It can process terabyte-si

[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)
[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)

PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision Kehong Gong*, Bingbing Li*, Jianfeng Zhang*, Ta

Leveraging Instance-, Image- and Dataset-Level Information for Weakly Supervised Instance Segmentation

Leveraging Instance-, Image- and Dataset-Level Information for Weakly Supervised Instance Segmentation This paper has been accepted and early accessed

[ArXiv 2021] Data-Efficient Instance Generation from Instance Discrimination
[ArXiv 2021] Data-Efficient Instance Generation from Instance Discrimination

InsGen - Data-Efficient Instance Generation from Instance Discrimination Data-Efficient Instance Generation from Instance Discrimination Ceyuan Yang,

The offcial repository for 'CharacterBERT and Self-Teaching for Improving the Robustness of Dense Retrievers on Queries with Typos', SIGIR2022

CharacterBERT-DR The offcial repository for CharacterBERT and Self-Teaching for Improving the Robustness of Dense Retrievers on Queries with Typos, Sh

IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020)
IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020)

This repo is the official implementation of our paper "Instance Adaptive Self-training for Unsupervised Domain Adaptation". The purpose of this repo is to better communicate with you and respond to your questions. This repo is almost the same with Another-Version, and you can also refer to that version.

Official implementation of "Not only Look, but also Listen: Learning Multimodal Violence Detection under Weak Supervision" ECCV2020

XDVioDet Official implementation of "Not only Look, but also Listen: Learning Multimodal Violence Detection under Weak Supervision" ECCV2020. The proj

Code for the ICML 2021 paper:
Code for the ICML 2021 paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision"

ViLT Code for the paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision" Install pip install -r requirements.txt pip

Code for the ICML 2021 paper:
Code for the ICML 2021 paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision"

ViLT Code for the paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision" Install pip install -r requirements.txt pip

Comments
  • Questions to reproduce the results

    Questions to reproduce the results

    Hello, I am trying to reproduce results using gldv2. Could you please let me know if the following steps for each stage of training is correct? Also, I have completed the first stage of training but the s1_r101_model.pth file(checkpoint) was not generated(which i could use for Stage 2 of training to provide the parameter for 'pretrain'). Am I going wrong somewhere?

    Stage 1 export CUDA_VISIBLE_DEVICES=0,1,2,3 export PYTHONPATH=$PWD

    python3 tools/compute_candidate_pool.py --cfg configs/gldv2/base_stage1.yaml --task feature --dataset gldv2 --name s0_r101 --pretrain imagenet python3 tools/compute_candidate_pool.py --task neighbor --dataset gldv2 --name s0_r101 python3 tools/train_net.py --cfg /home/nitin/workspace/insclr/configs/gldv2/base_stage1.yaml

    Stage 2

    export CUDA_VISIBLE_DEVICES=0,1,2,3 export PYTHONPATH=$PWD

    python3 tools/compute_candidate_pool.py --cfg configs/gldv2/base_stage2.yaml --task feature --dataset gldv2 --name s1_r101 --pretrain imagenet python3 tools/compute_candidate_pool.py --task neighbor --dataset gldv2 --name s1_r101 python3 tools/train_net.py --cfg /home/nitin/workspace/insclr/configs/gldv2/base_stage2.yaml

    Stage 3

    export CUDA_VISIBLE_DEVICES=0,1,2,3 export PYTHONPATH=$PWD

    python3 tools/compute_candidate_pool.py --cfg configs/gldv2/base_stage3.yaml --task feature --dataset gldv2 --name s2_r101 --pretrain imagenet python3 tools/compute_candidate_pool.py --task neighbor --dataset gldv2 --name s2_r101 python3 tools/train_net.py --cfg /home/nitin/workspace/insclr/configs/gldv2/base_stage3.yaml

    Stage 4 - impr

    export CUDA_VISIBLE_DEVICES=0,1,2,3 export PYTHONPATH=$PWD

    python3 tools/compute_candidate_pool.py --cfg configs/gldv2/impr.yaml --task feature --dataset gldv2 --name s3_r101 --pretrain imagenet python3 tools/compute_candidate_pool.py --task neighbor --dataset gldv2 --name s3_r101 python3 tools/train_net.py --cfg /home/nitin/workspace/insclr/configs/gldv2/impr.yaml

    opened by nitinnandansingh 0
  • fail to reproduce

    fail to reproduce

    Hi, I am reproducing the work. Following the readme, I train the resnet101 with default settings except for a little path changes.

    However, the evaluation results on ROxford(no 1M distractors) is too poor, and I get mAP_E < 70, mAP_M < 50 and mAP_H < 20。Similar things on the RParis evaluation.

    opened by IQ17 9
Owner
Zelu Deng
Zelu Deng
Improving Transferability of Representations via Augmentation-Aware Self-Supervision

Improving Transferability of Representations via Augmentation-Aware Self-Supervision Accepted to NeurIPS 2021 TL;DR: Learning augmentation-aware infor

hankook 38 Sep 16, 2022
DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision

The Official PyTorch Implementation of DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision

Shiyi Lan 3 Oct 15, 2021
The PyTorch implementation of DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision.

DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision The PyTorch implementation of DiscoBox: Weakly Supe

Shiyi Lan 1 Oct 23, 2021
Image-retrieval-baseline - MUGE Multimodal Retrieval Baseline

MUGE Multimodal Retrieval Baseline This repo is implemented based on the open_cl

null 47 Dec 16, 2022
[EMNLP 2021] MuVER: Improving First-Stage Entity Retrieval with Multi-View Entity Representations

MuVER This repo contains the code and pre-trained model for our EMNLP 2021 paper: MuVER: Improving First-Stage Entity Retrieval with Multi-View Entity

null 24 May 30, 2022
Code for 'Single Image 3D Shape Retrieval via Cross-Modal Instance and Category Contrastive Learning', ICCV 2021

CMIC-Retrieval Code for Single Image 3D Shape Retrieval via Cross-Modal Instance and Category Contrastive Learning. ICCV 2021. Introduction In this wo

null 42 Nov 17, 2022
Instance-level Image Retrieval using Reranking Transformers

Instance-level Image Retrieval using Reranking Transformers Fuwen Tan, Jiangbo Yuan, Vicente Ordonez, ICCV 2021. Abstract Instance-level image retriev

UVA Computer Vision 87 Jan 3, 2023
Self-training with Weak Supervision (NAACL 2021)

This repo holds the code for our weak supervision framework, ASTRA, described in our NAACL 2021 paper: "Self-Training with Weak Supervision"

Microsoft 148 Nov 20, 2022
Official PyTorch code for CVPR 2020 paper "Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision"

Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision https://arxiv.org/abs/2003.00393 Abstract Active learning (AL) aims to min

Denis 29 Nov 21, 2022
Code release for SLIP Self-supervision meets Language-Image Pre-training

SLIP: Self-supervision meets Language-Image Pre-training What you can find in this repo: Pre-trained models (with ViT-Small, Base, Large) and code to

Meta Research 621 Dec 31, 2022