Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mednet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
medai
software
mednet
Commits
50bff62a
Commit
50bff62a
authored
8 months ago
by
Daniel CARRON
Committed by
André Anjos
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[segmentation.data.typing] Define sample data as a TypedDict
parent
e0f87834
No related branches found
No related tags found
1 merge request
!46
Create common library
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mednet/libs/segmentation/data/typing.py
+11
-3
11 additions, 3 deletions
src/mednet/libs/segmentation/data/typing.py
with
11 additions
and
3 deletions
src/mednet/libs/segmentation/data/typing.py
+
11
−
3
View file @
50bff62a
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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment