Module qute.tools
Various tools.
Functions
def calculate_receptive_field(num_levels: int, kernel_size: int = 3, pool_size: int = 2)
-
Calculates the receptive field of the U-Net.
Parameters
num_levels
:int
- Number of levels in the contracting path (first half of the U) including the bottleneck layer.
kernel_size
:int = 3
- Kernel size.
pool_size
:int = 2
- Max pool size.
Returns
receptive_field
:int
- Size of the receptive field of the U-Net.
def num_levels_for_object_size(object_size: float, kernel_size: int = 3, pool_size: int = 2)
-
Calculates the number of levels in the contracting path of the U-Net so that the receptive field is large enough to cover it.
Parameters
object_size
:float
- Size of the objects to be covered by the receptive field of the U-Net (e.g., median diameter of all labels).
kernel_size
:int = 3
- Kernel size.
pool_size
:int = 2
- Max pool size.
Returns
num_levels
:int
- Number of levels in the contracting path.