Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor update to path for storing iterative prompting results #797

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading