-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbf5a56
commit 2eaed0b
Showing
3 changed files
with
317 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,50 @@ | ||
"""Configuration for the UnetRegistrationModel.""" | ||
|
||
from __future__ import annotations | ||
|
||
from dataclasses import dataclass | ||
|
||
from direct.config.defaults import ModelConfig | ||
from direct.registration.demons import DemonsFilterType | ||
|
||
|
||
@dataclass | ||
class RegistrationModelConfig(ModelConfig): | ||
warp_num_integration_steps: int = 1 | ||
|
||
|
||
@dataclass | ||
class OpticalFlowILKRegistration2dModelConfig(RegistrationModelConfig): | ||
radius: int = 7 | ||
num_warp: int = 10 | ||
gaussian: bool = False | ||
prefilter: bool = True | ||
|
||
|
||
@dataclass | ||
class UnetRegistrationModelConfig(ModelConfig): | ||
class OpticalFlowTVL1Registration2dModelConfig(RegistrationModelConfig): | ||
attachment: float = 15 | ||
tightness: float = 0.3 | ||
num_warp: int = 5 | ||
num_iter: int = 10 | ||
tol: float = 1e-3 | ||
prefilter: bool = True | ||
|
||
|
||
@dataclass | ||
class DemonsRegistration2dModelConfig(RegistrationModelConfig): | ||
demons_filter_type: DemonsFilterType = DemonsFilterType.SYMMETRIC_FORCES | ||
demons_num_iterations: int = 50 | ||
demons_smooth_displacement_field: bool = True | ||
demons_standard_deviations: float = 1.0 | ||
demons_intensity_difference_threshold: float | None = None | ||
demons_maximum_rms_error: float | None = None | ||
|
||
|
||
@dataclass | ||
class UnetRegistration2dModelConfig(RegistrationModelConfig): | ||
max_seq_len: int = 12 | ||
unet_num_filters: int = 16 | ||
unet_num_pool_layers: int = 4 | ||
unet_dropout_probability: float = 0.0 | ||
unet_normalized: bool = False | ||
warp_num_integration_steps: int = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters