pytorch / pytorch/vision

Custom Coco DataPipe

Open
#7,147 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

πŸ“š The doc issue

Hi, is it possible to subclass/reuse torchvision.prototype.datasets.Coco to create a custom COCO-format DataPipe? For example If I have the following data:

data/vision/tiny_coco
β”œβ”€β”€ instances_train2017_small.json
└── train_2017_small
    β”œβ”€β”€ 000000005802.jpg
    β”œβ”€β”€ 000000060623.jpg
    β”œβ”€β”€ 000000118113.jpg
    β”œβ”€β”€ 000000184613.jpg
    β”œβ”€β”€ 000000193271.jpg
    β”œβ”€β”€ 000000222564.jpg
    β”œβ”€β”€ 000000224736.jpg
    β”œβ”€β”€ 000000309022.jpg
    β”œβ”€β”€ 000000318219.jpg
    β”œβ”€β”€ 000000374628.jpg
    β”œβ”€β”€ 000000391895.jpg
    β”œβ”€β”€ 000000403013.jpg
    β”œβ”€β”€ 000000483108.jpg
    β”œβ”€β”€ 000000522418.jpg
    β”œβ”€β”€ 000000554625.jpg
    └── 000000574769.jpg
Suggest a potential alternative/fix

I think a lot of people could benefit from understanding how to reuse common format classes for DataPipes

cc @pmeier @bjuncek

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 examining torchvision.prototype.datasets.Coco and the example data/vision/tiny_coco layout described in the issue. Determine whether the class can be subclassed or reused for a custom COCO-format DataPipe, then document the supported approach and what users must provide for the JSON and image directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, data
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 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.