Skip to content

Commit 18859e4

Browse files
authored
[Fix] make arguments effective in tools/confusion_matrix.py (open-mmlab#1401)
* add an argument for customizing `title' of the output figure * fix `color_theme' arguments not passing to plot function Signed-off-by: code14 <[email protected]>
1 parent 1b24ad6 commit 18859e4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/confusion_matrix.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def parse_args():
2525
'--color-theme',
2626
default='winter',
2727
help='theme of the matrix color map')
28+
parser.add_argument(
29+
'--title',
30+
default='Normalized Confusion Matrix',
31+
help='title of the matrix color map')
2832
parser.add_argument(
2933
'--cfg-options',
3034
nargs='+',
@@ -171,7 +175,9 @@ def main():
171175
confusion_matrix,
172176
dataset.CLASSES,
173177
save_dir=args.save_dir,
174-
show=args.show)
178+
show=args.show,
179+
title=args.title,
180+
color_theme=args.color_theme)
175181

176182

177183
if __name__ == '__main__':

0 commit comments

Comments
 (0)