diff --git a/dinov2/data/datasets/foundation.py b/dinov2/data/datasets/foundation.py index e0c1a42ec..7dff9dd2c 100644 --- a/dinov2/data/datasets/foundation.py +++ b/dinov2/data/datasets/foundation.py @@ -84,7 +84,7 @@ def _load_cohort_names(self) -> dict: def get_image_data(self, index: int) -> bytes: entry = self._entries[index] - start_offset, end_offset, cohort_idx = entry[1], entry[2], entry[3], entry[4] + start_offset, end_offset, cohort_idx = entry[2], entry[3], entry[4] cohort_name = self._cohort_names[cohort_idx] class_mmap = self._mmap_tarball(cohort_name) data = class_mmap[start_offset:end_offset] diff --git a/dinov2/data/datasets/pathology.py b/dinov2/data/datasets/pathology.py index 5f9cb6cbe..00e68169a 100644 --- a/dinov2/data/datasets/pathology.py +++ b/dinov2/data/datasets/pathology.py @@ -58,7 +58,7 @@ def _load_entries(self, _entries_name: str) -> np.ndarray: def get_image_data(self, index: int) -> bytes: entry = self._entries[index] - start_offset, end_offset = entry[1], entry[2], entry[3] + start_offset, end_offset = entry[2], entry[3] mapped_data = self._mmap_tarball[start_offset:end_offset] return mapped_data