PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

Assignment error in RandomPaddingCrop

Open huaibovip opened this issue 8 months ago • 3 comments

I'm using paddleseg v2.9 to train segnext (segnext_mscan_t_cityscapes_1024x1024_160k.yml) on the cityscape dataset with the error that the channel of the data is 1. Initial troubleshooting leads me to believe that RandomPaddingCrop is incorrectly assigning seg_temp to data['img'] https://github.com/PaddlePaddle/PaddleSeg/blob/41cd8b60e6418e44f12d5662ec1e83ac391d88a2/paddleseg/transforms/transforms.py#L667C16-L667C16

huaibovip avatar Dec 21 '23 10:12 huaibovip

我也遇到了相同问题,是由于RandomPaddingCrop这个API在2.9版本中有问题,在develop版本中已经修复,或者将category_max_ratio参数设置为1.0即可。不知道2.9版本是否也可以对应修改一下 @shiyutang

kongdebug avatar Jan 27 '24 10:01 kongdebug

请辛苦提供下修改的PR,我来进行cherry-pick。

shiyutang avatar Feb 28 '24 04:02 shiyutang

请辛苦提供下修改的PR,我来进行cherry-pick。

应该是在这个commit修改的:https://github.com/PaddlePaddle/PaddleSeg/pull/3548/commits/49bb56caca3c126ad1e930fd6ee8118cfc26bd2a

kongdebug avatar Feb 28 '24 06:02 kongdebug