Skip to content

Commit

Permalink
#197 read roi_id to extract shorelines from config
Browse files Browse the repository at this point in the history
  • Loading branch information
2320sharon committed Oct 24, 2023
1 parent 92f306f commit 5cf85b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/coastseg/zoo_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,8 @@ def extract_shorelines_with_unet(
config = file_utilities.load_json_data_from_file(
session_path, "config.json"
)
# get the roi_id either from the recent model segmentation or the config file
if settings.get("sample_direc"):
roi_id = file_utilities.extract_roi_id(settings.get("sample_direc", ""))
elif config.get("roi_ids"):
# get the roi_id from the config file
if config.get("roi_ids"):
roi_id = config["roi_ids"][0]
roi_settings = config[roi_id]
except (KeyError, ValueError) as e:
Expand Down

0 comments on commit 5cf85b8

Please sign in to comment.