code: def __init__(self, FLAGS, cfg):
      self.FLAGS = FLAGS
      self.cfg = cfg
      # build model
      self.trainer = self.build_trainer(cfg)
      # num_class
      self.num_class = cfg.num_classes
      # set hook for extraction of featuremaps and grads
      self.set_hook(cfg)
      self.nms_idx_need_divid_numclass_arch = [
          "FasterRCNN",
          "MaskRCNN",
          "CascadeRCNN",
      ]
      """
          In these networks, the bbox array shape before nms contain num_class,
          the nms_keep_idx of the bbox need to divide the num_class; 
          """
  
      # cam image output_dir
      try:
          os.makedirs(FLAGS.cam_out)
      except:
          print("Path already exists.")
          pass
  
file_path: PaddleDetection/ppdet/utils/cam_utils.py
imports: import numpy
  import cv2
  import os
  import sys
  import glob
  from ppdet.utils.logger import setup_logger
  import copy
  import paddle
  from ppdet.engine import Trainer
label_desc: Use image node_id 1 to create a new BBoxCAM object  with example: obj = BBoxCAM(FLAGS, cfg)