layumi / Person_reID_baseline_pytorch

:bouncing_ball_person: Pytorch ReID: A tiny, friendly, strong pytorch implement of person re-id / vehicle re-id baseline. Tutorial 👉https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial

Home Page:https://www.zdzheng.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问可以在训练过程中添加RandomGrayscaleErasing的实现么

qiaosuobutouche opened this issue · comments

这个函数https://github.com/layumi/Person_reID_baseline_pytorch/blob/master/random_erasing.py#L57,可以加入到train.py中的解析器中以方便使用么,感谢

自己写了一下,添加了解析器语句
parser.add_argument('--grayscale_erasing_p', default=0, type=float, help='probability of applying grayscale erasing') 在https://github.com/layumi/Person_reID_baseline_pytorch/blob/4dae9cdf42f71c72a44a64fb23bfc470c501085f/train.py#L48C103-L48C103
这一行下
以及调用语句
if opt.grayscale_erasing_p > 0:
transform_train_list = transform_train_list + [RandomGrayscaleErasing(probability=opt.grayscale_erasing_p)]
添加在了https://github.com/layumi/Person_reID_baseline_pytorch/blob/4dae9cdf42f71c72a44a64fb23bfc470c501085f/train.py#L141
这一行下
大佬可以帮忙看看这样写有问题么

你好 @qiaosuobutouche
看上去没有问题!