Datasets:
Yanpeng Yuan
commited on
Commit
·
9a9445b
1
Parent(s):
7392d5e
update
Browse files
zhlds.py
CHANGED
|
@@ -32,7 +32,6 @@ _ELEVATER_CITATION = """\
|
|
| 32 |
journal={Neural Information Processing Systems},
|
| 33 |
year={2022}
|
| 34 |
}
|
| 35 |
-
|
| 36 |
Note that each ELEVATER dataset has its own citation. Please see the source to
|
| 37 |
get the correct citation for each contained dataset.
|
| 38 |
"""
|
|
@@ -159,16 +158,12 @@ class ELEVATER(datasets.GeneratorBasedBuilder):
|
|
| 159 |
with open(index, "r") as f:
|
| 160 |
lines = f.readlines()
|
| 161 |
for i, line in enumerate(lines):
|
| 162 |
-
print(f"i: {i}, line: {line}")
|
| 163 |
line_split = line[:-1].split(" ")
|
| 164 |
label = int(line_split[1])
|
| 165 |
image_path = line_split[0].split('@')[1]
|
| 166 |
path = images + '/' + image_path
|
| 167 |
-
print(path)
|
| 168 |
yield i, {
|
| 169 |
"image_file_path": path,
|
| 170 |
"image": path,
|
| 171 |
"labels": label,
|
| 172 |
-
}
|
| 173 |
-
if i == 5:
|
| 174 |
-
print(good)
|
|
|
|
| 32 |
journal={Neural Information Processing Systems},
|
| 33 |
year={2022}
|
| 34 |
}
|
|
|
|
| 35 |
Note that each ELEVATER dataset has its own citation. Please see the source to
|
| 36 |
get the correct citation for each contained dataset.
|
| 37 |
"""
|
|
|
|
| 158 |
with open(index, "r") as f:
|
| 159 |
lines = f.readlines()
|
| 160 |
for i, line in enumerate(lines):
|
|
|
|
| 161 |
line_split = line[:-1].split(" ")
|
| 162 |
label = int(line_split[1])
|
| 163 |
image_path = line_split[0].split('@')[1]
|
| 164 |
path = images + '/' + image_path
|
|
|
|
| 165 |
yield i, {
|
| 166 |
"image_file_path": path,
|
| 167 |
"image": path,
|
| 168 |
"labels": label,
|
| 169 |
+
}
|
|
|
|
|
|