Could you share the hyper paramters of reproduce precision in checkpoint you provide?
I trained Efficientdet-d0 and d1 using the default hyperparameters. The train num_epochs are 15 by default, But I find that mAP cannot reach the numbers in your checkpoints. I want to know how many epochs should be set to get the precision of the checkpoints you provide. Thanks.
I trained effiicientdet-d0 100 epochs with batch size 16 * 8 = 128, total max learning rate = 128 / 64 * 0.08 = 0.16 , but only get the following precision. I want to know how to tune the hyperparameters to reproduce the results in the paper. Thanks.
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.240 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.396 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.251 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.085 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.281 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.381 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.237 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.373 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.395 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.131 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.467 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.610
This is the tensorboard of training in 100 epochs.

Hi @itsliupeng
All hyperparameters are in hparams_config.py, which has the value of num_epochs = 300. There could be multiple reasons for the low accuracy:
- Do you load the backbone checkpoints? For B0, you should use this checkpoint:, and then specify --backbone_ckpt=xxx
- Do you use synchronized batch normal? Or do you change any other settings?
It is sad to see the accuracy is low (100 epochs is less than my default 300 epochs, but the accuracy difference should be <1 mAP).
However, I am also excited to see you are able to train on multiple GPUs. Could you share your instructions and paste your full command line to help others to train on multiple GPUs? Thank you!
I trained effiicientdet-d0 100 epochs with batch size 16 * 8 = 128, total max learning rate = 128 / 64 * 0.08 = 0.16 , but only get the following precision. I want to know how to tune the hyperparameters to reproduce the results in the paper. Thanks.
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.240 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.396 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.251 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.085 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.281 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.381 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.237 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.373 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.395 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.131 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.467 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.610
This is the tensorboard of training in 100 epochs.
老哥是怎么改的分布式训练? 谢谢指教!!
I train the model on multi GPUs too, I will open-source it later.
Hi @itsliupeng
All hyperparameters are in hparams_config.py, which has the value of num_epochs = 300. There could be multiple reasons for the low accuracy:
- Do you load the backbone checkpoints? For B0, you should use this checkpoint:, and then specify --backbone_ckpt=xxx
- Do you use synchronized batch normal? Or do you change any other settings?
It is sad to see the accuracy is low (100 epochs is less than my default 300 epochs, but the accuracy difference should be <1 mAP).
However, I am also excited to see you are able to train on multiple GPUs. Could you share your instructions and paste your full command line to help others to train on multiple GPUs? Thank you!
Thanks for your reply.
- I have used --backbone_ckpt=xxx
- I use SyncBatchNorm implemented by horovod allreduce, just like tf.keras.layers.experimental.SyncBatchNormalization in tensorflow version 2.2
I will share more details of our instructions using horovod after Qingming holidays.
Hi @itsliupeng All hyperparameters are in hparams_config.py, which has the value of num_epochs = 300. There could be multiple reasons for the low accuracy:
- Do you load the backbone checkpoints? For B0, you should use this checkpoint:, and then specify --backbone_ckpt=xxx
- Do you use synchronized batch normal? Or do you change any other settings?
It is sad to see the accuracy is low (100 epochs is less than my default 300 epochs, but the accuracy difference should be <1 mAP). However, I am also excited to see you are able to train on multiple GPUs. Could you share your instructions and paste your full command line to help others to train on multiple GPUs? Thank you!
Thanks for your reply.
- I have used --backbone_ckpt=xxx
- I use SyncBatchNorm implemented by horovod allreduce, just like tf.keras.layers.experimental.SyncBatchNormalization in tensorflow version 2.2
I will share more details of our instructions using horovod after Qingming holidays.
Advance user.
Hi @itsliupeng
All hyperparameters are in hparams_config.py, which has the value of num_epochs = 300. There could be multiple reasons for the low accuracy:
- Do you load the backbone checkpoints? For B0, you should use this checkpoint:, and then specify --backbone_ckpt=xxx
- Do you use synchronized batch normal? Or do you change any other settings?
It is sad to see the accuracy is low (100 epochs is less than my default 300 epochs, but the accuracy difference should be <1 mAP).
However, I am also excited to see you are able to train on multiple GPUs. Could you share your instructions and paste your full command line to help others to train on multiple GPUs? Thank you!
I put my code supporting training on multiple GPUs in https://github.com/itsliupeng/automl/tree/master/efficientdet. It implemented synchronized batch norm in https://github.com/itsliupeng/automl/blob/master/efficientdet/utils.py#L211
I train in 100 epochs, but now it has not finished. I will add the training results when finished. Thanks again for your work and code.

I trained effiicientdet-d0 100 epochs with batch size 16 * 8 = 128, total max learning rate = 128 / 64 * 0.08 = 0.16 , but only get the following precision. I want to know how to tune the hyperparameters to reproduce the results in the paper. Thanks.
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.240 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.396 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.251 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.085 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.281 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.381 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.237 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.373 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.395 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.131 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.467 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.610
This is the tensorboard of training in 100 epochs.
老哥是怎么改的分布式训练? 谢谢指教!!
我上传了训练代码,你可以试试 https://github.com/itsliupeng/automl/tree/master/efficientdet
@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval.
I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.


Hi @itsliupeng , excited to see you have 32.46 mAP for d0!
My previous d0 checkpoint has 32.9mAP for val with batch norm 0.997 and epsilon 1e-4 (borrowed from RetinaNet), but later on I found I should use the same batch norm parameter as backbones, so I changed batch norm to use 0.99 and epsilon 1e-3 as shown in the latest code (same as EfficientNet).
After changing BN and fixing some small bugs, I retrained all models. The latest d0 checkpoint has 33.4mAP for val and 33.8mAP for test-dev. Arxiv paper was also updated a few days ago to be aligned with the public repo: https://arxiv.org/pdf/1911.09070.pdf.
If you use the old parameters, then your results are aligned to my old results: 32.9mAP for 300 epochs and about 32.4mAP for 100 epochs. Could you retrain it with the latest code? (I will also train d0 for 100 epochs to provide you a better comparison).
Hi @itsliupeng , excited to see you have 32.46 mAP for d0!
My previous d0 checkpoint has 32.9mAP for val with batch norm 0.997 and epsilon 1e-4 (borrowed from RetinaNet), but later on I found I should use the same batch norm parameter as backbones, so I changed batch norm to use 0.99 and epsilon 1e-3 as shown in the latest code (same as EfficientNet).
After changing BN and fixing some small bugs, I retrained all models. The latest d0 checkpoint has 33.4mAP for val and 33.8mAP for test-dev. Arxiv paper was also updated a few days ago to be aligned with the public repo: https://arxiv.org/pdf/1911.09070.pdf.
If you use the old parameters, then your results are aligned to my old results: 32.9mAP for 300 epochs and about 32.4mAP for 100 epochs. Could you retrain it with the latest code? (I will also train d0 for 100 epochs to provide you a better comparison).
use your latest version of create_pascal_tfrecord.py no use, still -1
lotta people have the problems waiting your method to solve
Hi @itsliupeng , excited to see you have 32.46 mAP for d0!
My previous d0 checkpoint has 32.9mAP for val with batch norm 0.997 and epsilon 1e-4 (borrowed from RetinaNet), but later on I found I should use the same batch norm parameter as backbones, so I changed batch norm to use 0.99 and epsilon 1e-3 as shown in the latest code (same as EfficientNet).
After changing BN and fixing some small bugs, I retrained all models. The latest d0 checkpoint has 33.4mAP for val and 33.8mAP for test-dev. Arxiv paper was also updated a few days ago to be aligned with the public repo: https://arxiv.org/pdf/1911.09070.pdf.
If you use the old parameters, then your results are aligned to my old results: 32.9mAP for 300 epochs and about 32.4mAP for 100 epochs. Could you retrain it with the latest code? (I will also train d0 for 100 epochs to provide you a better comparison).
Hi @mingxingtan, thanks for your reply. My 32.46 mAP for 100 epochs is got by training with the latest code (momentum 0.99 and epsilon 1e-3). I will find more machines to train 350 epochs this weekend.
Hi @qtw1998 , I have found the issue (it is from dataseet), fix on the way.
Hi @qtw1998 , I have found the issue (it is from dataseet), fix on the way.
Is it from the transfer script or my custom dataset? I'm sure it's available to use actually because I've already made comparison between the official json and mine THX bro💗
@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval.
I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.
@itsliupeng Hello, could you tell me the changes you made that cause the mAP jump from 24 to 32? I ported the code to pytorch but D0 only reaches ~26 mAP, so I wonder there must be something I missed.
@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval. I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.
![]()
Hello, could you tell me the changes you made that cause the mAP jump from 24 to 32? I ported the code to pytorch but D0 only reaches ~26 mAP, so I wonder there must be something I missed.
Hi @zzzxxxttt I made a bug of forgetting to all reduce gradients across GPUs. After fixing it in https://github.com/itsliupeng/automl/blob/master/efficientdet/det_model_fn.py#L460 it works.
@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval. I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.
![]()
Hello, could you tell me the changes you made that cause the mAP jump from 24 to 32? I ported the code to pytorch but D0 only reaches ~26 mAP, so I wonder there must be something I missed.
Hi @zzzxxxttt I made a bug of forgetting to all reduce gradients across GPUs. After fixing it in https://github.com/itsliupeng/automl/blob/master/efficientdet/det_model_fn.py#L460 it works.
Thank you for your reply! I'll check my code accordingly.
@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval. I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.
![]()
Hello, could you tell me the changes you made that cause the mAP jump from 24 to 32? I ported the code to pytorch but D0 only reaches ~26 mAP, so I wonder there must be something I missed.
Hi @zzzxxxttt I made a bug of forgetting to all reduce gradients across GPUs. After fixing it in https://github.com/itsliupeng/automl/blob/master/efficientdet/det_model_fn.py#L460 it works.
Sorry for bothering you again, could you run a D0 training for 36 epochs and tell me the result mAP? My code now reaches 29.4% mAP for 36 epochs training, I'm not sure whether it is because of the less training epochs or there are still some bugs, and training for more epochs is too expensive for me.
@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval. I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.
![]()
Hello, could you tell me the changes you made that cause the mAP jump from 24 to 32? I ported the code to pytorch but D0 only reaches ~26 mAP, so I wonder there must be something I missed.
Hi @zzzxxxttt I made a bug of forgetting to all reduce gradients across GPUs. After fixing it in https://github.com/itsliupeng/automl/blob/master/efficientdet/det_model_fn.py#L460 it works.
Sorry for bothering you again, could you run a D0 training for 36 epochs and tell me the result mAP? My code now reaches 29.4% mAP for 36 epochs training, I'm not sure whether it is because of the less training epochs or there are still some bugs, and training for more epochs is too expensive for me.
It reached approximately 29% mAP at the 36th epoch during my training for 100 epochs. I think you should try training more epochs.
The efficientnet network uses many depthwise convolutions instead of normal convolutions, so it needs much more training time for better convergence.
During another training for 300 epochs, It has reached 33.09% at the 159th epoch, very close to the 33.5% mAP in the published checkpoint.

@mingxingtan I trained d0 in 100 epochs and only got mAP 0.32462898. I saw that you mentioned mAP 32.9 in Table 2 of your paper and mAP 33.8 in your checkpoint. I want to find why I can't achieve your precision. I put my training details in https://github.com/itsliupeng/automl/tree/master/efficientdet#best_eval. I find the settings of the synchronized batch normalization in the paper (0.997, 1e-4) are different from https://github.com/google/automl/blob/master/efficientdet/backbone/efficientnet_builder.py#L187. I would appreciate that if you can help me analyze the reasons.
![]()
Hello, could you tell me the changes you made that cause the mAP jump from 24 to 32? I ported the code to pytorch but D0 only reaches ~26 mAP, so I wonder there must be something I missed.
Hi @zzzxxxttt I made a bug of forgetting to all reduce gradients across GPUs. After fixing it in https://github.com/itsliupeng/automl/blob/master/efficientdet/det_model_fn.py#L460 it works.
Sorry for bothering you again, could you run a D0 training for 36 epochs and tell me the result mAP? My code now reaches 29.4% mAP for 36 epochs training, I'm not sure whether it is because of the less training epochs or there are still some bugs, and training for more epochs is too expensive for me.
It reached approximately 29% mAP at the 36th epoch during my training for 100 epochs. I think you should try training more epochs.
The efficientnet network uses many depthwise convolutions instead of normal convolutions, so it needs much more training time for better convergence.
During another training for 300 epochs, It has reached 33.09% at the 159th epoch, very close to the 33.5% mAP in the published checkpoint.
Thank you very much! I will try more epochs, really appreciate for your help!