From 882dd96449b4d7aa5f1c5606847d745667b0693e Mon Sep 17 00:00:00 2001 From: haoyuying <35907364+haoyuying@users.noreply.github.com> Date: Mon, 19 Apr 2021 11:41:52 +0800 Subject: [PATCH] Fix the prediction problem of semantic segmentation module. --- .../semantic_segmentation/deeplabv3p_resnet50_voc/module.py | 2 +- .../image/semantic_segmentation/ocrnet_hrnetw18_voc/module.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/module.py b/modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/module.py index 38cfd429..10ab03ca 100644 --- a/modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/module.py +++ b/modules/image/semantic_segmentation/deeplabv3p_resnet50_voc/module.py @@ -76,7 +76,7 @@ class DeepLabV3PResnet50(nn.Layer): backbone_channels, aspp_ratios, aspp_out_channels, align_corners) self.align_corners = align_corners - self.transforms = T.Compose([T.Padding(target_size=(512, 512)), T.Normalize()]) + self.transforms = T.Compose([T.Normalize()]) if pretrained is not None: model_dict = paddle.load(pretrained) diff --git a/modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/module.py b/modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/module.py index 1660d1c6..1973f974 100644 --- a/modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/module.py +++ b/modules/image/semantic_segmentation/ocrnet_hrnetw18_voc/module.py @@ -69,7 +69,7 @@ class OCRNetHRNetW18(nn.Layer): ocr_mid_channels=ocr_mid_channels, ocr_key_channels=ocr_key_channels) self.align_corners = align_corners - self.transforms = T.Compose([T.Padding(target_size=(512, 512)), T.Normalize()]) + self.transforms = T.Compose([T.Normalize()]) if pretrained is not None: model_dict = paddle.load(pretrained) -- GitLab