Update testdata.py
Browse files- testdata.py +2 -7
testdata.py
CHANGED
|
@@ -73,11 +73,6 @@ class TestData(datasets.GeneratorBasedBuilder):
|
|
| 73 |
features=datasets.Features(
|
| 74 |
{
|
| 75 |
"image": datasets.Image(),
|
| 76 |
-
"objects": datasets.Sequence(
|
| 77 |
-
{
|
| 78 |
-
"faces": datasets.Sequence(datasets.Value("float32"), length=4),
|
| 79 |
-
}
|
| 80 |
-
),
|
| 81 |
}
|
| 82 |
),
|
| 83 |
supervised_keys=None,
|
|
@@ -106,11 +101,11 @@ class TestData(datasets.GeneratorBasedBuilder):
|
|
| 106 |
objects = []
|
| 107 |
idx = 0
|
| 108 |
#datasets.logging.info(image_dir)
|
| 109 |
-
for file in glob
|
| 110 |
objects.append({
|
| 111 |
'faces': [1.0, 2.0, 3.0, 4.0]
|
| 112 |
})
|
| 113 |
-
yield idx, {"image": file
|
| 114 |
idx += 1
|
| 115 |
# for file_type in IMG_EXT:
|
| 116 |
# files.extend(list(Path(image_dir).glob(f'**/*.{file_type}')))
|
|
|
|
| 73 |
features=datasets.Features(
|
| 74 |
{
|
| 75 |
"image": datasets.Image(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
}
|
| 77 |
),
|
| 78 |
supervised_keys=None,
|
|
|
|
| 101 |
objects = []
|
| 102 |
idx = 0
|
| 103 |
#datasets.logging.info(image_dir)
|
| 104 |
+
for file in glob(os.path.join(image_dir, "*.png")):
|
| 105 |
objects.append({
|
| 106 |
'faces': [1.0, 2.0, 3.0, 4.0]
|
| 107 |
})
|
| 108 |
+
yield idx, {"image": file}
|
| 109 |
idx += 1
|
| 110 |
# for file_type in IMG_EXT:
|
| 111 |
# files.extend(list(Path(image_dir).glob(f'**/*.{file_type}')))
|