code: def im_detect_bbox_hflip(
      model, im, target_scale, target_max_size, box_proposals=None
  ):
      """Performs bbox detection on the horizontally flipped image.
      Function signature is the same as for im_detect_bbox.
      """
      # Compute predictions on the flipped image
      im_hf = im[:, ::-1, :]
      im_width = im.shape[1]
  
      if not cfg.MODEL.FASTER_RCNN:
          box_proposals_hf = box_utils.flip_boxes(
              box_proposals, im_width
          )
      else:
          box_proposals_hf = None
  
      scores_hf, boxes_hf, im_scale = im_detect_bbox(
          model,
          im_hf,
          target_scale,
          target_max_size,
          boxes=box_proposals_hf,
      )
  
      # Invert the detections computed on the flipped image
      boxes_inv = box_utils.flip_boxes(boxes_hf, im_width)
  
      return scores_hf, boxes_inv, im_scale
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import defaultdict
  import cv2
  import logging
  import numpy
  from caffe2.python import core
  from caffe2.python import workspace
  import pycocotools.mask
  from detectron.core.config import cfg
  from detectron.utils.timer import Timer
  import detectron.core.test_retinanet
  import detectron.modeling.FPN
  import detectron.utils.blob
  import detectron.utils.boxes
  import detectron.utils.image
  import detectron.utils.keypoints
label_desc: Use image node_id 5 for calling a global function with example usage: im_detect_bbox_hflip(model, im, target_scale, target_max_size, box_proposals) and returns: scores_hf,  boxes_inv,  im_scale