Is anyone able to load segmentation masks computed through run-length-encoding, or some function besides reading from disk? FastAI v1 used to have this. It looks like fastai v2 only supports reading seg-masks.
I tried adapting the old RLE code to a label function, but it needs to read from a dataframe to get the encoding, it’s not obvious how to write a
get_y function that’ll look at filename and a CSV. For reference, the v2 docs for high-level and datablock APIs, as well as the walk-with-fastai segmentation example all use functions that read from disk.
My first thought was maybe there’s a way to use
ColReader and pass its output to a label function for
Or would the correct way be to create a modified
SegmentationDataLoaders does have a
.from_label_func method, but that’d require loading a CSV as dataframe for each label, so that’s out of the question. So maybe what’s needed is a combined
.from_df kind of method.
Why it’s important: as things are you’re potentially doubling the size of your dataset to store segmentation labels.