diff --git a/mmseg/datasets/pipelines/formatting.py b/mmseg/datasets/pipelines/formatting.py index bbc04ba74..9c390022a 100644 --- a/mmseg/datasets/pipelines/formatting.py +++ b/mmseg/datasets/pipelines/formatting.py @@ -69,7 +69,8 @@ class PackSegInputs(BaseTransform): data_sample = SegDataSample() if 'gt_seg_map' in results: gt_sem_seg_data = dict( - data=results['gt_seg_map'][None, ...].astype(np.int64)) + data=to_tensor(results['gt_seg_map'][None, + ...].astype(np.int64))) data_sample.gt_sem_seg = PixelData(**gt_sem_seg_data) img_meta = {}