spateo.segmentation.external.deepcell ===================================== .. py:module:: spateo.segmentation.external.deepcell .. autoapi-nested-parse:: Use DeepCell for cell identification and labeling. https://github.com/vanvalenlab/deepcell-tf [Greenwald21]_ Attributes ---------- .. autoapisummary:: spateo.segmentation.external.deepcell.Application Functions --------- .. autoapisummary:: spateo.segmentation.external.deepcell._deepcell spateo.segmentation.external.deepcell.deepcell Module Contents --------------- .. py:data:: Application :value: None .. py:function:: _deepcell(img: numpy.ndarray, model: deepcell.applications.Application, **kwargs) -> numpy.ndarray Run DeepCell on the provided image. :param img: Image as a Numpy array. :param model: DeepCell model to use :param \*\*kwargs: Additional keyword arguments to :func:`Application.predict` function. :returns: Numpy array containing cell labels. .. py:function:: deepcell(adata: anndata.AnnData, model: Optional[deepcell.applications.Application] = None, equalize: float = 2.0, layer: str = SKM.STAIN_LAYER_KEY, out_layer: Optional[str] = None, **kwargs) Run DeepCell to label cells from a staining image. :param adata: Input Anndata :param model: DeepCell model to use :param equalize: Controls the `clip_limit` argument to the :func:`clahe` function. Set this value to a non-positive value to turn off equalization. :param layer: Layer that contains staining image. Defaults to `stain`. :param out_layer: Layer to put resulting labels. Defaults to `{layer}_labels`. :param \*\*kwargs: Additional keyword arguments to :func:`Application.predict` function. :returns: Numpy array containing cell labels.