Define mixed label types for multitask? (e.g., segmentation + "per image" classification)

#1

Hi,
Hope I’m not duplicating - couldn’t find a clear solution anywhere:
I have a segmentation problem, to which I want to apply an additional classification task.
I assume I should be able to do some customization on top of the following definitions for the segmentation alone:

class SegmentationLabelList(SegmentationLabelList):
def open(self, fn): return open_mask(fn, div=True)
class SegmentationItemList(SegmentationItemList):
_label_cls = SegmentationLabelList

It unsurprisingly fails to replace “return open_mask(fn, div=True)”, with “return [open_mask(fn, div=True), <some_scalar_target> ]” …

I would really appreciate some hints of how to customize this to treat both types of labels (segmentation mask + some classification “scalar” value").

Thanks a lot!

0 Likes