def CreateDataset(opt):
    from data.keypoint import KeyDataset
    dataset = KeyDataset()

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset
def CreateDataset(opt):
    dataset = None

    if opt.dataset_mode == 'keypoint':
        from data.keypoint import KeyDataset
        dataset = KeyDataset()

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

    print("dataset [%s] was created" % (dataset.name()))
    dataset.initialize(opt)
    return dataset
def CreateDataset(opt):
    dataset = None

    if opt.dataset_mode == 'keypoint':  #选这个,dataset = KeyDataset()
        from data.keypoint import KeyDataset
        dataset = KeyDataset()  #返回 #P1,BP1,SP1,P2,BP2,P1_name,P2_name
    # elif opt.dataset_mode == 'keypoint_mix':
    #     from data.keypoint_mix import KeyDataset
    #     dataset = KeyDataset()
    else:
        raise ValueError("Dataset [%s] not recognized." % opt.dataset_mode)

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