mlreco.models.spice module

class mlreco.models.spice.MinkSPICE(cfg)[source]

Bases: mlreco.models.layers.cluster_cnn.embeddings.SPICE

MODULES = ['network_base', 'uresnet_encoder', 'embedding_decoder', 'seediness_decoder']
__init__(cfg)[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

__module__ = 'mlreco.models.spice'
training: bool
class mlreco.models.spice.SPICELoss(cfg, name='spice_loss')[source]

Bases: torch.nn.modules.module.Module

Loss function for Proposal-Free Mask Generators.

__init__(cfg, name='spice_loss')[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

class_mask(cluster_label)[source]

Filter classes according to segmentation label.

__module__ = 'mlreco.models.spice'
forward(result, cluster_label)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool