NVIDIA / NVIDIA/DALI

Can dali webdataset reader work out classes from folder structure?

Open
#4,146 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
C++
Stars
5.8k
Forks
678
Avg merge
3d 1h
Merged PRs (30d)
27

Description

The webdataset reader seems to require a file to define the class per image in a tar?
As shown in this example: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/examples/general/data_loading/dataloading_webdataset.html

The standard nvidia.dali.fn.readers.file can work out the class from the folder structure as per:
https://docs.nvidia.com/deeplearning/dali/user-guide/docs/operations/nvidia.dali.fn.readers.file.html

Is it possible to get derive the label for a file from the folder that it is in with webdataset or do I need to add an extra file per sample for the class?

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 with the linked webdataset data-loading example and the readers.file operation documentation, then compare how each reader obtains labels. Determine whether folder-derived labels are supported and identify the relevant reader entry points or tests. Done means the supported behavior and any required change are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.