fix: script
Browse files
printed-2d-masks-with-holes-for-eyes-attacks.py
CHANGED
@@ -124,8 +124,8 @@ class Printed2dMasksWithHolesForEyesAttacks(datasets.GeneratorBasedBuilder):
|
|
124 |
def _generate_examples(self, images, attacks, annotations):
|
125 |
annotations_df = pd.read_csv(annotations, sep=';')
|
126 |
|
127 |
-
for idx, (image_path, (attack_path,
|
128 |
-
|
129 |
image_name = Path(image_path).name
|
130 |
yield idx, {
|
131 |
"photo":
|
|
|
124 |
def _generate_examples(self, images, attacks, annotations):
|
125 |
annotations_df = pd.read_csv(annotations, sep=';')
|
126 |
|
127 |
+
for idx, (image_path, (attack_path, attack)) in enumerate(
|
128 |
+
zip(sorted(images), sorted(attacks, key=lambda x: x[0]))):
|
129 |
image_name = Path(image_path).name
|
130 |
yield idx, {
|
131 |
"photo":
|