Code Monkey home page Code Monkey logo

image_navigation_python's Introduction

Python demo for our CVPR'2019 paper

Mapping, Localization and Path Planning for Image-based Navigation using Visual Features and Map

This code was tested with Python 3.8 and mosek 9.2.29. The easiest way to install mosek is:

conda install -c mosek mosek

Please, execute 'demo.py' to view our demo.

This demo does the following using the concepts introduced in our paper:

  1. Find landmarks in a subsequence of the Oxford Robotcar run from 2015-10-29 12:18:17
  2. Match a short query sequence from 2014-11-18 13:20:12

The precalculated feature distances in this demo are based on features extracted with a VGG-16 + NetVLAD + whitening network. We use the Off-the-shelf on Pitts30k model available on the NetVLAD project page in combination with this NetVLAD TensorFlow implementation.

If you do not have mosek installed, you can have a look at the saved figures in the results folder instead.

The produced outputs are:

  • Scatter plot of original reference and query sequences
  • Topology of reference sequence used for finding landmarks with network flow
  • Selected landmarks
  • Accuracy vs. distance plot of the final matching

image_navigation_python's People

Contributors

janinethoma avatar

Stargazers

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

Watchers

 avatar

image_navigation_python's Issues

Problem with sampling

Hi, Janine

I've tried the code just running demo.py and everything goes fine.
Then, just to check the sampling, I renamed the temp.pickle and rerun the demo.

Then, this error arised:

  File "demo_COLD.py", line 191, in <module>
    main()
  File "demo_COLD.py", line 135, in main
    flow_lm = sample_with_flow(ref['xy'], edges, source_idx, sink_idx, geo_dists, feat_dists, num_landmarks)
  File ..., line 103, in sample_with_flow
    M.constraint(stack, mf.Domain.inRotatedQCone().axis(2))  # Each row is in a rotated quadratic cone
  File "/usr/local/lib/python3.7/dist-packages/mosek/fusion/impl/_implementation.py", line 3554, in constraint
    return self._constraint_Lmosek_4fusion_4Expression_2Lmosek_4fusion_4ConeDomain_2(*args)
  File "/usr/local/lib/python3.7/dist-packages/mosek/fusion/impl/_implementation.py", line 6184, in _constraint_Lmosek_4fusion_4Expression_2Lmosek_4fusion_4ConeDomain_2
    return (self.__constraint_1_SLmosek_4fusion_4Expression_2Lmosek_4fusion_4ConeDomain_2("",_0,_1))
  File "/usr/local/lib/python3.7/dist-packages/mosek/fusion/impl/_implementation.py", line 7668, in __constraint_1_SLmosek_4fusion_4Expression_2Lmosek_4fusion_4ConeDomain_2
    _22=_19[_21]
IndexError: index 2 is out of bounds for axis 0 with size 2

The trouble line was the line 103 in sample_with_flow.py:
M.constraint(stack, mf.Domain.inRotatedQCone().axis(2)) # Each row is in a rotated quadratic cone

Checking the dimensions of the variable stack, its shape is [898588, 3].
So, to solve the problem, I think you have to set:

M.constraint(stack, mf.Domain.inRotatedQCone().axis(**1**)) # Each row is in a rotated quadratic cone

Regards

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.