docstr: 初始化控制器.
  
  Parameters
  ----------
  predictor_params : dict
      推理器配置
  prob_thresh : float
      区分前景和背景结果的阈值
docstr_tok: ["\u521d\u59cb\u5316\u63a7\u5236\u5668",".","Parameters","--","--","--","--","--","predictor_params",":","dict","\u63a8\u7406\u5668\u914d\u7f6e","prob_thresh",":","float","\u533a\u5206\u524d\u666f\u548c\u80cc\u666f\u7ed3\u679c\u7684\u9608\u503c"]
code: def __init__(
      self,
      predictor_params: dict = None,
      prob_thresh: float = 0.5,
  ):
      """初始化控制器.
  
      Parameters
      ----------
      predictor_params : dict
          推理器配置
      prob_thresh : float
          区分前景和背景结果的阈值
  
      """
  
      self.predictor_params = predictor_params
      self.prob_thresh = prob_thresh
      self.model = None
      self.image = None
      self.rawImage = None
      self.predictor = None
      self.clicker = clicker.Clicker()
      self.states = []
      self.probs_history = []
      self.polygons = []
  
      # 用于redo
      self.undo_states = []
      self.undo_probs_history = []
  
      self.curr_label_number = 0
      self._result_mask = None
      self.labelList = LabelList()
      self.lccFilter = False
      self.log = logging.getLogger(__name__)
  
imports: import json
  import logging
  import os.path
  import time
  import cv2
  import numpy
  import paddle
  from skimage.measure import label
  import util
  from eiseg import logger
  from inference import clicker
  from inference.predictor import get_predictor
  from eiseg.models import EISegModel
  from util import LabelList
  from util.vis import draw_with_blend_and_clicks
label_desc: Use image node_id 1 to create a new InteractiveController object  with example: obj = InteractiveController(predictor_params, prob_thresh)