Skip to content

mean std value for LAB/YCbCr normalization #55

@PhilLint

Description

@PhilLint

With regards to the mean and std values required for normalization: How do the values arise for LAB and YCbCr respectively? My assumption was, that the training images were transformed into the new color space and then statistics across channels are computed which are then used for normalization. That would explain YCbCr, but what does the formula for LAB color space mean? Is it the min and max values averaged?

`def get_train_loader(args):
"""get the train loader"""
data_folder = os.path.join(args.data_folder, 'train')

if args.view == 'Lab':
    mean = [(0 + 100) / 2, (-86.183 + 98.233) / 2, (-107.857 + 94.478) / 2]
    std = [(100 - 0) / 2, (86.183 + 98.233) / 2, (107.857 + 94.478) / 2]
    color_transfer = RGB2Lab()
elif args.view == 'YCbCr':
    mean = [116.151, 121.080, 132.342]
    std = [109.500, 111.855, 111.964]
    color_transfer = RGB2YCbCr()`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions