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
Find (or ask when not possible) the image format (0-255, 0-1, normalized, ...)
Introducing a Image class abstracting away this concept
Use the Image interface in the code
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.
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
Image
class abstracting away this conceptImage
interface in the codeThe user can pass
image_format
to beUint8ImageFormat()
,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 isScaledFloatImageFormat
, the user will be asked 2 questions, one to know what is themean
, and another one to know thestd
.