《Dual-Resolution Correspondence Network》(NeurIPS 2020)

Overview

Dual-Resolution Correspondence Network

Dual-Resolution Correspondence Network, NeurIPS 2020

Dependency

All dependencies are included in asset/dualrcnet.yml. You need to install conda first, and then run

conda env create --file asset/dualrcnet.yml 

To activate the environment, run

conda activate dualrcnet

Preparing data

We train our model on MegaDepth dataset. To prepare for the data, you need to download the MegaDepth SfM models from the MegaDepth website and download training_pairs.txt and validation_pairs.txt from this link. Then place both training_pairs.txt and validation_pairs.txt files under the downloaded directory MegaDepth_v1_SfM.

Training

After downloading the training data, run

python train.py --training_file path/to/training_pairs.txt --validation_file path/to/validation_pairs.txt --image_path path/to/MegaDepth_v1_SfM

Pre-trained model

We also provide our pre-trained model. You can download dualrc-net.pth.tar from this link and place it under the directory trained_models.

Evaluation on HPatches

The dataset can be downloaded from HPatches repo. You need to download HPatches full sequences.
After downloading the dataset, then:

  1. Browse to HPatches/
  2. Run python eval_hpatches.py --checkpoint path/to/model --root path/to/parent/directory/of/hpatches_sequences. This will generate a text file which stores the result in current directory.
  3. Open draw_graph.py. Change relevent path accordingly and run the script to draw the result.

We provide results of DualRC-Net alongside with results of other methods in directory cache-top.

Evaluation on InLoc

In order to run the InLoc evaluation, you first need to clone the InLoc demo repo, and download and compile all the required depedencies. Then:

  1. Browse to inloc/.
  2. Run python eval_inloc_extract.py adjusting the checkpoint and experiment name. This will generate a series of matches files in the inloc/matches/ directory that then need to be fed to the InLoc evaluation Matlab code.
  3. Modify the inloc/eval_inloc_compute_poses.m file provided to indicate the path of the InLoc demo repo, and the name of the experiment (the particular directory name inside inloc/matches/), and run it using Matlab.
  4. Use the inloc/eval_inloc_generate_plot.m file to plot the results from shortlist file generated in the previous stage: /your_path_to/InLoc_demo_old/experiment_name/shortlist_densePV.mat. Precomputed shortlist files are provided in inloc/shortlist.

Evaluation on Aachen Day-Night

In order to run the Aachen Day-Night evaluation, you first need to clone the Visualization benchmark repo, and download and compile all the required depedencies (note that you'll need to compile Colmap if you have not done so yet). Then:

  1. Browse to aachen_day_and_night/.
  2. Run python eval_aachen_extract.py adjusting the checkpoint and experiment name.
  3. Copy the eval_aachen_reconstruct.py file to visuallocalizationbenchmark/local_feature_evaluation and run it in the following way:
python eval_aachen_reconstruct.py 
	--dataset_path /path_to_aachen/aachen 
	--colmap_path /local/colmap/build/src/exe
	--method_name experiment_name
  1. Upload the file /path_to_aachen/aachen/Aachen_eval_[experiment_name].txt to https://www.visuallocalization.net/ to get the results on this benchmark.

BibTex

If you use this code, please cite our paper

@inproceedings{li20dualrc,
 author		= {Xinghui Li and Kai Han and Shuda Li and Victor Prisacariu},
 title   	= {Dual-Resolution Correspondence Networks},
 booktitle 	= {Conference on Neural Information Processing Systems (NeurIPS)},
 year    	= {2020},
}

Acknowledgement

Our code is based on the wonderful code provided by NCNet, Sparse-NCNet and ANC-Net.

Count the MACs / FLOPs of your PyTorch model.

THOP: PyTorch-OpCounter How to install pip install thop (now continously intergrated on Github actions) OR pip install --upgrade git+https://github.co

Ligeng Zhu 3.9k Dec 29, 2022
BrainGNN - A deep learning model for data-driven discovery of functional connectivity

A deep learning model for data-driven discovery of functional connectivity https://doi.org/10.3390/a14030075 Usman Mahmood, Zengin Fu, Vince D. Calhou

Usman Mahmood 3 Aug 28, 2022
ByteTrack(Multi-Object Tracking by Associating Every Detection Box)のPythonでのONNX推論サンプル

ByteTrack-ONNX-Sample ByteTrack(Multi-Object Tracking by Associating Every Detection Box)のPythonでのONNX推論サンプルです。 ONNXに変換したモデルも同梱しています。 変換自体を試したい方はByteT

KazuhitoTakahashi 16 Oct 26, 2022
Pytorch implementation of the paper: "SAPNet: Segmentation-Aware Progressive Network for Perceptual Contrastive Image Deraining"

SAPNet This repository contains the official Pytorch implementation of the paper: "SAPNet: Segmentation-Aware Progressive Network for Perceptual Contr

11 Oct 17, 2022
Recovering Brain Structure Network Using Functional Connectivity

Recovering-Brain-Structure-Network-Using-Functional-Connectivity Framework: Papers: This repository provides a PyTorch implementation of the models ad

5 Nov 30, 2022
Supervised Contrastive Learning for Downstream Optimized Sequence Representations

SupCL-Seq 📖 Supervised Contrastive Learning for Downstream Optimized Sequence representations (SupCS-Seq) accepted to be published in EMNLP 2021, ext

Hooman Sedghamiz 18 Oct 21, 2022
Source code of D-HAN: Dynamic News Recommendation with Hierarchical Attention Network

D-HAN The source code of D-HAN This is the source code of D-HAN: Dynamic News Recommendation with Hierarchical Attention Network. However, only the co

30 Sep 22, 2022
CausaLM: Causal Model Explanation Through Counterfactual Language Models

CausaLM: Causal Model Explanation Through Counterfactual Language Models Authors: Amir Feder, Nadav Oved, Uri Shalit, Roi Reichart Abstract: Understan

Amir Feder 39 Jul 10, 2022
DRIFT is a tool for Diachronic Analysis of Scientific Literature.

About DRIFT is a tool for Diachronic Analysis of Scientific Literature. The application offers user-friendly and customizable utilities for two modes:

Rajaswa Patil 108 Dec 12, 2022
codebase for "A Theory of the Inductive Bias and Generalization of Kernel Regression and Wide Neural Networks"

Eigenlearning This repo contains code for replicating the experiments of the paper A Theory of the Inductive Bias and Generalization of Kernel Regress

Jamie Simon 45 Dec 02, 2022
HAR-stacked-residual-bidir-LSTMs - Deep stacked residual bidirectional LSTMs for HAR

HAR-stacked-residual-bidir-LSTM The project is based on this repository which is presented as a tutorial. It consists of Human Activity Recognition (H

Guillaume Chevalier 287 Dec 27, 2022
This is the solution for 2nd rank in Kaggle competition: Feedback Prize - Evaluating Student Writing.

Feedback Prize - Evaluating Student Writing This is the solution for 2nd rank in Kaggle competition: Feedback Prize - Evaluating Student Writing. The

Udbhav Bamba 41 Dec 14, 2022
A library for performing coverage guided fuzzing of neural networks

TensorFuzz: Coverage Guided Fuzzing for Neural Networks This repository contains a library for performing coverage guided fuzzing of neural networks,

Brain Research 195 Dec 28, 2022
Diffgram - Supervised Learning Data Platform

Data Annotation, Data Labeling, Annotation Tooling, Training Data for Machine Learning

Diffgram 1.6k Jan 07, 2023
Boundary-preserving Mask R-CNN (ECCV 2020)

BMaskR-CNN This code is developed on Detectron2 Boundary-preserving Mask R-CNN ECCV 2020 Tianheng Cheng, Xinggang Wang, Lichao Huang, Wenyu Liu Video

Hust Visual Learning Team 178 Nov 28, 2022
Implementation of GeoDiff: a Geometric Diffusion Model for Molecular Conformation Generation (ICLR 2022).

GeoDiff: a Geometric Diffusion Model for Molecular Conformation Generation [OpenReview] [arXiv] [Code] The official implementation of GeoDiff: A Geome

Minkai Xu 155 Dec 26, 2022
Official PyTorch implemention of our paper "Learning to Rectify for Robust Learning with Noisy Labels".

WarPI The official PyTorch implemention of our paper "Learning to Rectify for Robust Learning with Noisy Labels". Run python main.py --corruption_type

Haoliang Sun 3 Sep 03, 2022
Neural Caption Generator with Attention

Neural Caption Generator with Attention Tensorflow implementation of "Show

Taeksoo Kim 510 Nov 30, 2022
Meli Data Challenge 2021 - First Place Solution

My solution for the Meli Data Challenge 2021

Matias Moreyra 23 Mar 09, 2022
Kaggle-titanic - A tutorial for Kaggle's Titanic: Machine Learning from Disaster competition. Demonstrates basic data munging, analysis, and visualization techniques. Shows examples of supervised machine learning techniques.

Kaggle-titanic This is a tutorial in an IPython Notebook for the Kaggle competition, Titanic Machine Learning From Disaster. The goal of this reposito

Andrew Conti 800 Dec 15, 2022