from .Initial_Alg_Gen_Tool import get_var_from_file

# crop_size 数据预处理是分割大小
# crop_size = (512,512)
def generate_data_preprocessor(crop_size=None, mean=None, std=None, bgr_to_rgb=False):

    data_preprocessor = {}
    if crop_size != None:
        data_preprocessor['size']=crop_size
    if mean != None:
        data_preprocessor['mean']=mean
    if std != None:
        data_preprocessor['std']=std
    if bgr_to_rgb != None:
        data_preprocessor['bgr_to_rgb']=bgr_to_rgb
    return data_preprocessor

if __name__ == '__main__':
    # 示例用法
    crop_size = (512,512)

    data_preprocessor = generate_data_preprocessor(crop_size = crop_size)
    print(data_preprocessor)