代码地址:https://github.com/zhunzhong07/Random-Erasing.
作者将该方法分类,目标检测和行人识别上,效果较好。RandomErasing代码讲解如下:
class RandomErasing(object):
'''
Class that performs Random Erasing in Random Erasing Data Augmentation by Zhong et al.
-------------------------------------------------------------------------------------
probability: The probability that the operation will be performed.
sl: min erasing area
sh: max erasing area
r1: min aspect ratio
mean: erasing value
-------------------------------------------------------------------------------------
'''
def __init__<