Deci-AI / data-gradients

Computer Vision dataset analysis
Apache License 2.0
293 stars 33 forks source link

Add the image format (Scaled, Normalized, 0-255) to the `DataConfig` #209

Closed Louis-Dupont closed 9 months ago

Louis-Dupont commented 11 months ago

Motivation

Keeping the image size to its original format, but still being able to support the 3 main image format (0-255, 0-1, normalized)

How

The user can pass image_format to be Uint8ImageFormat(), FloatImageFormat(), ScaledFloatImageFormat(mean=[..], std=[...]) to the manager to explicitly let the manager which image format is being used. If not set, we will infer which one, and if it's infered that the right type is ScaledFloatImageFormat, the user will be asked 2 questions, one to know what is the mean, and another one to know the std.