Example #1
0
def get_ref_loader():
    # Ref Loader
    ref_loader = TripletImageLoader('data/FID-300/',
                                    'ref.txt', [0, 2000],
                                    transform=transforms.Compose([
                                        transforms.Resize((224, 112)),
                                        transforms.CenterCrop((224, 112)),
                                        transforms.ToTensor(),
                                        transforms.Normalize(mean=[0.5],
                                                             std=[1])
                                    ]))
    ref_loader.real_mode_prob = 1
    ref_loader.angle_mod = 0
    ref_loader.scale_mod = 0
    ref_loader.trans_mod = 0
    ref_loader.flip_mod = 0
    ref_loader.load_ref = True

    return ref_loader
Example #2
0
def get_val_loader():
    # Val Loader
    #val_loader =  TripletImageLoader('data/FID-300/', 'train.txt', [0,50],
    val_loader = TripletImageLoader('data/FID-300/',
                                    'val.txt', [0, 250],
                                    transform=transforms.Compose([
                                        transforms.Resize((224, 112)),
                                        transforms.CenterCrop((224, 112)),
                                        transforms.ToTensor(),
                                        transforms.Normalize(mean=[0.5],
                                                             std=[1])
                                    ]))
    val_loader.real_mode_prob = 1
    val_loader.angle_mod = 0
    val_loader.scale_mod = 0
    val_loader.trans_mod = 0
    val_loader.flip_mod = 0

    return val_loader