diff --git a/otx/core/data/adapter/segmentation_dataset_adapter.py b/otx/core/data/adapter/segmentation_dataset_adapter.py index dcd149aeb0c..e09342e6ebb 100644 --- a/otx/core/data/adapter/segmentation_dataset_adapter.py +++ b/otx/core/data/adapter/segmentation_dataset_adapter.py @@ -236,10 +236,6 @@ def _import_dataset( # FIXME: Because background class is ignored when generating polygons, meta is set with len(labels)-1. # It must be considered to set the whole labels later. # (-> {i: f"target{i+1}" for i in range(max(total_labels)+1)}) - if total_labels == [0]: - # FIXME: When there is only 'background', 'background' should be saved. - # This is just for test case. - total_labels = [1] meta = {"label_map": {i + 1: f"target{i+1}" for i in range(max(total_labels))}} with open(os.path.join(pseudo_mask_dir, "dataset_meta.json"), "w", encoding="UTF-8") as f: json.dump(meta, f, indent=4) diff --git a/tests/assets/common_semantic_segmentation_dataset/train/images/0001.png b/tests/assets/common_semantic_segmentation_dataset/train/images/0001.png index 02d1fe884f7..058399a1726 100644 Binary files a/tests/assets/common_semantic_segmentation_dataset/train/images/0001.png and b/tests/assets/common_semantic_segmentation_dataset/train/images/0001.png differ diff --git a/tests/assets/common_semantic_segmentation_dataset/train/images/0002.png b/tests/assets/common_semantic_segmentation_dataset/train/images/0002.png index 02d1fe884f7..058399a1726 100644 Binary files a/tests/assets/common_semantic_segmentation_dataset/train/images/0002.png and b/tests/assets/common_semantic_segmentation_dataset/train/images/0002.png differ diff --git a/tests/assets/common_semantic_segmentation_dataset/train/images/0003.png b/tests/assets/common_semantic_segmentation_dataset/train/images/0003.png index 02d1fe884f7..058399a1726 100644 Binary files a/tests/assets/common_semantic_segmentation_dataset/train/images/0003.png and b/tests/assets/common_semantic_segmentation_dataset/train/images/0003.png differ