From 144148949d63ad2ea948b2d1c72d32779a77121b Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Fri, 11 May 2018 23:18:33 +0900 Subject: [PATCH] Stop overwriting provided config with default args --- labelme/app.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/labelme/app.py b/labelme/app.py index f9af8ac..81459b7 100644 --- a/labelme/app.py +++ b/labelme/app.py @@ -1242,6 +1242,17 @@ def main(): filename = config_from_args.pop('filename') output = config_from_args.pop('output') config_file = config_from_args.pop('config_file') + # drop the default config + if not config_from_args['auto_save']: + config_from_args.pop('auto_save') + if config_from_args['store_data']: + config_from_args.pop('store_data') + if not config_from_args['labels']: + config_from_args.pop('labels') + if not config_from_args['sort_labels']: + config_from_args.pop('sort_labels') + if not config_from_args['validate_label']: + config_from_args.pop('validate_label') config = get_config(config_from_args, config_file) app = QtWidgets.QApplication(sys.argv) -- GitLab