class_docstr: The PPMattinh implementation based on PaddlePaddle.
  
  The original article refers to
  Guowei Chen, et, al. "PP-Matting: High-Accuracy Natural Image Matting"
  (https://arxiv.org/pdf/2204.09433.pdf).
  
  Args:
      backbone: backbone model.
      pretrained(str, optional): The path of pretrianed model. Defautl: None.
class_docstr_tok: ["The","PPMattinh","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Guowei","Chen",",","et",",","al",".","``","PP-Matting",":","High-Accuracy","Natural","Image","Matting","''","(","https",":","\/\/arxiv.org\/pdf\/2204.09433.pdf",")",".","Args",":","backbone",":","backbone","model",".","pretrained","(","str",",","optional",")",":","The","path","of","pretrianed","model",".","Defautl",":","None","."]
code: def __init__(self, backbone, pretrained=None):
      super().__init__()
      self.backbone = backbone
      self.pretrained = pretrained
      self.loss_func_dict = self.get_loss_func_dict()
  
      self.backbone_channels = backbone.feat_channels
  
      self.scb = SCB(self.backbone_channels[-1])
  
      self.hrdb = HRDB(
          self.backbone_channels[0] + self.backbone_channels[1],
          scb_channels=self.scb.out_channels,
          gf_index=[0, 2, 4],
      )
  
      self.init_weight()
  
imports: from collections import defaultdict
  import time
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import paddleseg
  from paddleseg.models import layers
  from paddleseg import utils
  from paddleseg.cvlibs import manager
  from ppmatting.models.losses import MRSD, GradientLoss
  from ppmatting.models.backbone import resnet_vd
label_desc: Use image node_id 1 to create a new PPMatting object from inherited base classes: nn with example: obj = PPMatting(backbone, pretrained)