From 02d2790145275477928b97bdcc6e2bc806c095a3 Mon Sep 17 00:00:00 2001 From: MengzhangLI Date: Fri, 28 Jan 2022 10:53:11 +0800 Subject: [PATCH] delete unnecessary lines of STDCHead (#1231) --- configs/_base_/models/stdc.py | 2 +- mmseg/models/decode_heads/stdc_head.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/configs/_base_/models/stdc.py b/configs/_base_/models/stdc.py index e313f04..341a4ec 100644 --- a/configs/_base_/models/stdc.py +++ b/configs/_base_/models/stdc.py @@ -68,7 +68,7 @@ model = dict( in_index=0, norm_cfg=norm_cfg, concat_input=False, - align_corners=False, + align_corners=True, loss_decode=[ dict( type='CrossEntropyLoss', diff --git a/mmseg/models/decode_heads/stdc_head.py b/mmseg/models/decode_heads/stdc_head.py index 7160016..1e678ac 100644 --- a/mmseg/models/decode_heads/stdc_head.py +++ b/mmseg/models/decode_heads/stdc_head.py @@ -80,11 +80,6 @@ class STDCHead(FCNHead): boudary_targets_pyramid[ boudary_targets_pyramid <= self.boundary_threshold] = 0 - seg_logit = F.interpolate( - seg_logit, - boundary_targets.shape[2:], - mode='bilinear', - align_corners=True) loss = super(STDCHead, self).losses(seg_logit, boudary_targets_pyramid.long()) return loss