From 96f0b94f3fc3b90b86668e344b525eb4b3737c4f Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Fri, 20 Nov 2020 19:15:53 +0800 Subject: [PATCH] fix htc inference & deploy (#1729) --- configs/htc/htc_r50_fpn_1x.yml | 11 +++++++++++ ppdet/modeling/architectures/htc.py | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configs/htc/htc_r50_fpn_1x.yml b/configs/htc/htc_r50_fpn_1x.yml index 9b2f6b8b7..348343ccf 100644 --- a/configs/htc/htc_r50_fpn_1x.yml +++ b/configs/htc/htc_r50_fpn_1x.yml @@ -212,3 +212,14 @@ TestReader: - !ResizeImage interp: 1 max_size: 1333 + target_size: 800 + use_cv2: true + - !Permute + channel_first: true + to_bgr: false + batch_transforms: + - !PadBatch + pad_to_stride: 32 + use_padded_im_info: false + batch_size: 1 + shuffle: false diff --git a/ppdet/modeling/architectures/htc.py b/ppdet/modeling/architectures/htc.py index 97f42ebdd..16c290916 100644 --- a/ppdet/modeling/architectures/htc.py +++ b/ppdet/modeling/architectures/htc.py @@ -467,5 +467,7 @@ class HybridTaskCascade(object): return self.build_multi_scale(feed_vars, mask_branch) return self.build(feed_vars, 'test') - def test(self, feed_vars): + def test(self, feed_vars, exclude_nms=False): + assert not exclude_nms, "exclude_nms for {} is not support currently".format( + self.__class__.__name__) return self.build(feed_vars, 'test') -- GitLab