-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* inital commit adding the normalization. * adding dataset_statistics to each fov to facilitate the configurable augmentations * fix indentation * ruff * test preprocessing * remove redundant field * cleanup --------- Co-authored-by: Ziwen Liu <ziwen.liu@czbiohub.org>
- Loading branch information
1 parent
78aed97
commit 74e7db3
Showing
7 changed files
with
139 additions
and
132 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
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from typing import Sequence, TypedDict, Union | ||
|
||
from torch import Tensor | ||
|
||
|
||
class Sample(TypedDict, total=False): | ||
"""Image sample type for mini-batches.""" | ||
|
||
index: tuple[str, int, int] | ||
# optional | ||
source: Union[Tensor, Sequence[Tensor]] | ||
target: Union[Tensor, Sequence[Tensor]] | ||
labels: Union[Tensor, Sequence[Tensor]] | ||
norm_meta: dict[str, dict] | ||
|
||
|
||
class ChannelMap(TypedDict, total=False): | ||
"""Source and target channel names.""" | ||
|
||
source: Union[str, Sequence[str]] | ||
# optional | ||
target: Union[str, Sequence[str]] |
Oops, something went wrong.