Skip to content

Commit

Permalink
Merge pull request #10 from hdr-bgnn/9-fix-model-not-found
Browse files Browse the repository at this point in the history
Fix model not found error
  • Loading branch information
johnbradley authored Jan 18, 2023
2 parents 699e400 + 18a912c commit 8abd71d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 4 additions & 0 deletions config/config_enhance_no_joel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ENHANCE": 1,
"JOEL": 0
}
3 changes: 2 additions & 1 deletion gen_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8abd71d

Please sign in to comment.