diff --git a/src/eva/vision/data/datasets/segmentation/total_segmentator_2d.py b/src/eva/vision/data/datasets/segmentation/total_segmentator_2d.py index c5aadb15..e55e9e41 100644 --- a/src/eva/vision/data/datasets/segmentation/total_segmentator_2d.py +++ b/src/eva/vision/data/datasets/segmentation/total_segmentator_2d.py @@ -3,6 +3,7 @@ import functools import hashlib import os +import re from glob import glob from pathlib import Path from typing import Any, Callable, Dict, List, Literal, Tuple @@ -326,7 +327,7 @@ def _fetch_samples_dirs(self) -> List[str]: sample_filenames = [ filename for filename in os.listdir(self._root) - if os.path.isdir(os.path.join(self._root, filename)) and filename != "processed" + if os.path.isdir(os.path.join(self._root, filename)) and re.match(r"^s\d{4}$", filename) ] return sorted(sample_filenames)