- This is an unofficial PyTorch implementation of ICRA 2017 paper DeepVO: Towards end-to-end visual odometry with deep Recurrent Convolutional Neural Networks
- Model
- Download KITTI data and our pretrained model
- This shell
KITTI/downloader.sh
can be used to download the KITTI images and pretrained model- the shell will only keep the left camera color images (image_03 folder) and delete other data
- the downloaded images will be placed at
KITTI/images/00/
,KITTI/images/01
, ... - the images offered by KITTI is already rectified
- the direct download link of pretrained model
- Download the ground truth pose from KITTI Visual Odometry
- you need to enter your email to request the pose data here
- and place the ground truth pose at
KITTI/pose_GT/
- This shell
- Run 'preprocess.py' to
- remove unused images based on the readme file in KITTI devkit
- convert the ground truth poses from KITTI (12 floats [R|t]) into 6 floats (euler angle + translation)
- and save the transformed ground truth pose into
.npy
file
- Pretrained weight of FlowNet ( CNN part ) can be downloaded here
- note that this pretrained FlowNet model assumes that RGB value range is [-0.5, 0.5]
- the code of CNN layers is modified from ClementPinard/FlowNetPytorch
- Specify the paths and changes hyperparameters in
params.py
- If your computational resource is limited, please be careful with the following arguments:
batch_size
: choose batch size depends on your GPU memoryimg_w
,img_h
: downsample the images to fit to the GPU memorypin_mem
: accelerate the data excahnge between GPU and memory, if your RAM is not large enough, please set to False
- Run
main.py
to train the model- the trained model and optimizer will be saved in
models/
- the records will be saved in
records/
- the trained model and optimizer will be saved in
- Run
test.py
to output predicted pose- output to
result/
- file name will be like
out_00.txt
- output to
- Run
visualize.py
to visualize the prediction of route - Other files:
model.py
: model is defined heredata_helper.py
: customized PyTorch dataset and sampler- the input images is loaded batch by batch
Provided by alexart13.
- pytorch 0.4.0
- torchvision 0.2.1
- numpy
- pandas
- pillow
- matplotlib
- glob
- Training Sequences
- Testing Sequence
- Thanks alexart13 for providing the trained model and the correct code to process ground truth rotation.
- paper
- Sen Wang, Ronald Clark, Hongkai Wen, Niki Trigoni
- ICRA 2017
@inproceedings{wang2017deepvo, title={Deepvo: Towards end-to-end visual odometry with deep recurrent convolutional neural networks}, author={Wang, Sen and Clark, Ronald and Wen, Hongkai and Trigoni, Niki}, booktitle={Robotics and Automation (ICRA), 2017 IEEE International Conference on}, pages={2043--2050}, year={2017}, organization={IEEE} }