class_docstr: Identical to StandardROIHeads, except for some weights conversion code to
  handle old models.
class_docstr_tok: ["Identical","to","StandardROIHeads",",","except","for","some","weights","conversion","code","to","handle","old","models","."]
code: def _init_mask_head(cls, cfg, input_shape):
      if (
          cfg.MODEL.MASK_ON
          and cfg.MODEL.ROI_MASK_HEAD.NAME != "PointRendMaskHead"
      ):
          logger = logging.getLogger(__name__)
          logger.warning(
              "Config of PointRend models have changed! "
              "Please upgrade your models. Applying automatic conversion now ..."
          )
          assert cfg.MODEL.ROI_MASK_HEAD.NAME == "CoarseMaskHead"
          cfg.defrost()
          cfg.MODEL.ROI_MASK_HEAD.NAME = "PointRendMaskHead"
          cfg.MODEL.ROI_MASK_HEAD.POOLER_TYPE = ""
          cfg.freeze()
      return super()._init_mask_head(cfg, input_shape)
  
imports: import logging
  from detectron2.modeling import ROI_HEADS_REGISTRY, StandardROIHeads
label_desc: Use image node_id 2 for calling the PointRendROIHeads obj's underlying member method code with example usage: obj._init_mask_head(cls, cfg, input_shape) and returns: super