As part of the mini-project for the Vision Algorithms for Mobile Robotics (VAMR) course at UZH taught by Prof Davide Scaramuzza, we (Abhiram, Adarsh, Jasper and TianYi) implement a monocular Visual Odometry (VO) pipeline on the KITTI, Malaga and Parking datasets.
Our report is here.
- Clone this repository.
- Navigate to the root folder of this repo.
- Run
setup.sh
. It should:- Setup a
conda
environment,vamr_proj
, withrequirements.txt
installed. - Download the datasets from the VAMR course websites. OR Conda environment has been exported as environment.yml
- Setup a
- Try out our examples.
data
: Our example datasets. These comprise a list of images along with the correspondingK
camera intrinsic matrics.Parking
datasetKITTI
datasetMalaga
dataset
code
: Our functions for VONotes
: Some notes we made along the way.main.py
: Our main function. Run this to see the output.
To run our code, just run python3 main.py
in the root folder of this repository.
This will display three plots.
- The top plot shows the image, along with an overlay of the keypoints being tracked as red crosses.
- The bottom left plot shows a history of the poses computed through VO. The red dot is the most recent pose.
- The bottom right plot shows the number of keypoints that have been tracked in the past 20 frames.
To change between datasets, set the DATASET
variable in main.py
. It is a string accepting parking
, kitti
, or malaga
.
Our implementation uses 2D-2D correspondences for VO, and therefore does not provide a pointcloud by default.
To visualise a pointcloud, set the PLOT_POINTCLOUD
variable in main.py
to True
. It will also visualise a point-cloud triangulated from the last few poses.
- The plot on the top left shows a history of the poses computed through VO. The red dot is the most recent pose.
- The plot on the top right shows the image, along with an overlay of the keypoints being tracked as red crosses.
- The plot on the bottom left shows the number of keypoints that have been tracked in the past 20 frames.
- The plot on the bottom right shows:
- the past poses as blue arrows,
- the current pose as a yellow arrow,
- the base pose for triangulation as a red arrow,
- the pose calculated from triangulating poses from the current pose and base pose as a large purple arrow,
- and the pointcloud as green crosses.
Go to the Polybox link here to view our recorded videos.