MIR.random_image_generation.random_shapesΒΆ

Synthetic training pairs from Perlin-noise shapes and random smooth deformations (CUDA required).

Functions

dice_Shape_VOI(y_pred, y_true[, num_label])

Mean Dice over labels 0..num_label-1 (background included) for the first batch element and channel.

gen_defs(img_size[, down_factor_def, freq, ...])

Generate a random diffeomorphic deformation field from fractal Perlin noise.

gen_shapes(img_size[, down_factor, freq, ...])

Generate a pair of deformed images with label maps from random Perlin-noise shapes.

gen_shapes_multimodal(img_size[, ...])

Generate a pair of 3-D images + label maps that resemble two modalities of the same anatomy.