Created by: heavengate
cherry-pick https://github.com/PaddlePaddle/PaddleDetection/pull/1404 to release/0.4