(deeplabv3+) (deeplabv3) reproduce ResNet mIOU 78.85%, but I got just 74.94%
1.System information
- the top-level directory of the model **: /home/yswang/models3/research/deeplab
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
- TensorFlow installed from (source or binary): pip
- TensorFlow version (use command below): tensorflow-gpu 1.6.0
- Bazel version (if compiling from source): None.
- CUDA/cuDNN version: None.
- GPU model and memory: Titan xp / 12GB / 8 GPU
- Exact command to reproduce:
for the first 30k iterations :
NUM_ITERATIONS=30000
CUDA_VISIBLE_DEVICES=4,5,6,7 python "${WORK_DIR}"/train.py
--logtostderr
--train_split="trainaug"
--model_variant="resnet_v1_101_beta"
--atrous_rates=6
--atrous_rates=12
--atrous_rates=18
--output_stride=16
--decoder_output_stride=4
--train_crop_size=513
--train_crop_size=513
--num_clones=4
--train_batch_size=16
--dataset="pascal_voc_seg"
--training_number_of_steps="${NUM_ITERATIONS}"
--fine_tune_batch_norm=True
--tf_initial_checkpoint="${INIT_FOLDER}/resnet_v1_101/model.ckpt"
--train_logdir="${TRAIN_LOGDIR}/gpu_test/8_1"
--dataset_dir="${PASCAL_DATASET}"
for the rest 60k iterations :
NUM_ITERATIONS=60000
CUDA_VISIBLE_DEVICES=4,5,6,7 python "${WORK_DIR}"/train.py
--logtostderr
--train_split="train"
--model_variant="resnet_v1_101_beta"
--atrous_rates=6
--atrous_rates=12
--atrous_rates=18
--output_stride=8
--decoder_output_stride=4
--train_crop_size=513
--train_crop_size=513
--num_clones=4
--train_batch_size=8
--dataset="pascal_voc_seg"
--training_number_of_steps="${NUM_ITERATIONS}"
--fine_tune_batch_norm=False
--tf_initial_checkpoint="${INIT_FOLDER}/resnet_v1_101/model.ckpt"
--train_logdir="${TRAIN_LOGDIR}/gpu_test/8_1"
--dataset_dir="${PASCAL_DATASET}"
Describe the problem
I followed the same training protocol as in deeplabv3 paper. firstly, train with following parameters(poly, initial lr=0.007, crop size = 513 x 513 , OS=16, fine-tuning batch=True, augmentation during training. ) with 4 GPU. and it performs 73.49% mIOU. after that, I keep to follow training protocol in deeplabv3(Rethinking ..) freeze BN parameters(False) and OS=8, train on the official PASCAL VOC 2012 trainaug set for another 30k iterations and smaller base learning rate = 0.001. But It performs 74.94% for the PASCAL VOC 2012 val set. I used eval OS =16 for both settings. The table3 in the deeplabv3+ paper describes that 78.85% for train OS,eval OS, Decoder settings. But I got just 74.94%, not 78.85%. Does anyone tell me how to reproduce mIOU=78.85%?
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code
Maybe you should try setting --weight_decay=0.0001 for completely same configuration.
Sorry,I want know if have some another params to set,i set the --weight_decay=0.0001,but it's still only have mIOU=75.52%. I set --weight_decay=0.0001 in total 60k iterations.
@lzx1026078111 @yswang0522 @nealwu hi,Has this problem been resolved? I also encountered a similar problem. In the pascal voc competition, I directly downloaded the code and submitted the test results. I found that the difference from the official value was 5-6%. What is the reason?
I think batch normalization should be replaced by synchronized batch normalization.
------------------ 原始邮件 ------------------ 发件人: "a56256324"<[email protected]>; 发送时间: 2019年12月13日(星期五) 上午9:46 收件人: "tensorflow/models"<[email protected]>; 抄送: "285013854"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [tensorflow/models] (deeplabv3+) (deeplabv3) reproduce ResNet mIOU 78.85%, but I got just 74.94% (#5116)
@lzx1026078111 @yswang0522 @nealwu hi,Has this problem been resolved? I also encountered a similar problem. In the pascal voc competition, I directly downloaded the code and submitted the test results. I found that the difference from the official value was 5-6%. What is the reason?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I also encountered the similar problem. Here I propose an assumption. Maybe the high accuracy is for a model trained in the validation set. The deeplab v3+ follow the same training protocol as in the deeplab v3 which is mentioned in the article. However, as mentioned in the batch normalization section of the deeplab v3, the model is trained on the trainaug set with 30K followed by 30K trained on the trainval set. It's obvious that the training strategy is utilized for the high accuracy of test set, while I do not find any other training strategy specifically for the inference of validation set (if there is, please ask me to delete this comment). The reason may be that the accuracy of the validation set is used only for model selection, not for the comparison with the benchmark. Therefore, you can try the above training strategy and compare the accuracy with the result reported in the article to check the assumption.
Sorry for the late reply. I just noticed this discussion.
To reproduce the results, one needs to use large batch size in order to train the batch norm parameters. In our case, we are able to use batch size 16 (using batch size 32 could further slightly improve the performance). In your case, you are basically computing batch norm statistics within batch size two only. You could try to reduce the train_crop_size (as mentioned in Q5 of FAQ). But note that using smaller train_crop_size may lead to sub-optimal results.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.
Closing as stale. Please reopen if you'd like to work on this further.