fix: file_name
Browse files
hand-gesture-recognition-dataset.py
CHANGED
@@ -69,15 +69,16 @@ class HandGestureRecognitionDataset(datasets.GeneratorBasedBuilder):
|
|
69 |
data = {'set_id': set_id}
|
70 |
|
71 |
for file in files_set:
|
72 |
-
|
|
|
73 |
data['fist'] = file
|
74 |
-
elif 'four' in
|
75 |
data['four'] = file
|
76 |
-
elif 'me' in
|
77 |
data['me'] = file
|
78 |
-
elif 'one' in
|
79 |
data['one'] = file
|
80 |
-
elif 'small' in
|
81 |
data['small'] = file
|
82 |
-
print(data)
|
83 |
yield idx, data
|
|
|
69 |
data = {'set_id': set_id}
|
70 |
|
71 |
for file in files_set:
|
72 |
+
file_name = file.split('/')[-1]
|
73 |
+
if 'fist' in file_name.lower():
|
74 |
data['fist'] = file
|
75 |
+
elif 'four' in file_name.lower():
|
76 |
data['four'] = file
|
77 |
+
elif 'me' in file_name.lower():
|
78 |
data['me'] = file
|
79 |
+
elif 'one' in file_name.lower():
|
80 |
data['one'] = file
|
81 |
+
elif 'small' in file_name.lower():
|
82 |
data['small'] = file
|
83 |
+
# print(data)
|
84 |
yield idx, data
|