All Projects → mihaidusmanu → D2 Net

mihaidusmanu / D2 Net

Licence: other
D2-Net: A Trainable CNN for Joint Description and Detection of Local Features

Projects that are alternatives of or similar to D2 Net

Natural Language Processing With Tensorflow
Natural Language Processing with TensorFlow, published by Packt
Stars: ✭ 222 (-50.45%)
Mutual labels:  jupyter-notebook, cnn
Image Captioning
Image Captioning using InceptionV3 and beam search
Stars: ✭ 290 (-35.27%)
Mutual labels:  jupyter-notebook, cnn
Pytorch Sentiment Analysis
Tutorials on getting started with PyTorch and TorchText for sentiment analysis.
Stars: ✭ 3,209 (+616.29%)
Mutual labels:  jupyter-notebook, cnn
Style transfer
CNN image style transfer 🎨.
Stars: ✭ 210 (-53.12%)
Mutual labels:  jupyter-notebook, cnn
Learning Deep Learning
Paper reading notes on Deep Learning and Machine Learning
Stars: ✭ 388 (-13.39%)
Mutual labels:  jupyter-notebook, cnn
Tcdf
Temporal Causal Discovery Framework (PyTorch): discovering causal relationships between time series
Stars: ✭ 217 (-51.56%)
Mutual labels:  jupyter-notebook, cnn
Pytorch Image Classification
Tutorials on how to implement a few key architectures for image classification using PyTorch and TorchVision.
Stars: ✭ 272 (-39.29%)
Mutual labels:  jupyter-notebook, cnn
Pratik Derin Ogrenme Uygulamalari
Çeşitli kütüphaneler kullanılarak Türkçe kod açıklamalarıyla TEMEL SEVİYEDE pratik derin öğrenme uygulamaları.
Stars: ✭ 200 (-55.36%)
Mutual labels:  jupyter-notebook, cnn
Human Activity Recognition Using Cnn
Convolutional Neural Network for Human Activity Recognition in Tensorflow
Stars: ✭ 382 (-14.73%)
Mutual labels:  jupyter-notebook, cnn
Fast Pytorch
Pytorch Tutorial, Pytorch with Google Colab, Pytorch Implementations: CNN, RNN, DCGAN, Transfer Learning, Chatbot, Pytorch Sample Codes
Stars: ✭ 346 (-22.77%)
Mutual labels:  jupyter-notebook, cnn
3d Mri Brain Tumor Segmentation Using Autoencoder Regularization
Keras implementation of the paper "3D MRI brain tumor segmentation using autoencoder regularization" by Myronenko A. (https://arxiv.org/abs/1810.11654).
Stars: ✭ 209 (-53.35%)
Mutual labels:  jupyter-notebook, cnn
Pytorch classification
利用pytorch实现图像分类的一个完整的代码,训练,预测,TTA,模型融合,模型部署,cnn提取特征,svm或者随机森林等进行分类,模型蒸馏,一个完整的代码
Stars: ✭ 395 (-11.83%)
Mutual labels:  jupyter-notebook, cnn
Screenshot To Code
A neural network that transforms a design mock-up into a static website.
Stars: ✭ 13,561 (+2927.01%)
Mutual labels:  jupyter-notebook, cnn
Deform conv pytorch
PyTorch Implementation of Deformable Convolution
Stars: ✭ 217 (-51.56%)
Mutual labels:  jupyter-notebook, cnn
Raspberrypi Facedetection Mtcnn Caffe With Motion
MTCNN with Motion Detection, on Raspberry Pi with Love
Stars: ✭ 204 (-54.46%)
Mutual labels:  jupyter-notebook, cnn
Embeddedsystem
📚 嵌入式系统基础知识与主流编程语言相关内容总结
Stars: ✭ 266 (-40.62%)
Mutual labels:  jupyter-notebook, cnn
Cnn Re Tf
Convolutional Neural Network for Multi-label Multi-instance Relation Extraction in Tensorflow
Stars: ✭ 190 (-57.59%)
Mutual labels:  jupyter-notebook, cnn
Deep Learning With Python
Deep learning codes and projects using Python
Stars: ✭ 195 (-56.47%)
Mutual labels:  jupyter-notebook, cnn
Numpy neural network
仅使用numpy从头开始实现神经网络,包括反向传播公式推导过程; numpy构建全连接层、卷积层、池化层、Flatten层;以及图像分类案例及精调网络案例等,持续更新中... ...
Stars: ✭ 339 (-24.33%)
Mutual labels:  jupyter-notebook, cnn
Nmtpytorch
Sequence-to-Sequence Framework in PyTorch
Stars: ✭ 392 (-12.5%)
Mutual labels:  jupyter-notebook, cnn

D2-Net: A Trainable CNN for Joint Detection and Description of Local Features

This repository contains the implementation of the following paper:

"D2-Net: A Trainable CNN for Joint Detection and Description of Local Features".
M. Dusmanu, I. Rocco, T. Pajdla, M. Pollefeys, J. Sivic, A. Torii, and T. Sattler. CVPR 2019.

Paper on arXiv, Project page

Getting started

Python 3.6+ is recommended for running our code. Conda can be used to install the required packages:

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
conda install h5py imageio imagesize matplotlib numpy scipy tqdm

Downloading the models

The off-the-shelf Caffe VGG16 weights and their tuned counterpart can be downloaded by running:

mkdir models
wget https://dsmn.ml/files/d2-net/d2_ots.pth -O models/d2_ots.pth
wget https://dsmn.ml/files/d2-net/d2_tf.pth -O models/d2_tf.pth
wget https://dsmn.ml/files/d2-net/d2_tf_no_phototourism.pth -O models/d2_tf_no_phototourism.pth

Update - 23 May 2019 We have added a new set of weights trained on MegaDepth without the PhotoTourism scenes (sagrada_familia - 0019, lincoln_memorial_statue - 0021, british_museum - 0024, london_bridge - 0025, us_capitol - 0078, mount_rushmore - 1589). Our initial results show similar performance. In order to use these weights at test time, you should add --model_file models/d2_tf_no_phototourism.pth.

Feature extraction

extract_features.py can be used to extract D2 features for a given list of images. The singlescale features require less than 6GB of VRAM for 1200x1600 images. The --multiscale flag can be used to extract multiscale features - for this, we recommend at least 12GB of VRAM.

The output format can be either npz or mat. In either case, the feature files encapsulate three arrays:

  • keypoints [N x 3] array containing the positions of keypoints x, y and the scales s. The positions follow the COLMAP format, with the X axis pointing to the right and the Y axis to the bottom.
  • scores [N] array containing the activations of keypoints (higher is better).
  • descriptors [N x 512] array containing the L2 normalized descriptors.
python extract_features.py --image_list_file images.txt (--multiscale)

Feature extraction with kapture datasets

Kapture is a pivot file format, based on text and binary files, used to describe SFM (Structure From Motion) and more generally sensor-acquired data.

It is available at https://github.com/naver/kapture. It contains conversion tools for popular formats and several popular datasets are directly available in kapture.

It can be installed with:

pip install kapture

Datasets can be downloaded with:

kapture_download_dataset.py update
kapture_download_dataset.py list
# e.g.: install mapping and query of Extended-CMU-Seasons_slice22
kapture_download_dataset.py install "Extended-CMU-Seasons_slice22_*"

If you want to convert your own dataset into kapture, please find some examples here.

Once installed, you can extract keypoints for your kapture dataset with:

python extract_kapture.py --kapture-root pathto/yourkapturedataset (--multiscale)

Run python extract_kapture.py --help for more information on the extraction parameters.

Tuning on MegaDepth

The training pipeline provided here is a PyTorch implementation of the TensorFlow code that was used to train the model available to download above.

Update - 05 June 2019 We have fixed a bug in the dataset preprocessing - retraining now yields similar results to the original TensorFlow implementation.

Update - 07 August 2019 We have released an updated, more accurate version of the training dataset - training is more stable and significantly faster for equal performance.

Downloading and preprocessing the MegaDepth dataset

For this part, COLMAP should be installed. Please refer to the official website for installation instructions.

After downloading the entire MegaDepth dataset (including SfM models), the first step is generating the undistorted reconstructions. This can be done by calling undistort_reconstructions.py as follows:

python undistort_reconstructions.py --colmap_path /path/to/colmap/executable --base_path /path/to/megadepth

Next, preprocess_megadepth.sh can be used to retrieve the camera parameters and compute the overlap between images for all scenes.

bash preprocess_undistorted_megadepth.sh /path/to/megadepth /path/to/output/folder

In case you prefer downloading the undistorted reconstructions and aggregated scene information folder directly, you can find them here - Google Drive. You will still need to download the depth maps ("MegaDepth v1 Dataset") from the MegaDepth website.

Training

After downloading and preprocessing MegaDepth, the training can be started right away:

python train.py --use_validation --dataset_path /path/to/megadepth --scene_info_path /path/to/preprocessing/output

BibTeX

If you use this code in your project, please cite the following paper:

@InProceedings{Dusmanu2019CVPR,
    author = {Dusmanu, Mihai and Rocco, Ignacio and Pajdla, Tomas and Pollefeys, Marc and Sivic, Josef and Torii, Akihiko and Sattler, Torsten},
    title = {{D2-Net: A Trainable CNN for Joint Detection and Description of Local Features}},
    booktitle = {Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition},
    year = {2019},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].