N2V Manipulation
N2V manipulation configuration.
N2VManipulateConfig
Bases: BaseModel
Configuration of the N2V manipulation transform.
Attributes:
-
name(Literal['N2VManipulate']) –Name of the transformation.
-
roi_size(int) –Size of the masking region, by default 11.
-
masked_pixel_percentage(float) –Percentage of masked pixels, by default 0.2.
-
strategy(Literal['uniform', 'median']) –Strategy pixel value replacement, by default "uniform".
-
struct_mask(StructMaskConfig | None) –Parameters of the structN2V mask. If None, no structN2V mask is applied.
-
seed(int) –Random seed for reproducibility.
masked_pixel_percentage = Field(default=0.2, ge=0.05, le=10.0)
class-attribute
instance-attribute
Percentage of masked pixels per image.
roi_size = Field(default=11, ge=3, le=21)
class-attribute
instance-attribute
Size of the region where the pixel manipulation is applied.
seed = Field(default_factory=generate_random_seed, gt=0)
class-attribute
instance-attribute
Random seed for reproducibility. If not specified, a random seed is generated.
strategy = Field(default='uniform')
class-attribute
instance-attribute
Strategy for pixel value replacement.
struct_mask = None
class-attribute
instance-attribute
Parameters of the structN2V mask. If None, no structN2V mask is applied.
StructMaskConfig
Bases: BaseModel
Parameters of structN2V masks.
Attributes:
-
axes(Literal['horizontal', 'vertical', 'cross']) –Axes along which to apply the mask, horizontal (0), vertical (1) or cross (2).
-
span(int) –Span of the mask, must be odd.
axes = Field(default='horizontal')
class-attribute
instance-attribute
Orientation of the structN2V mask.
span = Field(default=5, ge=3, le=15)
class-attribute
instance-attribute
Size of the structN2V mask.