cellmil.interfaces¶
- class cellmil.interfaces.PatchExtractorConfig(*, output_path: Path, wsi_path: Path, patch_size: int, patch_overlap: float | int, target_mag: float)[source]¶
Bases:
BaseModelConfiguration for data preparation
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.CellSegmenterConfig(*, model: ModelType, gpu: int = 0, wsi_path: Path, patched_slide_path: Path)[source]¶
Bases:
BaseModelConfiguration for data preparation
- model: ModelType¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.FeatureExtractorConfig(*, extractor: ExtractorType, patched_slide_path: Path, wsi_path: Optional[Path] = None, segmentation_model: Optional[ModelType] = None, graph_method: Optional[str] = None)[source]¶
Bases:
BaseModelConfiguration for feature extraction from segmented cells
- extractor: ExtractorType¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.MILPredictorConfig(*, model: MILType, gpu: int = 0, patched_slide_path: Path, extractor: ExtractorType, segmentation_model: ModelType, chkpt_path: pathlib.Path | None = None)[source]¶
Bases:
BaseModelConfiguration for MIL prediction using CLAM or standard MIL models
- extractor: ExtractorType¶
- segmentation_model: ModelType¶
- chkpt_path: pathlib.Path | None¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.DatasetCreatorConfig(*, excel_path: Path, output_path: Path, gpu: int = 0, segmentation_models: list[cellmil.interfaces.CellSegmenterConfig.ModelType] | None, extractors: list[cellmil.interfaces.FeatureExtractorConfig.ExtractorType], graph_methods: list[cellmil.interfaces.GraphCreatorConfig.GraphCreatorType] | None)[source]¶
Bases:
BaseModelConfiguration for creating a dataset for MIL training.
- classmethod validate_segmentation_models(v: list[cellmil.interfaces.CellSegmenterConfig.ModelType]) list[cellmil.interfaces.CellSegmenterConfig.ModelType][source]¶
- classmethod validate_extractors(v: list[cellmil.interfaces.FeatureExtractorConfig.ExtractorType]) list[cellmil.interfaces.FeatureExtractorConfig.ExtractorType][source]¶
- classmethod validate_graph_methods(v: list[cellmil.interfaces.GraphCreatorConfig.GraphCreatorType]) list[cellmil.interfaces.GraphCreatorConfig.GraphCreatorType][source]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.FeatureVisualizerConfig(*, dataset: Path)[source]¶
Bases:
BaseModelConfiguration for feature visualization from a dataset containing multiple slides
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.MILTrainerConfig(*, root: Path, folder: Path, excel_path: Path, label: str, model: MILType, gpu: int = 0, extractor: cellmil.interfaces.FeatureExtractorConfig.ExtractorType | list[cellmil.interfaces.FeatureExtractorConfig.ExtractorType], segmentation_model: ModelType, graph_creator: GraphCreatorType, ckpt_path: Path, normalization: bool = False, correlation_filter: float = 0.0, cell_type: bool = False, n_bins: int = 4)[source]¶
Bases:
BaseModelConfiguration for MIL prediction using CLAM or standard MIL models
- extractor: cellmil.interfaces.FeatureExtractorConfig.ExtractorType | list[cellmil.interfaces.FeatureExtractorConfig.ExtractorType]¶
- segmentation_model: ModelType¶
- graph_creator: GraphCreatorType¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class cellmil.interfaces.GraphCreatorConfig(*, method: GraphCreatorType, gpu: int = 0, patched_slide_path: Path, segmentation_model: ModelType, plot: bool = True, debug: bool = False)[source]¶
Bases:
BaseModelConfiguration for graph creation from segmented cells
- method: GraphCreatorType¶
- segmentation_model: ModelType¶
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Modules
|
Configuration for data preparation |
Configuration for creating a dataset for MIL training. |
|
Configuration for feature extraction from segmented cells |
|
Configuration for feature visualization from a dataset containing multiple slides |
|
|
Configuration for graph creation from segmented cells |
|
Configuration for MIL prediction using CLAM or standard MIL models |
|
Configuration for MIL prediction using CLAM or standard MIL models |
Configuration for data preparation |
|