def get_gt_seg_maps(self, efficient_test=None):
        """Get ground truth segmentation maps for evaluation."""
        if efficient_test is not None:
            warnings.warn(
                "DeprecationWarning: ``efficient_test`` has been deprecated "
                "since MMSeg v0.16, the ``get_gt_seg_maps()`` is CPU memory "
                "friendly by default. "
            )

        mask_col = self._get_masks(self.masks_tensor_name)
        last_successful_index = -1
        for idx in range(len(self)):
            try:
                result = upcast_array(mask_col[idx])
                last_successful_index = idx
                yield result
            except Exception as e:
                print(f"Error processing mask at index {idx}: {e}")
                if last_successful_index == -1:
                    continue
                else:
                    yield upcast_array(mask_col[last_successful_index])
Get ground truth segmentation maps for evaluation.
python/deeplake/integrations/mmseg/mmseg_dataset_.py