osc.data.utils
Helper functions to bridge tensorflow image data to pytorch.
Functions:
Image normalization back and forth
Augmentation
Augmentations with ‘’stateless’’ random seeds
Fixed augmentations
Double augmentation for contrastive training
Functions
Deterministic center crop and processing as in |
|
Augment image for train/val. |
|
Augment image twice with two different functions. |
|
Image channels [..., H, W, C] -> [..., C, H, W] |
|
Normalize tf.float32 image with [..., H, W, C] channel order. |
|
Un-normalize torch.float32 image with [..., C, H, W] channel order. |
|
Wrap stateless random functions by providing a new seed to each invocation. |
Classes
Function type signature for TF stateless random. |