MRM-pytorch icon indicating copy to clipboard operation
MRM-pytorch copied to clipboard

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

Open SZUHvern opened this issue 1 year ago • 4 comments

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 ': ] ?

SZUHvern avatar Jun 19 '23 09:06 SZUHvern