This is the official codes for the paper: Efficient Uncertainty Estimation for Semantic Segmentation in Videos.
- Python 2.7
- Pytorch 0.2.0
- tqdm
- matplotlib
- Visdom 0.1.7
- pypng
- protobuf
- Opencv
Normall CamVid dataset only contain frames that fps=1.
However, our Method leverage consecutive frames to speed up uncertainty estimation.
Therefore we need a CamVid dataset contain all consecutive frames(fps 30) instead of labeled frames(fps 1).
We extract fps 30 frames from original videos and build new version here
Download and unzip the dataset Edit config.json
{
"camvid":
{
"data_path": "/YOUR/PATH/camvid/"
}
}
We use the FlowNet2 as our optical flow model.
The FlowNet2 code is intergret in our repo.
You only need do the installation in this repo FlowNet2.
Download the pretrained weight in Dir : pytorch_flownet2/FlowNet2_src/pretrained
Our trained tiramisu model can be download here.
Download and unzip it at checkpoint dir. Then run exp_test_MC.py and python exp_test_RTA.py.
Then it can evaluate our release model.
- Tiramisu
python exp_train.py
-
Tiramisu MC dropout (sample 5 times) Important hyper-parameter
mode = 'test' ckpt_epoch = 900 video_unct = False sample_num = 5
Command
python exp_test_MC.py
-
Tiramisu TA-MC Important hyper-parameter
mode = 'test' ckpt_epoch = 900 video_unct = False error_thres = 300 alpha_normal = 0.2 alpha_error = 0.7
Command
python exp_test_RTA.py
-
Tiramisu RTA-MC Important hyper-parameter
mode = 'test' ckpt_epoch = 900 video_unct = False error_thres = 40 alpha_normal = 0.2 alpha_error = 0.7
Command
python exp_test_RTA.py
-
Tiramisu MC dropout N=5(we use N=5 result because the same inference time as RTA-MC.)
-
Tiramisu TA-MC
-
Tiramisu RTA-MC