Code that implements paper "End-to-End Instance Segmentation with Recurrent Attention".
- Python 2.7
- TensorFlow 0.12 (not compatible with TensorFlow 1.0)
- OpenCV
- NumPy
- SciPy
- PyYaml
- hdf5 and H5Py
- tqdm
- Pillow (required by cityscapes evaluation)
Compile Hungarian matching module
./hungarian_build.sh
Note: Unlock h5_lock:
export HDF5_USE_FILE_LOCKING='FALSE'
Run cremi_Prepare_Eval.ipynb
Configure the size opt
in setup_cvppp.py
.
Note: setup_cvppp.py
will automatically resize to the size opt
in setup_cvppp.py
.
Run python setup_cvppp.py
###Run experiments:
-
Configure the setting:
- Class
TrainArgsParser
incmd_args_parser.py
- Number of object
kCvpppNumObj
incmd_args_parser.py
return
inget_default_timespan
incvppp.py
. Have to return =kCvpppNumObj
+1steps_per_valid
incmd_args_parser.py
steps_per_trainval
incmd_args_parser.py
steps_per_plot
incmd_args_parser.py
num_batch_valid
incmd_args_parser.py
MAX_NUM_ITERATION
inhungarian.cc
to preventcore_dumped
- add
--fixed_order
to turn off Hungarian
- Class
-
Choose GPU_id in:
box_model_train.py
box_model_read.py
full_model_train.py
full_model_eval.py
-
Comment those code in
box_model_train.py
# if 'attn' in self.loggers: # pu.plot_double_attention( # self.loggers['attn'].get_fname(), # x, # results['ctrl_rnn_glimpse_map'], # max_items_per_row=max_items)
Run
./run_cremi.sh
First modify setup_cvppp.sh
with your dataset folder paths.
./setup_cvppp.sh
Run experiments:
./run_cvppp.sh
First modify setup_kitti.sh
with your dataset folder paths.
./setup_kitti.sh
Run experiments:
./run_cvppp.sh
First modify setup_cityscapes.sh
with your dataset folder paths.
./setup_cityscapes.sh
Run experiments:
./run_cityscapes.sh
If you use our code, please consider cite the following: End-to-End Instance Segmentation with Recurrent Attention. Mengye Ren, Richard S. Zemel. CVPR 2017.
@inproceedings{ren17recattend,
author = {Mengye Ren and Richard S. Zemel},
title = {End-to-End Instance Segmentation with Recurrent Attention},
booktitle = {CVPR},
year = {2017}
}