pytorch / pytorch/vision

ImageNet rogue PNG file

Open
#2,294 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

module: datasets
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

Sorry if this has been addressed here and I can't find the discussion, but it's the same issue as here:
https://github.com/soumith/imagenet-multiGPU.torch/issues/43

The file train/n02105855/n02105855_2933.JPEG from ILSVRC 2012 is actually a PNG file. This is triggering the following warning from PIL, and I'm guessing it can't handle this type of error automatically (pillow==7.1.1, torchvision==0.5.0, pytorch=1.4.0).

/miniconda3/envs/pytorch/lib/python3.7/site-packages/PIL/TiffImagePlugin.py:788: 
UserWarning: Corrupt EXIF data.  Expecting to read 4 bytes but only got 0. 

Should this be handled in the ImageNet class? Or would you prefer we do it ourselves?

Thank you!

cc @pmeier

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ImageNet class and reproducing the warning with train/n02105855/n02105855_2933.JPEG using the reported Pillow, torchvision, and PyTorch versions. Determine the expected handling for this PNG-disguised-as-JPEG file, then verify that ImageNet loading completes without the reported warning or failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.