Re3: Real-Time Recurrent Regression Networks for Visual Tracking of Generic Objects
This is the Official Repository for Re3 in PyTorch. However, it has some significant differences between it and the TensorFlow repository.
- Due to PyTorch's dynamic graph construction, the network can now be trained one unroll at a time. This means less time preprocessing the images, but also it doesn't parallelize as well.
- The simulation code is removed as it does not work with this one unroll setup.
- The code is Python 3 compatible and encouraged.
I have switched from virtualenv to Anaconda because it allows for easier CUDA integration. The setup is much the same as in the TensorFlow version.
conda create -n re3-pytorch-env python=3.6.8
conda env update -n re3-pytorch-env -f env.yml
The model weights we used in our paper were ported from Caffe to Tensorflow and then to PyTorch. There may be slight differences in performance from the original paper.
Weights can be downloaded by running sh download_weights_large.sh
A smaller network trained in PyTorch is also available. Its performance is wors, but it is significantly faster.
These weights can be downloaded by running sh download_weights_small.sh
.
Additionally, set USE_SMALL_NET = True
in constants.py.
- Download the pretrained weights
- Run
python demo/image_demo.py
- tracker/re3_tracker.py - The tracker file for actually tracking objects.
- tracker/network.py - The network file specifying the layout of Re3.
- constants.py - A place to put constants that are used in multiple files such as image size and log location.
Re3 is released under the GPL V3.
Please cite Re3 in your publications if it helps your research:
@article{gordon2018re3,
title={Re3: Real-Time Recurrent Regression Networks for Visual Tracking of Generic Objects},
author={Gordon, Daniel and Farhadi, Ali and Fox, Dieter},
journal={IEEE Robotics and Automation Letters},
volume={3},
number={2},
pages={788--795},
year={2018},
publisher={IEEE}
}