Skip to content
Snippets Groups Projects
Commit 50bff62a authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

[segmentation.data.typing] Define sample data as a TypedDict

parent e0f87834
No related branches found
No related tags found
1 merge request!46Create common library
import typing
from typing import TypedDict
import torch
from mednet.libs.common.data.typing import RawDataLoader
Sample: typing.TypeAlias = tuple[
typing.Mapping[str, torch.Tensor], typing.Mapping[str, typing.Any]
]
class SegmentationData(TypedDict):
"""Type for segmentation data."""
image: torch.Tensor
target: torch.Tensor
mask: torch.Tensor
Sample: typing.TypeAlias = tuple[SegmentationData, typing.Mapping[str, typing.Any]]
class SegmentationRawDataLoader(RawDataLoader):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment