Giter VIP home page Giter VIP logo

loip's Introduction

Setup

Dependencies

  1. PyTorch (at least v0.4.0)
  2. Faiss
  3. scipy
  4. tensorboardX

Data

Running this code requires a copy of the 1DSfM (available [here] (http://www.cs.cornell.edu/projects/1dsfm/)) and a copy of the Oxford Buildings Dataset (available [here] (http://www.robots.ox.ac.uk/~vgg/data/oxbuildings/)) and a copy of the Paris Dataset (available [here] (http://www.robots.ox.ac.uk/~vgg/data/parisbuildings/))

The published benchmarks LOIP are currently available at Baidu Cloud, you can download it via https://pan.baidu.com/s/1Tw_JyKd27OY068uGbhQDyg and the extraction code: 1234. A basic data structure is as follows, but, we also provide mesh model and orientation parameters for other photogrammetric tasks.

Dataset Format

image

File Description

|File Name                               |Descriptions
|CheckPoints_crowdsourced                |previously trained models for crowdsourced images
|CheckPoints_photogrammetric             |previously trained models for photogrammetric images
|Alamo.txt                               |image names of Alamo
|Alamo_Alexnet_NetVlad_Split_Match.txt   |Retrieve Top100 of each image for Alamo by Alexnet_NetVlad_Split('query1 top1', 'query1 top2'......)
|Alamo_Alexnet_NetVlad_Split_TopN.mat    |Retrieve Top100 of each image for Alamo by Alexnet_NetVlad_Split('query1 top1 top2 top3'......)
|Alamo.mat                               |image names of query and Database
|crowdsourced/ImageName.txt              |image names of crowdsourced images
|crowdsourced/Test.mat                   |image names of query and TestDatabase, index of TestDatabase and TopN
|crowdsourced/Train.mat                  |image names of query, positive, negative and Database
|oxford/ModelTest.mat                    |image names of query and TestDatabase, index of TopN

Usage

Train

It is necessary to first run ModelTrain.py with the correct settings. After which a model can be trained using:

python ModelTrain.py

The commandline args, the tensorboard data, and the model state will all be saved to runs/, which subsequently can be used for testing or validating.

Validate

To validate a previously trained model on different datasets (replace directory with correct dir for your case). After which we can get mAP, retrieval time and extraction:

python ModelValidate.py

Test

To test a previously trained model on the 1DSfM testset (replace directory with correct dir for your case). After which we can get Top100 for each image in the database:

python ModelTest.py

Results will all be saved to TopN.mat.

Cluster

In order to initialise the NetVlad layer we need to first sample from the data and obtain centroids. This step is necessary for each configuration of the network and for each dataset. To cluster simply run

python cluster.py

Results will all be saved to centroids/.

Citation

If you use our code and datasets, please add a proper reference: { Qianbao Hou, Rui Xia, Jiahuan Zhang, Yu Feng, Zongqian Zhan, Xin Wang, Learning visual overlapping image pairs for SfM via CNN fine-tuning with photogrammetric geometry information, International Journal of Applied Earth Observation and Geoinformation, Volume 116, 2023, 103162, ISSN 1569-8432, https://doi.org/10.1016/j.jag.2022.103162. }

Any question can be sent to [email protected]

loip's People

Contributors

xwangsgg avatar

Forkers

flyinggh

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.