GithubHelp home page GithubHelp logo

lu-feng / sta-vpr Goto Github PK

View Code? Open in Web Editor NEW
49.0 1.0 1.0 2.24 MB

This repository contains code for our RA-L & ICRA2021 paper "STA-VPR: Spatio-temporal Alignment for Visual Place Recognition" by Feng Lu, Baifan Chen, Xiang-Dong Zhou, and Dezhen Song.

Python 100.00%

sta-vpr's Introduction

STA-VPR

This repository provides the code for the IEEE RA-L paper "STA-VPR: Spatio-temporal Alignment for Visual Place Recognition" by Feng Lu, Baifan Chen, Xiang-Dong Zhou, and Dezhen Song. The arXiv pre-print can be found here.

spatial_alignment_sample

Installation

  • Python =3.5
  • cuda =9.0
  • Numba =0.44.1
  • PyTorch =1.1
  • Keras =2.2.4
  • TensorFlow =1.10
  • scikit-learn =0.19

The Keras and TensorFlow are only required by the VGG16 model (will be downloaded when you run the code). You can just install PyTorch if you only need to use the DenseNet161 model.

Steps

  • Download the DenseNet161 model pretrained on Places365 and copy them to the STA-VPR folder. Note that if you use this pretrained model, please see the License required by Places365.
  • You will need to update the configuration file "STAVPRconfig.yaml" changing some information, such as the file pathes of your images, model name, and so on. File names of images are expected in the format ImageXXX.jpg (e.g. Image000.jpg). You can modify the expected format in vgg.py (Line 25 and 42) and densenet.py (Line 81 and 100).
  • Run the 'STAVPRdemo.py' to get the matched result of all query sequences, F-score and PR curve. If you don't want to install Numba. You can change "STAVPR" in Line 19 in STAVPRdemo.py to "STAVPR_nonumba", to run the version without Numba (this version is not optimized and very time-consuming).
python3 STAVPRdemo.py
  • STAVPRdemo.py will output a file "test.txt" that records the distance matrix between reference data and query data (you can comment out Line 176 if don't need it), but not output temporal alignment between query seq and matched result seq. If you want know the alignment between a query seq and its matched seq, you can run the "temporal_align.py". (input parameter: -s: the start ID of query seq; -l: the length of query seq; -n: the file path+name of the distance matrix.)
python3 temporal_align.py -s 180 -l 20 -n test.txt
  • In addition. If you want know the spatial alignment between two images, you can run the "spatial_align.py". (input parameter: -x: the path+name of the image X; -y: the path+name of the image Y.)
python3 spatial_align.py -x ./images/left.jpg -y ./images/right.jpg

Datasets

The datasets used in this work:

*The images of this Nordland dataset has been resized, and the experimental result may be slightly different from that reported in our paper.

Citation

If you find this code or our work helpful for your research, please cite the following paper:

@ARTICLE{stavpr,
author={F. {Lu} and B. {Chen} and X. -D. {Zhou} and D. {Song}},
journal={IEEE Robotics and Automation Letters},
title={STA-VPR: Spatio-Temporal Alignment for Visual Place Recognition},
year={2021},
volume={6},
number={3},
pages={4297-4304},
doi={10.1109/LRA.2021.3067623}
}

sta-vpr's People

Contributors

lu-feng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

doublepoints

sta-vpr's Issues

Datasets

Hi, Lu Feng! Could you tell me where I can download the datasets for this code? Like Nordland, Gardens Point, UA, and Berlin A100.

Thanks.

Questions about code results

Hi, Lu Feng! I'm very interested in your work. But when I run the 'STAVPRdemo.py', it's not like the good performance showed in your paper. Could you tell why, and how can modify code parameters?

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.