class_docstr: BodyposeModel
  
  Args:
      load_checkpoint(str): Checkpoint save path, default is None.
class_docstr_tok: ["BodyposeModel","Args",":","load_checkpoint","(","str",")",":","Checkpoint","save","path",",","default","is","None","."]
code: def __init__(self, load_checkpoint: str = None):
      super(BodyPoseModel, self).__init__()
  
      self.resize_func = P.ResizeScaling()
      self.norm_func = T.Normalize(std=[1, 1, 1])
      self.pad_func = P.PadDownRight()
      self.remove_pad = P.RemovePadding()
      self.get_peak = P.GetPeak()
      self.get_connection = P.Connection()
      self.get_candidate = P.Candidate()
      self.draw_pose = P.DrawPose()
  
      no_relu_layers = [
          "conv5_5_CPM_L1",
          "conv5_5_CPM_L2",
          "Mconv7_stage2_L1",
          "Mconv7_stage2_L2",
          "Mconv7_stage3_L1",
          "Mconv7_stage3_L2",
          "Mconv7_stage4_L1",
          "Mconv7_stage4_L2",
          "Mconv7_stage5_L1",
          "Mconv7_stage5_L2",
          "Mconv7_stage6_L1",
          "Mconv7_stage6_L1",
      ]
      blocks = {}
      block0 = OrderedDict(
          [
              ("conv1_1", [3, 64, 3, 1, 1]),
              ("conv1_2", [64, 64, 3, 1, 1]),
              ("pool1_stage1", [2, 2, 0]),
              ("conv2_1", [64, 128, 3, 1, 1]),
              ("conv2_2", [128, 128, 3, 1, 1]),
              ("pool2_stage1", [2, 2, 0]),
              ("conv3_1", [128, 256, 3, 1, 1]),
              ("conv3_2", [256, 256, 3, 1, 1]),
              ("conv3_3", [256, 256, 3, 1, 1]),
              ("conv3_4", [256, 256, 3, 1, 1]),
              ("pool3_stage1", [2, 2, 0]),
              ("conv4_1", [256, 512, 3, 1, 1]),
              ("conv4_2", [512, 512, 3, 1, 1]),
              ("conv4_3_CPM", [512, 256, 3, 1, 1]),
              ("conv4_4_CPM", [256, 128, 3, 1, 1]),
          ]
      )
  
      block1_1 = OrderedDict(
          [
              ("conv5_1_CPM_L1", [128, 128, 3, 1, 1]),
              ("conv5_2_CPM_L1", [128, 128, 3, 1, 1]),
              ("conv5_3_CPM_L1", [128, 128, 3, 1, 1]),
              ("conv5_4_CPM_L1", [128, 512, 1, 1, 0]),
              ("conv5_5_CPM_L1", [512, 38, 1, 1, 0]),
          ]
      )
  
      block1_2 = OrderedDict(
          [
              ("conv5_1_CPM_L2", [128, 128, 3, 1, 1]),
              ("conv5_2_CPM_L2", [128, 128, 3, 1, 1]),
              ("conv5_3_CPM_L2", [128, 128, 3, 1, 1]),
              ("conv5_4_CPM_L2", [128, 512, 1, 1, 0]),
              ("conv5_5_CPM_L2", [512, 19, 1, 1, 0]),
          ]
      )
      blocks["block1_1"] = block1_1
      blocks["block1_2"] = block1_2
  
      self.model0 = self.make_layers(block0, no_relu_layers)
  
      for i in range(2, 7):
          blocks["block%d_1" % i] = OrderedDict(
              [
                  ("Mconv1_stage%d_L1" % i, [185, 128, 7, 1, 3]),
                  ("Mconv2_stage%d_L1" % i, [128, 128, 7, 1, 3]),
                  ("Mconv3_stage%d_L1" % i, [128, 128, 7, 1, 3]),
                  ("Mconv4_stage%d_L1" % i, [128, 128, 7, 1, 3]),
                  ("Mconv5_stage%d_L1" % i, [128, 128, 7, 1, 3]),
                  ("Mconv6_stage%d_L1" % i, [128, 128, 1, 1, 0]),
                  ("Mconv7_stage%d_L1" % i, [128, 38, 1, 1, 0]),
              ]
          )
  
          blocks["block%d_2" % i] = OrderedDict(
              [
                  ("Mconv1_stage%d_L2" % i, [185, 128, 7, 1, 3]),
                  ("Mconv2_stage%d_L2" % i, [128, 128, 7, 1, 3]),
                  ("Mconv3_stage%d_L2" % i, [128, 128, 7, 1, 3]),
                  ("Mconv4_stage%d_L2" % i, [128, 128, 7, 1, 3]),
                  ("Mconv5_stage%d_L2" % i, [128, 128, 7, 1, 3]),
                  ("Mconv6_stage%d_L2" % i, [128, 128, 1, 1, 0]),
                  ("Mconv7_stage%d_L2" % i, [128, 19, 1, 1, 0]),
              ]
          )
  
      for k in blocks.keys():
          blocks[k] = self.make_layers(blocks[k], no_relu_layers)
  
      self.model1_1 = blocks["block1_1"]
      self.model2_1 = blocks["block2_1"]
      self.model3_1 = blocks["block3_1"]
      self.model4_1 = blocks["block4_1"]
      self.model5_1 = blocks["block5_1"]
      self.model6_1 = blocks["block6_1"]
  
      self.model1_2 = blocks["block1_2"]
      self.model2_2 = blocks["block2_2"]
      self.model3_2 = blocks["block3_2"]
      self.model4_2 = blocks["block4_2"]
      self.model5_2 = blocks["block5_2"]
      self.model6_2 = blocks["block6_2"]
  
      if load_checkpoint is not None:
          self.model_dict = paddle.load(load_checkpoint)
          self.set_dict(self.model_dict)
          print("load custom checkpoint success")
  
      else:
          checkpoint = os.path.join(
              self.directory, "openpose_body.pdparams"
          )
          self.model_dict = paddle.load(checkpoint)
          self.set_dict(self.model_dict)
          print("load pretrained checkpoint success")
  
imports: import os
  import time
  import copy
  import argparse
  from typing import Union
  from collections import OrderedDict
  import cv2
  import paddle
  import paddle.nn
  import numpy
  from paddlehub.module.module import moduleinfo, runnable, serving
  import paddlehub.vision.transforms
  from .None import processor
label_desc: Use image node_id 1 to create a new BodyPoseModel object from inherited base classes: nn with example: obj = BodyPoseModel(load_checkpoint)