Python torch.utils.data.aligned_dataset() Examples

The following are 6 code examples of torch.utils.data.aligned_dataset(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module torch.utils.data , or try the search function .
Example #1
Source File: custom_dataset_data_loader.py    From iSketchNFill with GNU General Public License v3.0 6 votes vote down vote up
def CreateDataset(opt):
    dataset = None
    if opt.dataset_mode == 'aligned':
        from data.aligned_dataset import AlignedDataset
        dataset = AlignedDataset()
    elif opt.dataset_mode == 'unaligned':
        from data.unaligned_dataset import UnalignedDataset
        dataset = UnalignedDataset()
    elif opt.dataset_mode == 'labeled':
        from data.labeled_dataset import LabeledDataset
        dataset = LabeledDataset()
    elif opt.dataset_mode == 'single':
        from data.single_dataset import SingleDataset
        dataset = SingleDataset()
    else:
        raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset 
Example #2
Source File: custom_dataset_data_loader.py    From non-stationary_texture_syn with MIT License 6 votes vote down vote up
def CreateDataset(opt):
    dataset = None
    if opt.dataset_mode == 'aligned':
        from data.aligned_dataset import AlignedDataset
        dataset = AlignedDataset()
    elif opt.dataset_mode == 'unaligned':
        from data.unaligned_dataset import UnalignedDataset
        dataset = UnalignedDataset()
    elif opt.dataset_mode == 'single':
        from data.single_dataset import SingleDataset
        dataset = SingleDataset()
    elif opt.dataset_mode == 'half_crop':
        from data.half_dataset import HalfDataset
        dataset = HalfDataset()
    else:
        raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset 
Example #3
Source File: custom_dataset_data_loader.py    From EverybodyDanceNow-Temporal-FaceGAN with MIT License 6 votes vote down vote up
def CreateDataset(opt):
    dataset = None
    if 'face' in opt.name:
        from data.aligned_dataset_GAN import AlignedDataset
        dataset = AlignedDataset()

    elif opt.is_temporal:
        from data.aligned_dataset_temporal import AlignedDataset
        dataset = AlignedDataset()
        
    else:
        from data.aligned_dataset import AlignedDataset
        dataset = AlignedDataset()

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset 
Example #4
Source File: custom_dataset_data_loader.py    From Shift-Net_pytorch with MIT License 6 votes vote down vote up
def CreateDataset(opt):
    dataset = None
    if opt.dataset_mode == 'aligned':
        from data.aligned_dataset import AlignedDataset
        dataset = AlignedDataset()

    elif opt.dataset_mode == 'aligned_resized':
        from data.aligned_dataset_resized import AlignedDatasetResized
        dataset = AlignedDatasetResized()

    elif opt.dataset_mode == 'single':
        from data.single_dataset import SingleDataset
        dataset = SingleDataset()

    else:
        raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset 
Example #5
Source File: custom_dataset_data_loader.py    From EverybodyDanceNow_reproduce_pytorch with MIT License 5 votes vote down vote up
def CreateDataset(opt):
    dataset = None
    from data.aligned_dataset import AlignedDataset
    dataset = AlignedDataset()

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset 
Example #6
Source File: custom_dataset_data_loader.py    From deep-learning-for-document-dewarping with MIT License 5 votes vote down vote up
def CreateDataset(opt):
    dataset = None
    from data.aligned_dataset import AlignedDataset
    dataset = AlignedDataset()

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset