Loading
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more

crowdAI is shutting down - please read our blog post for more information

Ants Challenge - Part I

Ants as tools to understand society


Completed
26
Submissions
57
Participants
7460
Views

Images appear to be corrupted

Posted by forgetso about 3 years ago

I downloaded the dataset and upon expansion all of the images are corrupted when viewed on my mac. However, uploading the images to imgur shows that they can be viewed properly.

https://imgur.com/a/QZN71

Perhaps I’m missing certain codecs?

Posted by forgetso  about 3 years ago |  Quote

This was a problem with the mac previewer. The images display correctly in GIMP.

Posted by Sean  about 3 years ago |  Quote

Hi @forgetso, I just checked the dataset again. All the images are valid JPEG files in RGB mode, and if you load them into a numpy array they should have a shape of (1080, 1920, 3). The PIL.JpegImagePlugin is what I used to check the validity of all the files.

After you untar the tarball containing all the images, you can read them using the following script :

python import glob from PIL import Image import numpy as np for _file in glob.glob("frames/*.jpeg"): frame_id = int(_file.split("/")[-1].split(".")[0]) _im = Image.open(_file) #If you want the image as a Numpy array _im_array = np.asarray(_im)