kazuto1011 / deeplab-pytorch

PyTorch re-implementation of DeepLab v2 on COCO-Stuff / PASCAL VOC datasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to do the augmentation for training?

seyeeet opened this issue · comments

Thanks for our code, I have a clarification question and appreciate your answer.
Let say I am augmenting the image, lets say I resize the image and then pad it and then crop a fix size.
for the padding areas, should I assign class 0 (background) or class 255 (which is ignore class)?
in other words, should I backpropagate the loss for the pad areas and make my network to consider them as 0?

Thanks a lot for your help.

A typical way is to pad with 0 and label with 255, and the 255 areas are ignored in computing loss. Whatever the network predicts on the padded areas in training, no problem if the network never sees the padding in testing.

thanks for your answer