Hallo guys,
the 2019 version of the course teaches how to split the camvid dataset into training and validation set based on a textfile (valid.txt)
In order to not split randomly (hence it would be way to easy) I would like ti split the sets as proposed by the dataset creators
The standard routine would be something like:
src = (SegmentationItemList.from_folder(path_img)
.split_by_fname_file(’…/valid.txt’)
.label_from_func(get_y_fn, classes=codes))
However, with the new Datablock API I am not able to do this.
I tried:
camvid = DataBlock(blocks=(ImageBlock, MaskBlock(codes)),
get_items = get_image_files,
get_y = label_func,
splitter=split_by_fname_file(’…/valid.txt’),
batch_tfms=aug_transforms(size=(120,160))
)
Which throws the error:
NameError: name ‘split_by_fname_file’ is not defined
Any idea how ti split by valid.txt using the new datablock API )
Best regards