NVIDIA / NVIDIA/DALI

Multi-label classification pipeline

Open
#1,933 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Just to confirm the current best approach of multilabel classification with DALI.

I'm following the instruction from #874 to create a multi-label loader and using the file_list to ingest an ID that points to the multi-hot encoding vector.

It is necessary to implement an ExternalSource to accomplish this?
Because, when I try to use the dictionary of <indices, labels> inside define_graph directly, I'm getting the following error:

File "train.py", line 64, in define_graph
    print((images, self.combinations(labels)))
TypeError: 'numpy.ndarray' object is not callable

What am I doing wrong?

My define_graph looks like this:

def define_graph(self):
        inputs, labels = self.reader(name="Reader")
        images = self.decode(inputs)
        if self.device is 'gpu':
            labels = labels.gpu()
        images = self.cmn(images)

        return (
            images,
            self.combinations(labels)
        )

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 train.py at line 64 and the guidance in issue #874; inspect how labels returned by the reader and self.combinations are represented inside define_graph. Reproduce the shown TypeError with the pipeline and determine whether the multi-label loader path requires ExternalSource; done when the current approach and corrected usage are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data-engineering, machine-learning
Issue type
Bug
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.