code: def __init__(
      self,
      labelIndex,
      polyline,
      borderColor=[0, 0, 255],
      cocoIndex=None,
      parent=None,
  ):
      super(BBoxAnnotation, self).__init__(parent)
      self.polyline = polyline
      self.corner_points = []
      self.upper_right = QtCore.QPointF()
      self.bottom_left = QtCore.QPointF()
      self.w = -1.0
      self.h = -1.0
  
      self.parent = parent
      self.is_added = False
      if self.parent is not None:
          self.is_added = True
      self.labelIndex = labelIndex
      self.coco_id = cocoIndex
      self.bbox_hovering = True
  
      # set rendering attributes
      self.setZValue(10)
  
      # b = borderColor
      # self.borderColor = QtGui.QColor(b[0], b[1], b[2])
      self.borderColor = QtGui.QColor(128, 128, 128)
      self.borderColor.setAlphaF(0.8)
      pen = QtGui.QPen(self.borderColor, 1.2)
      pen.setStyle(Qt.DashDotLine)
      self.setPen(pen)
  
      self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, False)
      self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, False)
      self.setFlag(
          QtWidgets.QGraphicsItem.ItemSendsGeometryChanges, True
      )
      self.setFlag(QtWidgets.QGraphicsItem.ItemIsFocusable, False)
      self.setAcceptHoverEvents(False)
  
file_path: PaddleSeg/EISeg/eiseg/widget/bbox.py
imports: from qtpy import QtWidgets, QtGui, QtCore
  from qtpy.QtCore import Qt
label_desc: Use image node_id 1 to create a new BBoxAnnotation object from inherited base classes: QtWidgets with example: obj = BBoxAnnotation(labelIndex, polyline, borderColor, cocoIndex, parent)