Core

Core functions

Dataloaders

Get the ground truth images located in a folder called ‘gt’ and divided in labeled subfolders


source

get_gt

 get_gt (path, gt_file_name='avg50.png')
path = Path('../_data/Confocal_BPAE_B/')
path_train_raw = Path(path/"raw")
fnames = get_image_files(path_train_raw)

my_get_gt = get_gt(path)
Image.open(my_get_gt(fnames[0])).to_thumb(200)

# from fastai.vision.widgets import *
# VBox([widgets.HTML('image'),
#       widget(im, max_width="192px")])

Get as ground truth another noisy image randomly chosen in the same folder as the input image


source

get_noisy_pair

 get_noisy_pair (fn)
fnames1 = fnames[0]
print(fnames1)
fnames2 = get_noisy_pair(fnames1)
print(fnames2)
../_data/Confocal_BPAE_B/raw/3/HV110_P0500510040.png
../_data/Confocal_BPAE_B/raw/3/HV110_P0500510033.png