def __init__(self, detection, max_age, n_init, sigma_h, color=None): self.color = color if color is not None else random_color() self.detections = [detection] self.ious = [] self.id = uuid4() self._max_age = max_age self._n_init = n_init self.hits = 1 self.age = 1 self.time_since_update = 0 self.state = TrackState.Tentative self.sigma_h = sigma_h
def __init__(self, detection, max_age, n_init, sigma_h, color=None): self.color = color if color is not None else random_color() self.detections = [detection] self.ious = [] self.id = uuid4() self._max_age = max_age self._n_init = n_init self.hits = 1 self.age = 1 self.time_since_update = 0 self.state = TrackState.Tentative self.sigma_h = sigma_h self.likelyClass = [] self.res = None self.ovwr = False self.ovwrClass = None self.gotLanePoint = False self.lane = 0 self.l1 = lane_range([0, 1400], [610, 490]) self.l2 = lane_range([0, 1400], [710, 520]) self.counted = False self.direction = None self.intersection = None
def create_new_on_tag_page(): tag_page = "true" rgb_color = common.random_color() return render_template("create_new_tag.html", tag_page=tag_page, rgb_color=rgb_color)
def create_new_tag(question_id): rgb_color = common.random_color() return render_template("create_new_tag.html", rgb_color=rgb_color, question_id=question_id)
def __init__(self, frame, bbox, color=None, tracker=None): self.id = uuid4() self.tracker = tracker() self.tracker.init(frame, tuple(bbox.tlwh.astype(int))) self.color = color if color is not None else random_color() self.bboxes = [bbox]