src_size = np.array(mask.shape[1:])
# size = src_size//2
size = src_size
bs = 1
codes = np.loadtxt(path_manual/'codes.txt', dtype=str)
src = (SegmentationDataLoaders.from_folder(path_manual_img)
# Split data into training and validation set
.split_by_rand_pct(valid_pct=0.1)
# Label data using the get_y_fn function
.label_from_func(get_y_fn_manual, classes=codes)
)
data = (src.transform(get_transforms(), size=size, tfm_y=True)
# Flip images horizontally
.databunch(bs=bs)
# Create a databunch
.normalize(imagenet_stats)
# Normalize for resnet
)
One other bit to try is set vmin=1 on show batch (sorry Iâm not giving exact solutions, I worked with segmentation a little bit it was a little bit ago )
Not a problem! These are the best type of questions! (Where a search doesnât really explain it well ) think of it as visibility_min and visibility_max. So our mask codes are 0,1,2 etc right? We can adjust what codes show by moving this threshold. In our case we want pixels 0-1. But say with the CamVid example, we could do vmin=2, vmax=31. Also, you can put a min or max thatâs not in the range, but youâll see a result similar to your initial find
Hi, I encountered the same problem with my binary classification. Why is vmin=1 the default for TensorMask? IMHO vmin=0 would make more sense.
Iâve checked the fastai camvid dataset and lbl==0 is an Animal and not background or void (which can be verified on the Seq05VD_f01830.png photo and the corresponding mask) so it does not make sense to me even considering the default dataset.