项目作者: hyenal

项目描述 :
Official repository of 'Co-Attention for Conditioned Image Matching'
高级语言: Python
项目地址: git://github.com/hyenal/coam.git
创建时间: 2021-05-23T18:21:33Z
项目社区:https://github.com/hyenal/coam

开源协议:

下载


Co-Attention for Conditioned Image Matching

This repository contains the official implementation of:

Co-Attention for Conditioned Image Matching

CoAM splash

We provide some training scripts and demos demonstrating our model accompanying the paper.

Installation

To install the required libraries, we used the following non standard libraries (all libraries can be viewed in environment.yml).

Installation using conda:

  1. # Install main environment
  2. conda-env create -f environment.yml
  3. # Activate environment
  4. conda activate d2d_env
  5. # Install custom segmentation library
  6. pip install git+https://github.com/hyenal/segmentation_models.pytorch.git
  7. # Install GPU version
  8. pip install torch==1.4.0+cu92 torchvision==0.5.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html

Note that the last part uses CUDA 9.2, to use another version please visit https://download.pytorch.org/whl/torch_stable.html.

The pretrained models are available at the anonymised google drive link which includes the Eff-Net, ResNet50, and Stylisation.
The pretrained models should be downloaded into the ./pretrainedmodels folder.

Once this has all been done then you can try the quickstart, or download data and either train or evaluate a model.

Quickstart

The demo notebook can be used to see a minimal working example of our model.

Dataset

To use this code, you need to download data from multiple places:

  • MegaDepth
  • HPatches
  • Aachen
  • Sculpture Dataset. Note that here you only need sculptures with ids 1060-1068 (these are the Henry Moore sculptures we evaluated on). Also you need to extract the high resolution images. These were conveniently provided by the author. We will provide these high resolution images upon agreement with the original author.
  • Large Sculpture Dataset. In particular we use three of these sculptures: Madrid Metropolis, Gendarmenmarkt, Tower of London.

Training

We provide a simple train launch file in run.sh. The following command will launch one training on a single GPU:

  1. ./run.sh /path/to/MegaDepth/

Other configs are available in run.sh

Citing

If you use this work for your research please consider citing us:

  1. @inproceedings{Wiles21,
  2. author={Olivia Wiles and Sebastien Ehrhardt and Andrew Zisserman},
  3. title={Co-Attention for Conditioned Image Matching},
  4. year={2021},
  5. conference={CVPR}
  6. }