def draw_current_detection(self): if self.current_detection: self.img = self.img_temp.copy() draw_detection(self.img, self.current_detection, draw_anchors=False, kps_show_bbox=self.state.keypoints_show_bbox, kps_instance_color=self.state.keypoints_instance_color, bbox_class_color=self.state.bbox_class_color) self.img = cv2.addWeighted(self.original_img, self.transparency, self.img, 1 - self.transparency, 0)
def draw_bboxes(self, img): for detection in self.state.track_info.detections: label = None if detection.class_id not in self.state.track_info.class_names else \ "{}, {}".format(self.state.track_info.class_names[detection.class_id], detection.track_id) draw_detection(img, detection, kps_show_bbox=self.state.keypoints_show_bbox, kps_instance_color=self.state.keypoints_instance_color, bbox_class_color=self.state.bbox_class_color, label=label)
def draw_current_detection(self): if self.current_detection: self.img = self.img_temp.copy() draw_detection( self.img, self.current_detection, draw_anchors=False, kps_show_bbox=self.state.keypoints_show_bbox, kps_instance_color=self.state.keypoints_instance_color, bbox_class_color=self.state.bbox_class_color)