ShixuanAn commited on
Commit
231bbd7
1 Parent(s): 5482b91

Update RDD_2020.py

Browse files
Files changed (1) hide show
  1. 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
- 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
 
 
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