Datasets:
Yanpeng Yuan
commited on
Commit
·
7392d5e
1
Parent(s):
ae62b17
update
Browse files
zhlds.py
CHANGED
|
@@ -159,12 +159,16 @@ class ELEVATER(datasets.GeneratorBasedBuilder):
|
|
| 159 |
with open(index, "r") as f:
|
| 160 |
lines = f.readlines()
|
| 161 |
for i, line in enumerate(lines):
|
|
|
|
| 162 |
line_split = line[:-1].split(" ")
|
| 163 |
label = int(line_split[1])
|
| 164 |
image_path = line_split[0].split('@')[1]
|
| 165 |
path = images + '/' + image_path
|
|
|
|
| 166 |
yield i, {
|
| 167 |
"image_file_path": path,
|
| 168 |
"image": path,
|
| 169 |
"labels": label,
|
| 170 |
-
}
|
|
|
|
|
|
|
|
|
| 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)
|