Coder Social home page Coder Social logo

konstantinpakulev / ness-st Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22.98 MB

The official code release for NeSS-ST: Detecting Good and Stable Keypoints with a Neural Stability Score and the Shi-Tomasi detector

Dockerfile 0.01% Python 1.86% Jupyter Notebook 98.10% Shell 0.03%

ness-st's Introduction

NeSS-ST: Detecting Good and Stable Keypoints with a Neural Stability Score and the Shi-Tomasi Detector

Table of contents

  1. Installation
  2. Datasets
  3. Models
  4. Scripts
  5. Results

Installation

To ease reproducibility of our results, we provide all dependencies in a Docker container. Launching of scripts and running Jupyter notebooks is done from the container.

Firstly, clone the respository:

git clone https://github.com/KonstantinPakulev/NeSS-ST

Then build a Docker image:

cd NeSS-ST
docker build . -t nessst

Next, run the container in the detached mode and enter it:

docker run -p 8888:8888 -p 6006:6006 --hostname $HOSTNAME -v $PATHTONESSST:/home/konstantin/personal/Summertime -v $PATHTODATASETS:/mnt/sda --shm-size=16384m --gpus all -dit nessst
docker exec -it $CONTAINERID bash

Datasets

The project expects all datasets to be stored in $PATHTODATASETS/datasets folder. We describe steps required to prepare each of the datasets to be used by our pipeline. If you don't follow the naming conventions, you will need to modify configuration files in config on your own.

HPatches

Downdload the sequences, unpack and place them in $PATHTODATASETS/datasets/HPatches:

wget http://icvl.ee.ic.ac.uk/vbalnt/hpatches/hpatches-sequences-release.tar.gz
tar xvzf hpatches-sequences-release.tar.gz
mv hpatches-sequences-release $PATHTODATASETS/datasets/HPatches

You can download the data splits that we use from here and put them in the HPatches directory, or you can generate the splits yourself by using the code from a Jupyter notebook.

IMC-PT

Download validation and test sequences, unpack and place them in $PATHTODATASETS/datasets/IMCPT:

wget https://www.cs.ubc.ca/research/kmyi_data/imw2020/ValidationData/imw2020-valid.tar.gz
tar xvzf imw2020-valid.tar.gz
mv imw2020-valid/* $PATHTODATASETS/datasets/IMCPT

wget https://www.cs.ubc.ca/research/kmyi_data/imw2020/TestData/imw2020-test.tar.gz
tar xvzf imw2020-test.tar.gz
mv imw2020-test/* $PATHTODATASETS/datasets/IMCPT

You can download the data splits that we use from here and put them in the IMCPT directory, or you can generate the splits yourself by using the code from a Jupyter notebook.

MegaDepth

Download the dataset, unpack and place it in $PATHTODATASETS/datasets/MegaDepth:

wget http://www.cs.cornell.edu/projects/megadepth/dataset/Megadepth_v1/MegaDepth_v1.tar.gz
tar xvzf MegaDepth_v1.tar.xz
mv MegaDepth_v1 $PATHTODATASETS/datasets/MegaDepth/MegaDepth_v1

wget http://www.cs.cornell.edu/projects/megadepth/dataset/MegaDepth_SfM/MegaDepth_SfM_v1.tar.xz
tar xvzf MegaDepth_SfM_v1.tar.xz
mv MegaDepth_SfM_v1 $PATHTODATASETS/datasets/MegaDepth/MegaDepth_SfM_v1

We use the code from the D2-Net repository for processing MegaDepth:

cd source/datasets/megadepth/preprocessing/base
sh create_reconstruction.sh
sh preprocess_undistorted_megadepth.sh

You can download the data splits that we use from here and put them in the MegaDepth/SceneInfo directory, or you can generate the splits yourself by using the code from a Jupyter notebook. If you choose the latter option, you will need to download the MegaDepth splits file used by DISK and put it into the $PATHTODATASETS/datasets/MegaDepth/SceneInfo directory:

wget https://datasets.epfl.ch/disk-data/megadepth/dataset.json
mv dataset.json $PATHTODATASETS/datasets/MegaDepth/SceneInfo/disk_dataset.json

ScanNet

Download the entire ScanNet release using the script provided by the authors and place it in $PATHTODATASETS/datasets/ScanNet.

We use the code from the ScanNet repository for processing ScanNet:

cd source/datasets/scannet/preprocessing/base
sh unpack.sh

You can download the data splits that we use from here and put them in the ScanNet directory, or you can generate the splits yourself by using the code from a Jupyter notebook.

Models

We provide checkpoints in the format that is compatible with the pipeline for all models used in the evaluation (excluding ablations). Download the checkpoints from here and unpack it in the root of the project, i.e. as $PATHTONESSST/runs. Our model is located at runs/models/shiness/checkpoints/model_r_mAA=0.7706.pt. Checkpoints for models used in ablations will be provided on request.

We provide a standalone script that can run inference of NeSS-ST on an image for those who need a minimal working example.

Scripts

We use Hydra for configuration management. Hydra commands are composed via python scripts that automate loading of required configurations. Execution of tasks is done by bash scripts that call python scripts with specified Hydra commands.

scripts/ICCV2023 contains scripts for hyper-parameters (lowe ratio, inlier threshold) tuning and testing:

  1. Homography estimation and classical metrics of HPatches
  2. Fundamental matrix estimation and hyper-parameters tuning on IMC-PT
  3. Fundamental matrix estimation on MegaDepth
  4. Essential matrix estimation and hyper-parameters tuning on ScanNet

Additionally, we provide scripts for running ablations:

  1. Influence of thresholding on SS-ST and RS-ST
  2. Base detector ablation
  3. Evaluation with different number of keypoints

And the script for training, tuning and testing of models proposed in the paper.

Results

The visualization of the results is done via Jupyter notebooks:

  1. Evaluation and hyper-parameters tuning on HPatches
  2. Evaluation, hyper-parameters tuning and models sizes and inference time on IMC-PT
  3. Evaluation and examples of loss functions on MegaDepth
  4. Evaluation and hyper-parameters tuning on ScanNet

Citation

@inproceedings{pakulev2023nessst,
  author    = {Pakulev, Konstantin and Vakhitov, Alexander and Ferrer, Gonzalo},
  title     = {NeSS-ST: Detecting Good and Stable Keypoints with a Neural Stability Score and the Shi-Tomasi detector},
  booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  month     = {October},
  year      = {2023},
  pages     = {9578-9588}
}

ness-st's People

Contributors

konstantinpakulev avatar

Watchers

 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.