Patch Filter
Pydantic models representing coordinate and patch filters.
MaskPatchFilterConfig
Bases: PatchFilterConfig
Pydantic model for the mask patch filter.
coverage = Field(0.25, ge=0.0, le=1.0)
class-attribute
instance-attribute
Minimum ratio of masked pixels required to keep a sampling region. The optimum value is 1/(2**ndims) where ndims is the number of spatial dimensions.
filtered_patch_prob = Field(default=0.1, ge=0.0, le=1.0)
class-attribute
instance-attribute
The probability that each patch classed as background will be selected each epoch during training.
name = 'mask'
class-attribute
instance-attribute
Name of the filter.
ref_channel = 0
class-attribute
instance-attribute
The channel to use as reference for filtering.
MaxPatchFilterConfig
Bases: PatchFilterConfig
Pydantic model for the max patch filter.
coverage = Field(default=0.25, ge=0.0, le=1.0)
class-attribute
instance-attribute
Minimum ratio of masked pixels required to keep a sampling region. The optimum value is 1/(2**ndims) where ndims is the number of spatial dimensions.
filtered_patch_prob = Field(default=0.1, ge=0.0, le=1.0)
class-attribute
instance-attribute
The probability that each patch classed as background will be selected each epoch during training.
name = 'max'
class-attribute
instance-attribute
Name of the filter.
ref_channel = 0
class-attribute
instance-attribute
The channel to use as reference for filtering.
threshold
instance-attribute
Threshold for the minimum of the max-filtered patch.
MeanStdPatchFilterConfig
Bases: PatchFilterConfig
Pydantic model for the mean std patch filter.
filtered_patch_prob = Field(default=0.1, ge=0.0, le=1.0)
class-attribute
instance-attribute
The probability that each patch classed as background will be selected each epoch during training.
mean_threshold
instance-attribute
Minimum mean intensity required to keep a patch.
name = 'mean_std'
class-attribute
instance-attribute
Name of the filter.
ref_channel = 0
class-attribute
instance-attribute
The channel to use as reference for filtering.
std_threshold = None
class-attribute
instance-attribute
Minimum standard deviation required to keep a patch.
PatchFilterConfig
Bases: BaseModel
Base class for patch and coordinate filtering models.
filtered_patch_prob = Field(default=0.1, ge=0.0, le=1.0)
class-attribute
instance-attribute
The probability that each patch classed as background will be selected each epoch during training.
name
instance-attribute
Name of the filter.
ref_channel = 0
class-attribute
instance-attribute
The channel to use as reference for filtering.
ShannonPatchFilterConfig
Bases: PatchFilterConfig
Pydantic model for the Shannon entropy patch filter.
filtered_patch_prob = Field(default=0.1, ge=0.0, le=1.0)
class-attribute
instance-attribute
The probability that each patch classed as background will be selected each epoch during training.
name = 'shannon'
class-attribute
instance-attribute
Name of the filter.
ref_channel = 0
class-attribute
instance-attribute
The channel to use as reference for filtering.
threshold
instance-attribute
Minimum Shannon entropy required to keep a patch.