Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion mmdeploy/codebase/mmseg/deploy/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,10 @@ def get_model_name(self) -> str:
"""
assert 'decode_head' in self.model_cfg.model, 'model config contains'
' 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:
raise NotImplementedError('Could not get the name of the model')
return name