mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
[Fix] Fix seg name (#394)
* fix seg name * use default name Co-authored-by: dongchunyu.vendor <dongchunyu@pjlab.org.cn>
This commit is contained in:
parent
72c19e9d5d
commit
a9a4144321
@ -268,5 +268,10 @@ class Segmentation(BaseTask):
|
|||||||
"""
|
"""
|
||||||
assert 'decode_head' in self.model_cfg.model, 'model config contains'
|
assert 'decode_head' in self.model_cfg.model, 'model config contains'
|
||||||
' no decode_head'
|
' no decode_head'
|
||||||
name = self.model_cfg.model.decode_head.type[:-4].lower()
|
if isinstance(self.model_cfg.model.decode_head, list):
|
||||||
|
name = self.model_cfg.model.decode_head[-1].type[:-4].lower()
|
||||||
|
elif 'type' in self.model_cfg.model.decode_head:
|
||||||
|
name = self.model_cfg.model.decode_head.type[:-4].lower()
|
||||||
|
else:
|
||||||
|
name = 'mmseg_model'
|
||||||
return name
|
return name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user