diff --git a/dan/manager/dataset.py b/dan/manager/dataset.py index b93cae10b7efcfd61f1aa2ddc2eb071bcb6a7f51..2b28e6dc1428b57a0c247ef92b8ef6acb8b32377 100644 --- a/dan/manager/dataset.py +++ b/dan/manager/dataset.py @@ -272,13 +272,6 @@ class GenericDataset(Dataset): ) if load_in_memory: samples[-1]["img"] = GenericDataset.load_image(filename) - if type(gt[filename]) is dict: - if "lines" in gt[filename].keys(): - samples[-1]["raw_line_seg_label"] = gt[filename]["lines"] - if "paragraphs" in gt[filename].keys(): - samples[-1]["paragraphs_label"] = gt[filename]["paragraphs"] - if "pages" in gt[filename].keys(): - samples[-1]["pages_label"] = gt[filename]["pages"] return samples def apply_preprocessing(self, preprocessings): @@ -421,15 +414,6 @@ def apply_preprocessing(sample, preprocessings): temp_img = np.expand_dims(temp_img, axis=2) img = temp_img resize_ratio = [ratio, ratio] - if resize_ratio != [1, 1] and "raw_line_seg_label" in sample: - for li in range(len(sample["raw_line_seg_label"])): - for side, ratio in zip( - (["bottom", "top"], ["right", "left"]), resize_ratio - ): - for s in side: - sample["raw_line_seg_label"][li][s] = ( - sample["raw_line_seg_label"][li][s] * ratio - ) sample["img"] = img sample["resize_ratio"] = resize_ratio