fix with_argmax for mmseg (#2056)

This commit is contained in:
RunningLeon 2023-05-11 15:37:53 +08:00 committed by GitHub
parent 9385eed16f
commit 26b66ef511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,10 +303,10 @@ class Segmentation(BaseTask):
params = self.model_cfg.model.decode_head
if isinstance(params, list):
params = params[-1]
postprocess = dict(params=params, type='ResizeMask')
with_argmax = get_codebase_config(self.deploy_cfg).get(
'with_argmax', True)
postprocess['with_argmax'] = with_argmax
params['with_argmax'] = with_argmax
postprocess = dict(params=params, type='ResizeMask')
return postprocess
def get_model_name(self, *args, **kwargs) -> str: