code: def get_mini_boxes(self, contour):
      bounding_box = cv2.minAreaRect(contour)
      points = sorted(
          list(cv2.boxPoints(bounding_box)), key=lambda x: x[0]
      )
  
      index_1, index_2, index_3, index_4 = 0, 1, 2, 3
      if points[1][1] > points[0][1]:
          index_1 = 0
          index_4 = 1
      else:
          index_1 = 1
          index_4 = 0
      if points[3][1] > points[2][1]:
          index_2 = 2
          index_3 = 3
      else:
          index_2 = 3
          index_3 = 2
  
      box = [
          points[index_1],
          points[index_2],
          points[index_3],
          points[index_4],
      ]
  
      return box, min(bounding_box[1])
  
imports: import os
  import math
  import yaml
  from shapely.geometry import Polygon
  import PIL.Image
  import numpy
  import cv2
  import pyclipper
  import torch
  from .model.constructor import Configurable
label_desc: Use image node_id 17 for calling the DBNet obj's underlying member method code with example usage: obj.get_mini_boxes(contour) and returns: box,  min