def __init__(self, class_names, model, input_shape):
    self.class_names = class_names
    self.num_classes = len(class_names)
    self.model = model
    self.input_shape = input_shape
    self.bbox_util = BBoxUtility(self.num_classes)
    self.class_colors = []
    for i in range(0, self.num_classes):
        hue = ((255 * i) / self.num_classes)
        col = np.zeros((1, 1, 3)).astype('uint8')
        col[0][0][0] = hue
        col[0][0][1] = 128
        col[0][0][2] = 255
        cvcol = cv2.cvtColor(col, cv2.COLOR_HSV2BGR)
        col = (int(cvcol[0][0][0]), int(cvcol[0][0][1]), int(cvcol[0][0][2]))
        self.class_colors.append(col)
def __init__(self, class_names, model, input_shape):
    self.class_names = class_names
    self.num_classes = len(class_names)
    self.model = model
    self.input_shape = input_shape
    self.bbox_util = BBoxUtility(self.num_classes)
    self.class_colors = []
    for i in range(0, self.num_classes):
        hue = ((255 * i) / self.num_classes)
        col = np.zeros((1, 1, 3)).astype('uint8')
        col[0][0][0] = hue
        col[0][0][1] = 128
        col[0][0][2] = 255
        cvcol = cv2.cvtColor(col, cv2.COLOR_HSV2BGR)
        col = (int(cvcol[0][0][0]), int(cvcol[0][0][1]), int(cvcol[0][0][2]))
        self.class_colors.append(col)