text: from mmdet.apis import init_detector, inference_detector, show_result_pyplot
  
  
  
  
  
  
  if __name__ == '__main__':
      config = r'..\configs\faster_rcnn\faster_rcnn_r50_fpn_2x_sirst.py'
      checkpoint = r'..\workdirs\faster_rcnn_r50_fpn_2x_sirst\latest.pth'
      img = r'..\data\sirst\val_2022\Misc_5.png'
  
      model = init_detector(config, checkpoint, device='cuda:0')
      print(f'model:\n{model}')
      result = inference_detector(model, img)
      print(f'result:{result}')
      show_result_pyplot(model, img, result, score_thr=0.3)