dtype support
The function augment_images(), which all augmenters in imgaug offer,
works by default with numpy arrays. In most cases, these arrays will have the numpy dtype uint8,
i.e. the images will have values in the range [0, 255]. This is the datatype returned by
most image loading functions. Sometimes however you may want to augment other datatypes,
e.g. float64. While all augmenters support uint8, the support for other datatypes varies.
The tables further below show which datatype is supported by which augmenter (alongside the dtype
support in some helper functions). The API of each augmenter may contain more details.
Note: Whenever possible it is suggested to use uint8 as that is the most thoroughly tested
dtype. In general, the use of large dtypes (i.e. uint64, int64, float128) is
discouraged, even when they are marked as supported. That is because writing correct tests for
these dtypes can be difficult as no larger dtypes are available to which values can be temporarily
cast. Additionally, when using inputs for which precise discrete values are important (e.g.
segmentation maps, where an accidental change by 1 would break the map), medium sized dtypes
(uint32, int32) should be used with caution. This is because other libraries may convert
temporarily to float64, which could lead to inaccuracies for some numbers.
Legend
Support level (color of table cells):
Green: Datatype is considered supported by the augmenter.
Yellow: Limited support for the datatype, e.g. due to inaccuracies around large values. See the API for the respective augmenter for more details.
Red: Datatype is not supported by the augmenter.
Test level (symbols in table cells):
+++: Datatype support is thoroughly tested (via unittests or integration tests).
++: Datatype support is tested, though not thoroughly.
+: Datatype support is indirectly tested via tests for other augmenters.
-: Datatype support is not tested.
?: Unknown support level for the datatype.
imgaug helper functions
Dtype support of helper functions in imgaug,
e.g. import imgaug; imgaug.imresize_single_image(array, size).
imgaug.augmenters.meta
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.meta.
imgaug.augmenters.arithmetic
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.arithmetic.
imgaug.augmenters.blend
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.blend.
imgaug.augmenters.blur
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.blur.
imgaug.augmenters.collections
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.collections.
imgaug.augmenters.color
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.color.
imgaug.augmenters.contrast
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.contrast.
imgaug.augmenters.convolutional
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.convolutional.
imgaug.augmenters.debug
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.debug.
imgaug.augmenters.edges
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.edges.
imgaug.augmenters.flip
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.flip.
imgaug.augmenters.geometric
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.geometric.
imgaug.augmenters.imgcorruptlike
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.imgcorruptlike.
imgaug.augmenters.pillike
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.pillike.
imgaug.augmenters.segmentation
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.segmentation.
imgaug.augmenters.size
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.size.
imgaug.augmenters.weather
Image dtypes supported by augmenters and helper functions in
imgaug.augmenters.weather.