diff --git a/Dockerfile b/Dockerfile index abd3653..183366b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,4 +36,7 @@ COPY --from=model_fetcher /model/model_final.pth \ COPY gen_metadata.py /pipeline +# Default to use enhanced model added above (unset DM_CONFIG_FILENAME to use config.json) +ENV DM_CONFIG_FILENAME config_enhance_no_joel.json + CMD echo "python gen_metadata.py" diff --git a/config/config_enhance_no_joel.json b/config/config_enhance_no_joel.json new file mode 100644 index 0000000..8b8406f --- /dev/null +++ b/config/config_enhance_no_joel.json @@ -0,0 +1,4 @@ +{ + "ENHANCE": 1, + "JOEL": 0 +} diff --git a/gen_metadata.py b/gen_metadata.py index 120aab9..e69f740 100755 --- a/gen_metadata.py +++ b/gen_metadata.py @@ -27,7 +27,8 @@ # Look for the config directory in the same directory as this script root_dir_path = os.path.join(os.path.dirname(__file__)) -main_config_path = os.path.join(root_dir_path, 'config', 'config.json') +config_filename = os.environ.get('DM_CONFIG_FILENAME', 'config.json') +main_config_path = os.path.join(root_dir_path, 'config', config_filename) mask_config_path = os.path.join(root_dir_path, 'config', 'mask_rcnn_R_50_FPN_3x.yaml') VAL_SCALE_FAC = 0.5