Update RDD_2020.py
Browse files- RDD_2020.py +30 -30
RDD_2020.py
CHANGED
@@ -74,36 +74,36 @@ class RDD2020_Dataset(datasets.GeneratorBasedBuilder):
|
|
74 |
citation=_CITATION,
|
75 |
)
|
76 |
|
77 |
-
|
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 |
|
108 |
|
109 |
|
|
|
74 |
citation=_CITATION,
|
75 |
)
|
76 |
|
77 |
+
def _split_generators(self, dl_manager):
|
78 |
+
"""This method downloads/extracts the data and defines the splits."""
|
79 |
+
data_dir = dl_manager.download_and_extract(_URLS["dataset"])
|
80 |
+
|
81 |
+
return [
|
82 |
+
datasets.SplitGenerator(
|
83 |
+
name=datasets.Split.TRAIN,
|
84 |
+
gen_kwargs={
|
85 |
+
"images_dir": os.path.join(data_dir, "train"),
|
86 |
+
"annotations_dir": os.path.join(data_dir, "train", "annotations"),
|
87 |
+
"split": "train",
|
88 |
+
},
|
89 |
+
),
|
90 |
+
datasets.SplitGenerator(
|
91 |
+
name="test1",
|
92 |
+
gen_kwargs={
|
93 |
+
"images_dir": os.path.join(data_dir, "test1"),
|
94 |
+
"annotations_dir": os.path.join(data_dir, "test1", "annotations"),
|
95 |
+
"split": "test1",
|
96 |
+
},
|
97 |
+
),
|
98 |
+
datasets.SplitGenerator(
|
99 |
+
name="test2",
|
100 |
+
gen_kwargs={
|
101 |
+
"images_dir": os.path.join(data_dir, "test2"),
|
102 |
+
"annotations_dir": os.path.join(data_dir, "test2", "annotations"),
|
103 |
+
"split": "test2",
|
104 |
+
},
|
105 |
+
),
|
106 |
+
]
|
107 |
|
108 |
|
109 |
|