gingerbread.central_processing_handler package#

Subpackages#

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

Module contents#