Skip to content

Commit

Permalink
Minor update to path for storing iterative prompting results (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
anwai98 authored Nov 23, 2024
1 parent 2898995 commit e22eb18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion micro_sam/evaluation/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def run_evaluation_for_iterative_prompting(
experiment_folder: Union[os.PathLike, str],
start_with_box_prompt: bool = False,
overwrite_results: bool = False,
use_masks: bool = False,
) -> pd.DataFrame:
"""Run evaluation for iterative prompt-based segmentation predictions.
Expand All @@ -87,14 +88,17 @@ def run_evaluation_for_iterative_prompting(
experiment_folder: The folder where all the experiment results are stored.
start_with_box_prompt: Whether to evaluate on experiments with iterative prompting starting with box.
overwrite_results: Whether to overwrite the results to update them with the new evaluation run.
use_masks: Whether to use masks for iterative prompting.
Returns:
A DataFrame that contains the evaluation results.
"""
assert os.path.exists(prediction_root), prediction_root

# Save the results in the experiment folder
result_folder = os.path.join(experiment_folder, "results")
result_folder = os.path.join(
experiment_folder, "results", "iterative_prompting_" + ("with" if use_masks else "without") + "_mask"
)
os.makedirs(result_folder, exist_ok=True)

csv_path = os.path.join(
Expand Down

0 comments on commit e22eb18

Please sign in to comment.