Update deepaction_v1.py
Browse files- deepaction_v1.py +8 -2
deepaction_v1.py
CHANGED
|
@@ -62,7 +62,13 @@ class DeepActionV1(datasets.GeneratorBasedBuilder):
|
|
| 62 |
|
| 63 |
def _generate_examples(self, data_dir):
|
| 64 |
print(data_dir)
|
| 65 |
-
for
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
label_path = os.path.join(data_dir, label)
|
| 67 |
if os.path.isdir(label_path):
|
| 68 |
for subfolder in os.listdir(label_path):
|
|
@@ -74,4 +80,4 @@ class DeepActionV1(datasets.GeneratorBasedBuilder):
|
|
| 74 |
yield video_path, {
|
| 75 |
"video": video_path,
|
| 76 |
"label": label,
|
| 77 |
-
}
|
|
|
|
| 62 |
|
| 63 |
def _generate_examples(self, data_dir):
|
| 64 |
print(data_dir)
|
| 65 |
+
for data_point in data_dir:
|
| 66 |
+
yield video_path, {
|
| 67 |
+
"video": data_point,
|
| 68 |
+
"label": str(data_point).split("/")[-3],
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
"""for label in os.listdir(data_dir):
|
| 72 |
label_path = os.path.join(data_dir, label)
|
| 73 |
if os.path.isdir(label_path):
|
| 74 |
for subfolder in os.listdir(label_path):
|
|
|
|
| 80 |
yield video_path, {
|
| 81 |
"video": video_path,
|
| 82 |
"label": label,
|
| 83 |
+
}"""
|