Commit 3a3e406b authored by Amelie Royer's avatar Amelie Royer 🐼

minor correction: - features = {}

parent 08f4bd68
......@@ -99,8 +99,6 @@ class CartoonSetConverter(Converter):
image_files = [x for x in os.listdir(os.path.join(self.data_dir, folder)) if x.endswith('.png')]
for j, image_path in enumerate(image_files):
print('\r folder %d/%d: image %d/%d' % (i + 1, len(split), j + 1, len(image_files)), end='')
feature = {}
# Image
full_image_path = os.path.join(self.data_dir, folder, image_path)
if save_image_in_records:
......@@ -116,6 +114,7 @@ class CartoonSetConverter(Converter):
reader = csv.reader(f)
attributes = {row[0]: [int(row[1])] for row in reader}
attributes = [attributes[k] for k in sorted(attributes.keys())]
# Write
writer.write(self.create_example_proto([img],
bbox.flatten(),
......
......@@ -98,8 +98,6 @@ class CelebaConverter(Converter):
print('\nLoad', name)
for i, path in enumerate(split):
print('\rImage %d/%d' % (i + 1, len(split)), end='')
feature = {}
# Image
image_path = os.path.join(self.image_dir, path)
img = mpimg.imread(os.path.join(self.data_dir, image_path))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment