class_docstr: Predictor contains the last layers of a DensePose model that take DensePose head
  outputs as an input and produce model outputs. Confidence predictor mixin is used
  to generate confidences for segmentation and UV tensors estimated by some
  base predictor. Several assumptions need to hold for the base predictor:
  1) the `forward` method must return SIUV tuple as the first result (
      S = coarse segmentation, I = fine segmentation, U and V are intrinsic
      chart coordinates)
  2) `interp2d` method must be defined to perform bilinear interpolation;
      the same method is typically used for SIUV and confidences
  Confidence predictor mixin provides confidence estimates, as described in:
      N. Neverova et al., Correlated Uncertainty for Learning Dense Correspondences
          from Noisy Labels, NeurIPS 2019
      A. Sanakoyeu et al., Transferring Dense Pose to Proximal Animal Classes, CVPR 2020
class_docstr_tok: ["Predictor","contains","the","last","layers","of","a","DensePose","model","that","take","DensePose","head","outputs","as","an","input","and","produce","model","outputs",".","Confidence","predictor","mixin","is","used","to","generate","confidences","for","segmentation","and","UV","tensors","estimated","by","some","base","predictor",".","Several","assumptions","need","to","hold","for","the","base","predictor",":","1",")","the","`","forward","`","method","must","return","SIUV","tuple","as","the","first","result","(","S","=","coarse","segmentation",",","I","=","fine","segmentation",",","U","and","V","are","intrinsic","chart","coordinates",")","2",")","`","interp2d","`","method","must","be","defined","to","perform","bilinear","interpolation",";","the","same","method","is","typically","used","for","SIUV","and","confidences","Confidence","predictor","mixin","provides","confidence","estimates",",","as","described","in",":","N.","Neverova","et","al.",",","Correlated","Uncertainty","for","Learning","Dense","Correspondences","from","Noisy","Labels",",","NeurIPS","2019","A.","Sanakoyeu","et","al.",",","Transferring","Dense","Pose","to","Proximal","Animal","Classes",",","CVPR","2020"]
docstr: Create an instance of predictor outputs by copying the outputs from the
  base predictor and initializing confidence
  
  Args:
      base_predictor_outputs: an instance of base predictor outputs
          (the outputs type is assumed to be a dataclass)
  Return:
     An instance of outputs with confidences
docstr_tok: ["Create","an","instance","of","predictor","outputs","by","copying","the","outputs","from","the","base","predictor","and","initializing","confidence","Args",":","base_predictor_outputs",":","an","instance","of","base","predictor","outputs","(","the","outputs","type","is","assumed","to","be","a","dataclass",")","Return",":","An","instance","of","outputs","with","confidences"]
code: def _create_output_instance(self, base_predictor_outputs: Any):
      """
      Create an instance of predictor outputs by copying the outputs from the
      base predictor and initializing confidence
  
      Args:
          base_predictor_outputs: an instance of base predictor outputs
              (the outputs type is assumed to be a dataclass)
      Return:
         An instance of outputs with confidences
      """
      PredictorOutput = (
          decorate_predictor_output_class_with_confidences(
              type(base_predictor_outputs)  # pyre-ignore[6]
          )
      )
      # base_predictor_outputs is assumed to be a dataclass
      # reassign all the fields from base_predictor_outputs (no deep copy!), add new fields
      output = PredictorOutput(
          **base_predictor_outputs.__dict__,
          coarse_segm_confidence=None,
          fine_segm_confidence=None,
          sigma_1=None,
          sigma_2=None,
          kappa_u=None,
          kappa_v=None,
      )
      return output
  
file_path: detectron2/projects/DensePose/densepose/modeling/predictors/chart_confidence.py
imports: from typing import Any
  import torch
  from torch.nn import functional
  from detectron2.config import CfgNode
  from detectron2.layers import ConvTranspose2d
  from ...structures import decorate_predictor_output_class_with_confidences
  from ..confidence import DensePoseConfidenceModelConfig, DensePoseUVConfidenceType
  from ..utils import initialize_module_params
label_desc: Use image node_id 4 for calling the DensePoseChartConfidencePredictorMixin obj's underlying member method code with example usage: obj._create_output_instance(base_predictor_outputs) and returns: output