Skip to content

Commit a17267d

Browse files
tqdm
1 parent 5b18c4c commit a17267d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/evaluation/eval_dataset.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33

44
import numpy as np
5+
from tqdm import tqdm
56

67
try:
78
from .eval_case import evaluate_case
@@ -82,12 +83,12 @@ def evaluate_dataset(dataset_path, pred_dir, subjects=None, quiet=False):
8283
gt_pet_paths = []
8384
organ_seg_paths = []
8485

85-
for subject_id, (with_pet, with_ct) in pred_layout.items():
86+
for subject_id, (with_pet, with_ct) in tqdm(pred_layout.items(), desc="Evaluating subjects"):
8687
subject_path = os.path.join(dataset_path, subject_id)
8788
pred_pet = os.path.join(pred_dir, subject_id, "pet.nii.gz") if with_pet else None
8889
pred_ct = os.path.join(pred_dir, subject_id, "ct.nii.gz") if with_ct else None
8990

90-
per_subject[subject_id] = evaluate_case(subject_path, pred_pet, pred_ct, quiet=quiet)
91+
per_subject[subject_id] = evaluate_case(subject_path, pred_pet, pred_ct, quiet=True)
9192

9293
if with_pet:
9394
pred_pet_paths.append(pred_pet)

0 commit comments

Comments
 (0)