Setting `flickr8k` from `illinois.edu` to `root` argument of `Flickr8k()` doesn't load any images, returning the length `0`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🐛 Describe the bug
Setting flickr8k from illinois.edu to root argument of Flickr8k() doesn't load any images, returning the length 0 as shown below. *I used the absolute paths on Windows 11:
flickr8k
|- Images
| |- *.jpg
| ...
|- CrowdFlowerAnnotations.txt
|- ExpertAnnotations.txt
|- Flickr_8k.devImages.txt
|- Flickr_8k.testImages.txt
|- Flickr_8k.trainImages.txt
|- Flickr8k.lemma.token.txt
|- Flickr8k.token.txt
└ readme.txt
from torchvision import datasets
train_data = datasets.Flickr8k(
root="C:/Users/<user>/dl-models/data/flickr8k/images", # Here
ann_file="C:/Users/<user>/dl-models/data/flickr8k/CrowdFlowerAnnotations.txt"
)
print(len(train_data)) # 0
from torchvision import datasets
train_data = datasets.Flickr8k(
root="C:/Users/<user>/dl-models/data/flickr8k", # Here
ann_file="C:/Users/<user>/dl-models/data/flickr8k/CrowdFlowerAnnotations.txt"
)
print(len(train_data)) # 0
Versions
import torchvision
torchvision.__version__ # '0.20.1'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the torchvision.datasets.Flickr8k() entry point and compare how root, ann_file, and the listed Images directory are interpreted. Reproduce the Windows layout with CrowdFlowerAnnotations.txt and check why len(train_data) is 0. Done means the documented layout and both shown root choices either load the expected images or produce a clear path-related error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100