Skip to content

MultiTask empty label problem #1395

Answered by mzr1996
peng-peng0913 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, here are two methods:

  1. Format your annotation file in the MultiTaskDataset required format.
    https://github.com/open-mmlab/mmclassification/blob/654a337d3e93364328044d110b25441d907f4bd6/mmcls/datasets/multi_task.py#L32-L58
  2. Implement your own dataset class to handle your annotation file, you can find tutorial here, and the returned info should be like
[{'img_path': xxx1.jpg,
  'gt_label': {
      'task1': 0,
      'task2': 2,
      'task3': 1,
     }
 },
 {'img_path': xxx2.jpg,
  'gt_label': {
      'task2': 1,
      'task3': 0,
     }
 }
 ...
]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@peng-peng0913
Comment options

Answer selected by peng-peng0913
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants