-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
File "scripts/training/run_pretraining.py", line 465, in preprocess_images
examples["pixel_values"] = [transforms(image) for image in examples[image_column_name]] # bytes, path
File "scripts/training/run_pretraining.py", line 465, in <listcomp>
examples["pixel_values"] = [transforms(image) for image in examples[image_column_name]] # bytes, path
File "/usr/local/lib/python3.8/dist-packages/torchvision/transforms/transforms.py", line 61, in __call__
img = t(img)
File "/usr/local/lib/python3.8/dist-packages/torchvision/transforms/transforms.py", line 437, in __call__
return self.lambd(img)
File "/cpfs/shared/research/public-data/cv/driving/pixel/pixel-main/src/pixel/pixel_utils/transforms.py", line 211, in <lambda>
transforms = [Lambda(lambda img: img.convert("RGB") if img.mode != "RGB" else img)]
AttributeError: 'dict' object has no attribute 'mode'
I used the pre-rendered data which i manually downloaded from the website.
And I found that the data is a dict which contains keys {'path', 'bytes'}, which is not RGB image.
How could I do data transform?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels