Skip to content

KeyError: 'Dice. front' when training the segementation task #9

Description

@SZUHvern

Thank you for sharing the code!

There is an error occur when I trainning the segementation task:
File ".../site-packages/mmcv/runner/hooks/evaluation.py", line 389, in evaluate
return eval_res[self.key_indicator]
KeyError: 'Dice.front'

After inspection, I found that in /mmseg/core/evaluation/metrics. py, the function 'total_area_to_metrics' has the following definition:

Allowed_ Metrics=['mIoU ',' mDice ',' mFscore ',' medDice ']
But there is no 'if' item for 'medDice':
For metric in metrics:
If metric=='mIoU ':
...
If metric=='mDice':
...
I guess is any code missing here? or can I directly use [If metric=='mDice' or metric=='medDice ': ] ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions