Update RDD_2020.py
Browse files- RDD_2020.py +27 -27
RDD_2020.py
CHANGED
@@ -75,33 +75,33 @@ class RDD2020_Dataset(datasets.GeneratorBasedBuilder):
|
|
75 |
)
|
76 |
|
77 |
def _split_generators(self, dl_manager):
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
|
107 |
|
|
|
75 |
)
|
76 |
|
77 |
def _split_generators(self, dl_manager):
|
78 |
+
data_dir = dl_manager.download_and_extract(_URLS["dataset"])
|
79 |
+
return [
|
80 |
+
datasets.SplitGenerator(
|
81 |
+
name=datasets.Split.TRAIN,
|
82 |
+
gen_kwargs={
|
83 |
+
"images_dir": os.path.join(data_dir, "train"),
|
84 |
+
"annotations_dir": os.path.join(data_dir, "train", "annotations", "xmls"),
|
85 |
+
"split": "train",
|
86 |
+
},
|
87 |
+
),
|
88 |
+
datasets.SplitGenerator(
|
89 |
+
name=datasets.Split.TEST,
|
90 |
+
gen_kwargs={
|
91 |
+
"images_dir": os.path.join(data_dir, "test1"),
|
92 |
+
"annotations_dir": os.path.join(data_dir, "test1", "annotations", "xmls"),
|
93 |
+
"split": "test1",
|
94 |
+
},
|
95 |
+
),
|
96 |
+
datasets.SplitGenerator(
|
97 |
+
name=datasets.Split.VALIDATION,
|
98 |
+
gen_kwargs={
|
99 |
+
"images_dir": os.path.join(data_dir, "test2"),
|
100 |
+
"annotations_dir": os.path.join(data_dir, "test2", "annotations", "xmls"),
|
101 |
+
"split": "test2",
|
102 |
+
},
|
103 |
+
),
|
104 |
+
]
|
105 |
|
106 |
|
107 |
|