deepdisc.model.models

Classes

WeightedRedshiftPDFCasROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

CNNRedshiftPDFCasROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

RedshiftPDFCasROIHeadsGold

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

RedshiftPDFCasROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

OldRedshiftPDFCasROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

RedshiftPointCasROIHeads

CascadeROIHeads with added redshift point estimate capability. Follows the detectron2 CascadeROIHeads class init

RedshiftPointROIHeads

ROIHead with added redshift point estimate capability. Follows the detectron2 StandardROIHead class init

RedshiftPDFROIHeads

ROIHead with added redshift pdf capability. Follows the detectron2 StandardROIHead class init, except for

OldEBVRedshiftPDFCasROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Functions

return_lazy_model(cfg[, freeze])

Return a model formed from a LazyConfig with the backbone

Module Contents

return_lazy_model(cfg, freeze=True)[source]

Return a model formed from a LazyConfig with the backbone frozen. Only the head layers will be trained.

Parameters:

cfg (.py file) – a LazyConfig

Return type:

torch model

class WeightedRedshiftPDFCasROIHeads(num_components: int, zloss_factor: float, weights: List[float], zbins: List[float], *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
_output_size[source]
num_components[source]
zloss_factor[source]
redshift_fc[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]
class CNNRedshiftPDFCasROIHeads(num_components: int, zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
_output_size[source]
num_components[source]
zloss_factor[source]
redshift_conv[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]
class RedshiftPDFCasROIHeadsGold(num_components: int, zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
_output_size[source]
num_components[source]
zloss_factor[source]
redshift_fc[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]
class RedshiftPDFCasROIHeads(num_components: int, zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
_output_size[source]
num_components[source]
zloss_factor[source]
redshift_fc[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]
class OldRedshiftPDFCasROIHeads(num_components: int, zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
_output_size[source]
num_components[source]
zloss_factor[source]
redshift_fc[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]
class RedshiftPointCasROIHeads(zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHeads with added redshift point estimate capability. Follows the detectron2 CascadeROIHeads class init

redshift_pooler[source]
_output_size[source]
zloss_factor[source]
redshift_fc[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]
class RedshiftPointROIHeads(zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_head: torch.nn.Module, box_predictor: torch.nn.Module, mask_in_features: List[str] | None = None, mask_pooler: detectron2.modeling.poolers.ROIPooler | None = None, mask_head: torch.nn.Module | None = None, keypoint_in_features: List[str] | None = None, keypoint_pooler: detectron2.modeling.poolers.ROIPooler | None = None, keypoint_head: torch.nn.Module | None = None, train_on_pred_boxes: bool = False, **kwargs)[source]

Bases: detectron2.modeling.roi_heads.StandardROIHeads

ROIHead with added redshift point estimate capability. Follows the detectron2 StandardROIHead class init

redshift_pooler[source]
_output_size[source]
redshift_fc[source]
_forward_redshift(features, instances)[source]
forward(images: detectron2.structures.ImageList, features: Dict[str, torch.Tensor], proposals: List[detectron2.structures.Instances], targets: List[detectron2.structures.Instances] | None = None) Tuple[List[detectron2.structures.Instances], Dict[str, torch.Tensor]][source]

See ROIHeads.forward.

class RedshiftPDFROIHeads(num_components: int, zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_head: torch.nn.Module, box_predictor: torch.nn.Module, mask_in_features: List[str] | None = None, mask_pooler: detectron2.modeling.poolers.ROIPooler | None = None, mask_head: torch.nn.Module | None = None, keypoint_in_features: List[str] | None = None, keypoint_pooler: detectron2.modeling.poolers.ROIPooler | None = None, keypoint_head: torch.nn.Module | None = None, train_on_pred_boxes: bool = False, **kwargs)[source]

Bases: detectron2.modeling.roi_heads.StandardROIHeads

ROIHead with added redshift pdf capability. Follows the detectron2 StandardROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
zloss_factor[source]
_output_size[source]
num_components[source]
redshift_fc[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images: detectron2.structures.ImageList, features: Dict[str, torch.Tensor], proposals: List[detectron2.structures.Instances], targets: List[detectron2.structures.Instances] | None = None) Tuple[List[detectron2.structures.Instances], Dict[str, torch.Tensor]][source]

See ROIHeads.forward.

class OldEBVRedshiftPDFCasROIHeads(num_components: int, zloss_factor: float, *, box_in_features: List[str], box_pooler: detectron2.modeling.poolers.ROIPooler, box_heads: List[torch.nn.Module], box_predictors: List[torch.nn.Module], proposal_matchers: List[detectron2.modeling.matcher.Matcher], **kwargs)[source]

Bases: detectron2.modeling.roi_heads.CascadeROIHeads

CascadeROIHead with added redshift pdf capability. Follows the detectron2 CascadeROIHead class init, except for

Parameters:

num_components (int) – Number of gaussian components in the Mixture Density Network

redshift_pooler[source]
_output_size[source]
num_components[source]
zloss_factor[source]
redshift_fc[source]
output_pdf(inputs)[source]
_forward_redshift(features, instances)[source]
forward(images, features, proposals, targets=None)[source]