-
Notifications
You must be signed in to change notification settings - Fork 9
/
dto.py
43 lines (33 loc) · 1.12 KB
/
dto.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from typing import List, Optional
from pydantic import BaseModel
class SegmentationPreprocessingSettingsDto(BaseModel):
"""Segmentation preprocessing settings model."""
channels_normalization: Optional[str]
threshold: Optional[bool]
percentile: Optional[float]
normalize: bool
kernel_size: int
class SegmentationPostprocessingSettingsDto(BaseModel):
"""Segmentation postprocessing settings model."""
radius: int
maxima_threshold: float
interior_threshold: float
small_objects_threshold: int
fill_holes_threshold: int
interior_model: str
maxima_model: str
interior_model_smooth: int
maxima_model_smooth: int
pixel_expansion: Optional[int]
class SegmentationSubmissionDto(BaseModel):
"""Segmentation submission model."""
dataset_name: Optional[str]
dataset_description: Optional[str]
model_id: int
compartment: str
acquisition_ids: List[int]
channels: List[str]
nuclei_channels: List[str]
cytoplasm_channels: List[str]
preprocessing: SegmentationPreprocessingSettingsDto
postprocessing: SegmentationPostprocessingSettingsDto