From 18859e4de018018f7fc065c24cea8cbf104a7d5a Mon Sep 17 00:00:00 2001 From: Cody Wong Date: Mon, 21 Mar 2022 10:51:27 +0800 Subject: [PATCH] [Fix] make arguments effective in tools/confusion_matrix.py (#1401) * add an argument for customizing `title' of the output figure * fix `color_theme' arguments not passing to plot function Signed-off-by: code14 --- tools/confusion_matrix.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/confusion_matrix.py b/tools/confusion_matrix.py index 41d308b81..2c5b64cf4 100644 --- a/tools/confusion_matrix.py +++ b/tools/confusion_matrix.py @@ -25,6 +25,10 @@ def parse_args(): '--color-theme', default='winter', help='theme of the matrix color map') + parser.add_argument( + '--title', + default='Normalized Confusion Matrix', + help='title of the matrix color map') parser.add_argument( '--cfg-options', nargs='+', @@ -171,7 +175,9 @@ def main(): confusion_matrix, dataset.CLASSES, save_dir=args.save_dir, - show=args.show) + show=args.show, + title=args.title, + color_theme=args.color_theme) if __name__ == '__main__':