From ddda7b009ab2ee67e788813abaf060d49ff495f7 Mon Sep 17 00:00:00 2001 From: Yonghye Kwon Date: Sun, 21 Apr 2024 14:04:37 +0900 Subject: [PATCH] modify variable name related to multi scale features --- rtdetr_pytorch/src/zoo/rtdetr/hybrid_encoder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtdetr_pytorch/src/zoo/rtdetr/hybrid_encoder.py b/rtdetr_pytorch/src/zoo/rtdetr/hybrid_encoder.py index 4d59f7d3..804db69c 100644 --- a/rtdetr_pytorch/src/zoo/rtdetr/hybrid_encoder.py +++ b/rtdetr_pytorch/src/zoo/rtdetr/hybrid_encoder.py @@ -303,20 +303,20 @@ def forward(self, feats): # broadcasting and fusion inner_outs = [proj_feats[-1]] for idx in range(len(self.in_channels) - 1, 0, -1): - feat_heigh = inner_outs[0] + feat_high = inner_outs[0] feat_low = proj_feats[idx - 1] - feat_heigh = self.lateral_convs[len(self.in_channels) - 1 - idx](feat_heigh) - inner_outs[0] = feat_heigh - upsample_feat = F.interpolate(feat_heigh, scale_factor=2., mode='nearest') + feat_high = self.lateral_convs[len(self.in_channels) - 1 - idx](feat_high) + inner_outs[0] = feat_high + upsample_feat = F.interpolate(feat_high, scale_factor=2., mode='nearest') inner_out = self.fpn_blocks[len(self.in_channels)-1-idx](torch.concat([upsample_feat, feat_low], dim=1)) inner_outs.insert(0, inner_out) outs = [inner_outs[0]] for idx in range(len(self.in_channels) - 1): feat_low = outs[-1] - feat_height = inner_outs[idx + 1] + feat_high = inner_outs[idx + 1] downsample_feat = self.downsample_convs[idx](feat_low) - out = self.pan_blocks[idx](torch.concat([downsample_feat, feat_height], dim=1)) + out = self.pan_blocks[idx](torch.concat([downsample_feat, feat_high], dim=1)) outs.append(out) return outs