Базовый коммит

This commit is contained in:
Aleksandr Mochalov
2025-12-03 16:50:06 +05:00
commit 939932eeb0
38 changed files with 2942 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
from typing import Optional, NamedTuple
import torch
import numpy as np
class Prediction(NamedTuple):
overall_probability: float
is_pathology: bool
report: str
conclusion: str
image: np.ndarray | str
properties: dict
class PredictorInput(NamedTuple):
study_uid: str
image: torch.Tensor
laterality: Optional[str]
px_width: Optional[float]
px_height: Optional[float]
class MetaTags(NamedTuple):
study_iuid: str
series_iuid: str
patient_id: Optional[str]
accession_number: Optional[str]
issuer_of_patient_id: Optional[str]
filler_number: Optional[str]
class TagError(Exception):
def __init__(self, msg):
self.msg = msg
super().__init__()
class ImagesError(Exception):
def __init__(self, msg):
self.msg = msg
super().__init__()