(track, det_rect)
| 91 | return cal_iou(det_rect1.next_rect, det_rect2.curr_rect) |
| 92 | |
| 93 | def cal_simi_track_det(track, det_rect): |
| 94 | if(det_rect.curr_frame <= track.last_frame): |
| 95 | print("cal_simi_track_det error") |
| 96 | return 0 |
| 97 | elif(det_rect.curr_frame - track.last_frame == 1): |
| 98 | return cal_iou(track.last_rect.next_rect, det_rect.curr_rect) |
| 99 | else: |
| 100 | pred_rect = track.last_rect.curr_rect + np.append(track.velocity, track.velocity) * (det_rect.curr_frame - track.last_frame) |
| 101 | return cal_iou(pred_rect, det_rect.curr_rect) |
| 102 | |
| 103 | def track_det_match(tracklet_list, det_rect_list, min_iou = 0.5): |
| 104 | num1 = len(tracklet_list) |
no test coverage detected