-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add non-static and kt sampling (#280)
* kt sampling mask functions: `KtGaussian1DMaskFunc`, `KtRadialMaskFunc`, `KtUniformMaskFunc`, * Non-static sampling (dynamic/multislice) dicitated by the `MaskFuncMode`, which can be STATIC, MULTISLICE, DYNAMIC * Corresponding tests
- Loading branch information
1 parent
d733b81
commit e9e63d6
Showing
8 changed files
with
1,711 additions
and
469 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,20 +1,23 @@ | ||
# coding=utf-8 | ||
# Copyright (c) DIRECT Contributors | ||
|
||
from __future__ import annotations | ||
|
||
from dataclasses import dataclass | ||
from typing import Optional, Tuple | ||
from typing import Optional | ||
|
||
from omegaconf import MISSING | ||
|
||
from direct.config.defaults import BaseConfig | ||
from direct.types import MaskFuncMode | ||
|
||
|
||
@dataclass | ||
class MaskingConfig(BaseConfig): | ||
name: str = MISSING | ||
accelerations: Tuple[int, ...] = (5,) # Ideally Union[float, int]. | ||
center_fractions: Optional[Tuple[float, ...]] = (0.1,) # Ideally Optional[Tuple[float, ...]] | ||
accelerations: tuple[float, ...] = (5.0,) | ||
center_fractions: Optional[tuple[float, ...]] = (0.1,) | ||
uniform_range: bool = False | ||
image_center_crop: bool = False | ||
mode: MaskFuncMode = MaskFuncMode.STATIC | ||
|
||
val_accelerations: Tuple[int, ...] = (5, 10) | ||
val_center_fractions: Optional[Tuple[float, ...]] = (0.1, 0.05) | ||
val_accelerations: tuple[float, ...] = (5.0, 10.0) | ||
val_center_fractions: Optional[tuple[float, ...]] = (0.1, 0.05) |
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
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
Oops, something went wrong.