pytorch / pytorch/vision

Use multiple processes when extracting ImageNet training archive

Open
#2,023 0 comments 0 reactions 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

🚀 Feature

Use multiple processes when extracting ImageNet training archive.

Motivation

I recently extracting the ImageNet training archive with the code of torchvision and was suprised how long it took. I realised that after extracting the main archive, we only extract the subarchives one after another:

https://github.com/pytorch/vision/blob/3c254fb7af5f8af252c24e89949c54a3461ff0be/torchvision/datasets/imagenet.py#L183-L184

Pitch

I think we can speed that up significantly by using multiple processes to do this simultaneously. IMO doing this would have no drawbacks.

Additional context

If we want this feature, I could take it up, albeit with a low priority.

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 in torchvision/datasets/imagenet.py at the linked extraction logic around lines 183-184, where the ImageNet subarchives are processed sequentially. Investigate how the archive and its subarchives are currently extracted, then verify that the subarchives can be processed concurrently while producing the same extracted dataset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, data
Issue type
Feature
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.