fix
Browse files- README.md +12 -6
- dogs-video-object-tracking-dataset.py +4 -7
README.md
CHANGED
@@ -45,8 +45,10 @@ dataset_info:
|
|
45 |
dtype: string
|
46 |
splits:
|
47 |
- name: train
|
48 |
-
|
49 |
-
|
|
|
|
|
50 |
- config_name: video_02
|
51 |
features:
|
52 |
- name: id
|
@@ -83,8 +85,10 @@ dataset_info:
|
|
83 |
dtype: string
|
84 |
splits:
|
85 |
- name: train
|
86 |
-
|
87 |
-
|
|
|
|
|
88 |
- config_name: video_03
|
89 |
features:
|
90 |
- name: id
|
@@ -121,8 +125,10 @@ dataset_info:
|
|
121 |
dtype: string
|
122 |
splits:
|
123 |
- name: train
|
124 |
-
|
125 |
-
|
|
|
|
|
126 |
---
|
127 |
|
128 |
# Dogs Video Object Tracking Dataset
|
|
|
45 |
dtype: string
|
46 |
splits:
|
47 |
- name: train
|
48 |
+
num_bytes: 34542
|
49 |
+
num_examples: 52
|
50 |
+
download_size: 313334253
|
51 |
+
dataset_size: 34542
|
52 |
- config_name: video_02
|
53 |
features:
|
54 |
- name: id
|
|
|
85 |
dtype: string
|
86 |
splits:
|
87 |
- name: train
|
88 |
+
num_bytes: 38528
|
89 |
+
num_examples: 58
|
90 |
+
download_size: 67368145
|
91 |
+
dataset_size: 38528
|
92 |
- config_name: video_03
|
93 |
features:
|
94 |
- name: id
|
|
|
125 |
dtype: string
|
126 |
splits:
|
127 |
- name: train
|
128 |
+
num_bytes: 32550
|
129 |
+
num_examples: 49
|
130 |
+
download_size: 148418007
|
131 |
+
dataset_size: 32550
|
132 |
---
|
133 |
|
134 |
# Dogs Video Object Tracking Dataset
|
dogs-video-object-tracking-dataset.py
CHANGED
@@ -80,16 +80,13 @@ class DogsVideoObjectTrackingDataset(datasets.GeneratorBasedBuilder):
|
|
80 |
|
81 |
def _split_generators(self, dl_manager):
|
82 |
images = dl_manager.download_and_extract(f"{_DATA}{self.config.name}.zip")
|
83 |
-
masks = dl_manager.download_and_extract(f"{_DATA}{self.config.name}_masks.zip")
|
84 |
annotations = dl_manager.download(f"{_DATA}{self.config.name}.xml")
|
85 |
images = dl_manager.iter_files(images)
|
86 |
-
masks = dl_manager.iter_files(masks)
|
87 |
return [
|
88 |
datasets.SplitGenerator(
|
89 |
name=datasets.Split.TRAIN,
|
90 |
gen_kwargs={
|
91 |
"images": images,
|
92 |
-
"masks": masks,
|
93 |
"annotations": annotations,
|
94 |
},
|
95 |
),
|
@@ -155,11 +152,11 @@ class DogsVideoObjectTrackingDataset(datasets.GeneratorBasedBuilder):
|
|
155 |
|
156 |
return shape_data
|
157 |
|
158 |
-
def _generate_examples(self, images,
|
159 |
tree = ET.parse(annotations)
|
160 |
root = tree.getroot()
|
161 |
|
162 |
-
for idx,
|
163 |
if "images" in image:
|
164 |
i = image.split("_")[-1][:2]
|
165 |
image_name = image.split("/")[3]
|
@@ -172,7 +169,7 @@ class DogsVideoObjectTrackingDataset(datasets.GeneratorBasedBuilder):
|
|
172 |
yield idx, {
|
173 |
"id": image_id,
|
174 |
"name": image,
|
175 |
-
"image": f"{images}/image",
|
176 |
-
"mask": f"{masks}
|
177 |
"shapes": shapes,
|
178 |
}
|
|
|
80 |
|
81 |
def _split_generators(self, dl_manager):
|
82 |
images = dl_manager.download_and_extract(f"{_DATA}{self.config.name}.zip")
|
|
|
83 |
annotations = dl_manager.download(f"{_DATA}{self.config.name}.xml")
|
84 |
images = dl_manager.iter_files(images)
|
|
|
85 |
return [
|
86 |
datasets.SplitGenerator(
|
87 |
name=datasets.Split.TRAIN,
|
88 |
gen_kwargs={
|
89 |
"images": images,
|
|
|
90 |
"annotations": annotations,
|
91 |
},
|
92 |
),
|
|
|
152 |
|
153 |
return shape_data
|
154 |
|
155 |
+
def _generate_examples(self, images, annotations):
|
156 |
tree = ET.parse(annotations)
|
157 |
root = tree.getroot()
|
158 |
|
159 |
+
for idx, image in enumerate(images):
|
160 |
if "images" in image:
|
161 |
i = image.split("_")[-1][:2]
|
162 |
image_name = image.split("/")[3]
|
|
|
169 |
yield idx, {
|
170 |
"id": image_id,
|
171 |
"name": image,
|
172 |
+
"image": f"{images}/images/{image}",
|
173 |
+
"mask": f"{images}/masks/{image}",
|
174 |
"shapes": shapes,
|
175 |
}
|