N2V Algorithm Config
N2V Algorithm configuration.
N2VAlgorithm
Bases: UNetBasedAlgorithm
N2V Algorithm configuration.
algorithm = 'n2v'
class-attribute
instance-attribute
N2V Algorithm name.
loss = 'n2v'
class-attribute
instance-attribute
N2V loss function.
lr_scheduler = LrSchedulerConfig()
class-attribute
instance-attribute
Learning rate scheduler to use, defined in SupportedLrScheduler.
monitor_metric = 'val_loss'
class-attribute
instance-attribute
Metric to monitor for the learning rate scheduler.
optimizer = OptimizerConfig()
class-attribute
instance-attribute
Optimizer to use, defined in SupportedOptimizer.
get_algorithm_citations()
Return a list of citation entries of the current algorithm.
This is used to generate the model description for the BioImage Model Zoo.
Returns:
| Type | Description |
|---|---|
List[CiteEntry]
|
List of citation entries. |
get_algorithm_description()
Return a description of the algorithm.
This method is used to generate the README of the BioImage Model Zoo export.
Returns:
| Type | Description |
|---|---|
str
|
Description of the algorithm. |
get_algorithm_friendly_name()
get_algorithm_keywords()
get_algorithm_references()
Get the algorithm references.
This is used to generate the README of the BioImage Model Zoo export.
Returns:
| Type | Description |
|---|---|
str
|
Algorithm references. |
get_compatible_algorithms()
classmethod
Get the list of compatible algorithms.
Returns:
| Type | Description |
|---|---|
list of str
|
List of compatible algorithms. |
is_struct_n2v()
Check if the configuration is using structN2V.
Returns:
| Type | Description |
|---|---|
bool
|
Whether the configuration is using structN2V. |
is_supervised()
classmethod
Return whether the algorithm is supervised.
Returns:
| Type | Description |
|---|---|
bool
|
Whether the algorithm is supervised. |
set_n2v2(use_n2v2)
Set the configuration to use N2V2 or the vanilla Noise2Void.
This method ensures that N2V2 is set correctly and remain coherent, as opposed to setting the different parameters individually.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
use_n2v2
|
bool
|
Whether to use N2V2. |
required |
validate_n2v2()
Validate that the N2V2 strategy and models are set correctly.
Returns:
| Type | Description |
|---|---|
Self
|
The validateed configuration. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If N2V2 is used with the wrong pixel manipulation strategy. |