pytorch / pytorch/vision

Extend FakeDatasets for All Tasks

Open
#6,993 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

🚀 The feature

Fake Datasets help us to quickly verify and validate if the instantiated model would work fine. This enables quick validation for testing purpose as well as for faster prototyping.

We already have FakeDataset in torchvision for the same, but it supports only ImageClassification as of now.

Motivation, pitch

We should have multiple FakeData classes. Like ImageClassificationFakeData, ObjectDetectionFakeData.

If we do that, we should deprecate FakeData in favor of ImageClassificationFakeData.

We could also think of supporting different formats. E.g. Support xywh as well as xyxy format? Support formats such as Binary masks, boolean masks etc? (Not sure of this need to discuss)

Alternatives

Other libraries are maintaining something similar to test models. These libraries mostly wrap torchvision models into their framework equivalent codes and test on sample datasets.

https://github.com/Lightning-AI/lightning-bolts/blob/master/tests/models/test_detection.py

https://github.com/Lightning-AI/lightning-flash/blob/master/tests/image/detection/test_model.py

https://github.com/oke-aditya/quickvision/blob/master/tests/dataset_utils.py

Additional context

@pmeier please chip in your thoughts!

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

Review the existing FakeData implementation in torchvision and compare the linked detection-test examples. Clarify which task-specific dataset classes and target formats are in scope, then define completion criteria and tests for each supported task; the issue provides no file path or test entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.