Added JIT compilation support via numba package.
This commit is contained in:
parent
151129130e
commit
6371e99fd1
1 changed files with 5 additions and 4 deletions
9
sort.py
9
sort.py
|
@ -17,6 +17,7 @@
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
from numba import jit
|
||||||
import os.path
|
import os.path
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
@ -28,7 +29,7 @@ import time
|
||||||
import argparse
|
import argparse
|
||||||
from filterpy.kalman import KalmanFilter
|
from filterpy.kalman import KalmanFilter
|
||||||
|
|
||||||
|
@jit
|
||||||
def iou(bb_test,bb_gt):
|
def iou(bb_test,bb_gt):
|
||||||
"""
|
"""
|
||||||
Computes IUO between two bboxes in the form [x1,y1,x2,y2]
|
Computes IUO between two bboxes in the form [x1,y1,x2,y2]
|
||||||
|
@ -150,9 +151,9 @@ def associate_detections_to_trackers(detections,trackers,iou_threshold = 0.3):
|
||||||
if(d not in matched_indices[:,0]):
|
if(d not in matched_indices[:,0]):
|
||||||
unmatched_detections.append(d)
|
unmatched_detections.append(d)
|
||||||
unmatched_trackers = []
|
unmatched_trackers = []
|
||||||
for d,det in enumerate(trackers):
|
for t,trk in enumerate(trackers):
|
||||||
if(d not in matched_indices[:,1]):
|
if(t not in matched_indices[:,1]):
|
||||||
unmatched_trackers.append(d)
|
unmatched_trackers.append(t)
|
||||||
|
|
||||||
#filter out matched with low IOU
|
#filter out matched with low IOU
|
||||||
matches = []
|
matches = []
|
||||||
|
|
Loading…
Reference in a new issue