View Code? Open in Web Editor
NEW
This project forked from chiweihsiao/deepvo-pytorch
PyTorch Implementation of DeepVO
Python 96.52%
Shell 3.48%
deepvo-pytorch's Introduction
- 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/
- 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 memory
img_w
, img_h
: downsample the images to fit to the GPU memory
pin_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 weight can be downloaded here
- Run
test.py
to output predicted pose
- output to
result/
- file name will be like
out_00.txt
- Run
visualize.py
to visualize the prediction of route
- Other files:
model.py
: model is defined here
data_helper.py
: customized PyTorch dataset and sampler
- the input images is loaded batch by batch
- pytorch 0.4.0
- torchvision 0.2.1
- numpy
- pandas
- pillow
- matplotlib
- glob
- Training Sequences
- Testing Sequence