ShixuanAn commited on
Commit
feb4365
1 Parent(s): 3d00faa

Update RDD_2020.py

Browse files
Files changed (1) hide show
  1. RDD_2020.py +30 -30
RDD_2020.py CHANGED
@@ -74,36 +74,36 @@ class RDD2020_Dataset(datasets.GeneratorBasedBuilder):
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", # Unique name for the first test split
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", # Unique name for the second test split
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
 
 
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