pytorch / pytorch/vision

**VOCtrainval_25-May-2011.tar** downloaded with `VOCSegmentation()` and `VOCDetection()` is extracted to `data/` as **TrainVal/VOCdevkit/VOC2011/** but not to `data/VOCdevkit/` as **VOC2011/**

Open
#8,773 1 comment 0 reactions 0 assignees View on GitHub

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

VOCtrainval_25-May-2011.tar downloaded with VOCSegmentation() and VOCDetection() is extracted to data/ as TrainVal/VOCdevkit/VOC2011/ but not to data/VOCdevkit/ as VOC2011/ as shown below, then TrainVal/VOCdevkit/VOC2011 is loaded from data/. *Other zip files are properly extracted to and loaded from data/VOCdevkit/:

from torchvision import datasets

train_data = datasets.VOCSegmentation(
    root="data",
    year="2011",
    image_set="trainval",
    download=True,
)
from torchvision import datasets

train_data = datasets.VOCDetection(
    root="data",
    year="2011",
    image_set="trainval",
    download=True,
)
data
 |-VOCdevkit
 |  |-VOC2007
 |  |-VOC2008
 |  |-VOC2009
 |  |-VOC2010
 |  └-VOC2012
 └-TrainVal # Here
    └-VOCdevkit
       └-VOC2011

In addition, I moved VOC2011/ from data/TrainVal/VOCdevkit/ to data/VOCdevkit/, then it was not loaded:

data
 |-VOCdevkit
 |  |-VOC2007
 |  |-VOC2008
 |  |-VOC2009
 |  |-VOC2010
 |  |-VOC2011<---┐
 |  └-VOC2012    |
 └-TrainVal      |
    └-VOCdevkit  |
       └-       -┘
Versions
import torchvision

torchvision.__version__ # '0.20.1'

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 running the VOCSegmentation and VOCDetection examples with year="2011", image_set="trainval", and download=True, then inspect the dataset download and extraction entry points. Done means VOC2011 is extracted under data/VOCdevkit/ and is subsequently loaded from that location, consistently with the other VOC years.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.