code: def inference(self, model, image):
      ic_inferencer = ImageCaptionInferencer(
          **self.model_info[model],
          scope="mmdet",
          device=get_free_device(),
      )
      results_dict = ic_inferencer(
          image,
          return_vis=False,
          no_save_vis=True,
          return_datasamples=True,
      )
      return results_dict["predictions"][0].pred_caption
  
imports: import gradio
  import torch
  from mmengine.logging import MMLogger
  from mmdet.apis import DetInferencer
  from projects.XDecoder.xdecoder.inference import ImageCaptionInferencer, RefImageCaptionInferencer, TextToImageRegionRetrievalInferencer
label_desc: Use image node_id 3 for calling the ImageCaptionTab obj's underlying member method code with example usage: obj.inference(model, image) and returns: results_dict