code: def __init__(self, parent=None):
      super(AnnotationScene, self).__init__(parent)
      self.creating = False
      self.det_mode = False
      self.polygon_items = []
      self.scale = 1
      # draw cross
      self.coords = None
      self.pen = QPen()
      self.pen.setWidth(2)
      self.pen.setColor(QColor(0, 0, 0, 127))
      # draw rect_box
      self.is_draw = False
      self.is_press = False
      self.rect_box = [0, 0, 0, 0]
  
imports: from qtpy import QtWidgets, QtCore
  from qtpy.QtCore import Qt, QPointF
  from qtpy.QtGui import QPen, QColor
label_desc: Use image node_id 1 to create a new AnnotationScene object from inherited base classes: QtWidgets with example: obj = AnnotationScene(parent)