gingerbread.central_processing_handler package#
Subpackages#
- gingerbread.central_processing_handler.config package
- gingerbread.central_processing_handler.sql package
- gingerbread.central_processing_handler.utils package
- Submodules
- gingerbread.central_processing_handler.utils.db_helpers module
correct_label_format()
generate_cls_meta_records()
generate_cls_predicted_table_records()
generate_cls_records()
generate_cls_version_records()
generate_imported_records()
generate_mask_meta_table()
generate_mask_records()
generate_mask_table_records()
generate_mask_version_records()
generate_meta_records()
generate_pastel_color()
generate_project_series_meta_records()
generate_thumb_mask_version_records()
prepare_for_classification_upload()
prepare_for_segmentation_upload()
upload_to_mq()
- gingerbread.central_processing_handler.utils.helpers module
- Module contents
Submodules#
gingerbread.central_processing_handler.central_processing_handler module#
- class gingerbread.central_processing_handler.central_processing_handler.CentralProcessingHandler#
Bases:
object
- generate_analytics(postproc: ndarray, resolution: ndarray) Dict[str, float] #
Postprocessing analytics function for the model :param postproc: input prediction :type postproc: np.ndarray
- Returns:
analytics data
- Return type:
Dict[str, float]
- init_model_from_mq() None #
Load the model from MQ
- Return type:
NoReturn
- invalidate_cache()#
- kill_models()#
- start_processing(data: ndarray, extras: Dict[str, Any] = {}, montecarlo_loop: int = 1, weights_ensemble: bool = False) Dict[str, ndarray | Dict[str, str | int | List[float]] | Dict[str, str | Dict[int, List[float]]]] #
This function is used to start the processing of the data.
- Parameters:
data (np.ndarray) – The data to be processed. THIS NEEDS TO BE (C, D, H, W) or (C, H, W)
extras (Dict[str, Any]) – Any extra data that is needed for the processing.
montecarlo_loop (int) – The number of times the data should be processed. If not specified, it will be 1 by default which means the data will be processed only once.
weights_ensemble (bool) – The weights of the model to be used for processing. If not specified, the weights will be fetched from MQ.
- Returns:
result – The processed data. (C, D, H, W) or (C, H, W)
- Return type:
np.ndarray