crowdAI is shutting down - please read our blog post for more information
Ants as tools to understand society
By Penn State University
over 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.
Perhaps I’m missing certain codecs?
over 3 years ago |
This was a problem with the mac previewer. The images display correctly in GIMP.
about 3 years ago |
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.
(1080, 1920, 3)
After you untar the tarball containing all the images, you can read them using the following script :
from PIL import Image
import numpy as np
for _file in glob.glob("frames/*.jpeg"):
frame_id = int(_file.split("/")[-1].split("."))
_im = Image.open(_file)
#If you want the image as a Numpy array
_im_array = np.asarray(_im)