class_docstr: Args:
      min_subgraph_size (int): number of tensorRT graphs.
      use_gpu (bool): whether use gpu
      threshold (float): threshold to reserve the result for output.
class_docstr_tok: ["Args",":","min_subgraph_size","(","int",")",":","number","of","tensorRT","graphs",".","use_gpu","(","bool",")",":","whether","use","gpu","threshold","(","float",")",":","threshold","to","reserve","the","result","for","output","."]
code: def __init__(self, min_subgraph_size: int = 60, use_gpu=False):
      self.default_pretrained_model_path = os.path.join(
          self.directory, "solov2_r50_fpn_1x", "model"
      )
      self.predictor = D.load_predictor(
          self.default_pretrained_model_path,
          min_subgraph_size=min_subgraph_size,
          use_gpu=use_gpu,
      )
      self.compose = [
          P.Resize(max_size=1333),
          P.Normalize(
              mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
          ),
          P.Permute(),
          P.PadStride(stride=32),
      ]
  
imports: import base64
  import os
  import time
  from functools import reduce
  from typing import Union
  import numpy
  import solov2.data_feed
  import solov2.processor
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import serving
label_desc: Use image node_id 1 to create a new Detector object  with example: obj = Detector(min_subgraph_size, use_gpu)