Exemplo n.º 1
0
    def get_data(bs, size):
        data = (src.label_from_func(lambda x: str(x).replace('.png', '_mask.npy.npz'))
                .transform(get_transforms(do_flip = False, max_zoom=1.0, max_warp=0.0, max_rotate=0, max_lighting=0.3), tfm_y=False)
                .transform([rand_crop(), rand_crop()], tfm_y=True, size= size)
                .databunch(bs=bs).normalize(imagenet_stats, do_y=False))

        data.c = 4
        return data
Exemplo n.º 2
0
    def get_data(bs, size):
        data = (src.label_from_func(ff)
                .transform(get_transforms(do_flip = False, max_zoom=1.0, max_warp=0.0, max_rotate=0, max_lighting=0.3), tfm_y=False)
                .transform([rand_crop(), rand_crop()], tfm_y=False, size= size)
                .databunch(bs=bs).normalize(imagenet_stats, do_y=False))

        data.c = 120
        return data
Exemplo n.º 3
0
def get_data(bs, size, src):

    data = (src.label_from_func(
        lambda x: str(x).replace('.png', '_mask.png')).transform(
            get_transforms(do_flip=False,
                           max_zoom=1.0,
                           max_warp=0.0,
                           max_rotate=0,
                           max_lighting=0.3),
            tfm_y=False).transform([rand_crop(), rand_crop()],
                                   tfm_y=True,
                                   size=size).databunch(bs=bs, num_workers=1))

    data.c = 5
    return data