ncalab.models.applications.depth ================================ .. py:module:: ncalab.models.applications.depth Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ncalab/models/applications/depth/depthNCA/index Classes ------- .. autoapisummary:: ncalab.models.applications.depth.DepthNCAModel Package Contents ---------------- .. py:class:: DepthNCAModel(device: torch.device, num_image_channels: int = 3, num_hidden_channels: int = 18, fire_rate: float = 0.8, hidden_size: int = 128, num_learned_filters: int = 2, pad_noise: bool = False, **kwargs) Bases: :py:obj:`ncalab.models.basicNCA.BasicNCAModel` NCA model for monocular depth estimation. :param device: Pytorch device descriptor. :param num_image_channels: Number of channels reserved for input image. :param num_hidden_channels: Number of hidden channels (communication channels). :param num_output_channels: Number of output channels. :param fire_rate: Fire rate for stochastic weight update. Defaults to 0.5. :param hidden_size: Number of neurons in hidden layer. Defaults to 128. :param use_alive_mask: Whether to use alive masking (channel 3) during training. Defaults to False. :param immutable_image_channels: If image channels should be fixed during inference, which is the case for most segmentation or classification problems. Defaults to True. :param num_learned_filters: Number of learned filters. If zero, use two sobel filters instead. Defaults to 2. :param filter_padding: Padding type to use. Might affect reliance on spatial cues. Defaults to "circular". :param use_laplace: Whether to use Laplace filter (only if num_learned_filters == 0) :param kernel_size: Filter kernel size (only for learned filters) :param pad_noise: Whether to pad input image tensor with noise in hidden / output channels .. py:attribute:: vignette :value: None .. py:method:: loss(pred: ncalab.prediction.Prediction, label: torch.Tensor) -> Dict[str, torch.Tensor] :param image: Input image, BCWH. :param label: Ground truth. :returns: Dictionary of identifiers mapped to computed losses. .. py:method:: metrics(pred: ncalab.prediction.Prediction, label: torch.Tensor) -> Dict[str, float] Return dict of standard evaluation metrics. Needs to include special item 'prediction', containing the predicted image (all channels). :param pred: :param label: Ground truth label. :returns [Dict]: Dict of metrics, mapped by their names.