cellmap_flow.models.models_config
Attributes
Classes
Configuration class for a CellmapModel. |
Functions
|
Concatenate arrays along the channel axis, adding channel dim if missing. |
|
Reorder/remove axes to match desired_order, removing size-1 unwanted axes. |
|
|
|
Module Contents
- cellmap_flow.models.models_config.logger
- class cellmap_flow.models.models_config.ModelConfig
- property config
- property output_dtype
Returns the output dtype of the model. Defaults to np.float32.
- abstractmethod to_dict()
Export model configuration as a dict that can be used with build_model_from_entry.
- Returns:
Dictionary containing model type and all init parameters.
- class cellmap_flow.models.models_config.ScriptModelConfig(script_path, name=None, scale=None)
- script_path
- name = None
- scale = None
- property command
- to_dict()
Export configuration for use with build_model_from_entry.
- class cellmap_flow.models.models_config.DaCapoModelConfig(run_name: str, iteration: int, name=None, scale=None)
- run_name
- iteration
- name = None
- scale = None
- property command
- to_dict()
Export configuration for use with build_model_from_entry.
- class cellmap_flow.models.models_config.FlyModelConfig(checkpoint_path: str, channels: list[str], input_voxel_size: tuple, output_voxel_size: tuple, name: str = None, input_size=None, output_size=None, scale=None)
- name = None
- checkpoint_path
- channels
- input_voxel_size
- output_voxel_size
- scale = None
- input_size = None
- output_size = None
- property command
- load_eval_model(num_channels, checkpoint_path)
Load evaluation model from checkpoint (TorchScript or PyTorch).
- property model
- to_dict()
Export configuration for use with build_model_from_entry.
- class cellmap_flow.models.models_config.BioModelConfig(model_name: str, voxel_size, edge_length_to_process=None, name=None, scale=None)
- model_name
- voxel_size
- name = None
- scale = None
- voxels_to_process = None
- property command
- load_input_information(model)
- load_output_information(model)
- get_axes_and_dims(sample)
- get_spatial_dims(axes, dims)
- get_input_slicer(input_axes)
- to_dict()
Export configuration for use with build_model_from_entry.
- cellmap_flow.models.models_config.concat_along_c(arrs, axes_list, channel_axis_name='c')
Concatenate arrays along the channel axis, adding channel dim if missing.
- cellmap_flow.models.models_config.reorder_axes(arr: numpy.ndarray, axes: list[str], desired_order: list[str] = ['z', 'y', 'x', 'c']) tuple[numpy.ndarray, list[str]]
Reorder/remove axes to match desired_order, removing size-1 unwanted axes.
- cellmap_flow.models.models_config.process_chunk_bioimage(self, idi: cellmap_flow.image_data_interface.ImageDataInterface, input_roi: funlib.geometry.Roi)
- cellmap_flow.models.models_config.format_output_bioimage(self, output_sample, output_names=None, output_axes=None)