Image Samplers¶
This algorithm allows to run one of the image samplers from the ML plugin on an image. Image samplers crop the image either randomly or with some defined behaviour, and are primarily used during training.
Input¶
An image (or a set of images), and optionally a corresponding label map (or set of label maps).
Output¶
A cropped version of the input images, and optionally the corresponding cropped label maps.
Description¶
The following parameters may be used to modify the default behavior of the algorithm:
Type
allows to specify which sampler should be used.- Default Sampler does nothing (apart from optionally padding the image to a specific dimension divisor)
- Random Sampler crops a region randomly chosen;
- Center Sampler always crops around the image center;
- Split Sampler splits the image in tiles and selects one of them;
- Label Sampler selects random crops so that it includes at least one pixel with a specific label value;
- Oriented Sampler select crops with random position, orientation and other augmentations.
The other parameters depend on the selected Type
, and include:
roi_size
Size in pixels of the cropped image to be generateddevice
Computing device, defaulting to gpu_if_opengl. Use force_cpu to run the ROI extraction on the CPU.padding_mode
Choose between zero, mirror or clamplabel_padding_mode
Similar topadding_mode
but applies on all images considered as label maps