class_docstr: The MODNet implementation based on PaddlePaddle.
  
  The original article refers to
  Zhanghan Ke, et, al. "Is a Green Screen Really Necessary for Real-Time Portrait Matting?"
  (https://arxiv.org/pdf/2011.11961.pdf).
  
  Args:
      backbone: backbone model.
      hr(int, optional): The channels of high resolutions branch. Defautl: None.
      pretrained(str, optional): The path of pretrianed model. Defautl: None.
class_docstr_tok: ["The","MODNet","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Zhanghan","Ke",",","et",",","al",".","``","Is","a","Green","Screen","Really","Necessary","for","Real-Time","Portrait","Matting","?","''","(","https",":","\/\/arxiv.org\/pdf\/2011.11961.pdf",")",".","Args",":","backbone",":","backbone","model",".","hr","(","int",",","optional",")",":","The","channels","of","high","resolutions","branch",".","Defautl",":","None",".","pretrained","(","str",",","optional",")",":","The","path","of","pretrianed","model",".","Defautl",":","None","."]
code: def __init__(self, backbone, hr_channels=32, pretrained=None):
      super().__init__()
      self.backbone = backbone
      self.pretrained = pretrained
      self.head = MODNetHead(
          hr_channels=hr_channels,
          backbone_channels=backbone.feat_channels,
      )
      self.init_weight()
      self.blurer = GaussianBlurLayer(1, 3)
      self.loss_func_dict = None
  
imports: from collections import defaultdict
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  import scipy
  import paddleseg
  from paddleseg.models import layers, losses
  from paddleseg import utils
  from paddleseg.cvlibs import manager, param_init
label_desc: Use image node_id 1 to create a new MODNet object from inherited base classes: nn with example: obj = MODNet(backbone, hr_channels, pretrained)