Add object detection, tracking, mobile notifications, and search to any security camera.
float64 fix
Rory Clear64a1cfce7225
diff --git a/experimental/yolox/deepsort_tracker/detection.py b/experimental/yolox/deepsort_tracker/detection.pyindex 9bd8497..803306f 100644--- a/experimental/yolox/deepsort_tracker/detection.py+++ b/experimental/yolox/deepsort_tracker/detection.py@@ -24,7 +24,7 @@ class Detection(object):"""def __init__(self, tlwh, confidence, feature):- self.tlwh = np.asarray(tlwh, dtype=np.float)+ self.tlwh = np.asarray(tlwh, dtype=np.float64)self.confidence = float(confidence)self.feature = np.asarray(feature, dtype=np.float32)diff --git a/experimental/yolox/motdt_tracker/motdt_tracker.py b/experimental/yolox/motdt_tracker/motdt_tracker.pyindex b3521f2..589b474 100644--- a/experimental/yolox/motdt_tracker/motdt_tracker.py+++ b/experimental/yolox/motdt_tracker/motdt_tracker.py@@ -21,7 +21,7 @@ class STrack(BaseTrack):def __init__(self, tlwh, score, max_n_features=100, from_det=True):# wait activate- self._tlwh = np.asarray(tlwh, dtype=np.float)+ self._tlwh = np.asarray(tlwh, dtype=np.float64)self.kalman_filter = Noneself.mean, self.covariance = None, Noneself.is_activated = Falsediff --git a/experimental/yolox/tracker/byte_tracker.py b/experimental/yolox/tracker/byte_tracker.pyindex 317f2b2..9bae173 100644--- a/experimental/yolox/tracker/byte_tracker.py+++ b/experimental/yolox/tracker/byte_tracker.py@@ -9,7 +9,7 @@ class STrack(BaseTrack):def __init__(self, tlwh, score, class_id):# wait activate- self._tlwh = np.asarray(tlwh, dtype=np.float)+ self._tlwh = np.asarray(tlwh, dtype=np.float64)self.kalman_filter = Noneself.mean, self.covariance = None, Noneself.is_activated = Falsediff --git a/experimental/yolox/tracker/matching.py b/experimental/yolox/tracker/matching.pyindex d36a6cf..2572c4d 100644--- a/experimental/yolox/tracker/matching.py+++ b/experimental/yolox/tracker/matching.py@@ -58,13 +58,13 @@ def ious(atlbrs, btlbrs)::rtype ious np.ndarray"""- ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)+ ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float64)if ious.size == 0:return iousious = bbox_ious(- np.ascontiguousarray(atlbrs, dtype=np.float),- np.ascontiguousarray(btlbrs, dtype=np.float)+ np.ascontiguousarray(atlbrs, dtype=np.float64),+ np.ascontiguousarray(btlbrs, dtype=np.float64))return ious@@ -118,13 +118,13 @@ def embedding_distance(tracks, detections, metric='cosine')::return: cost_matrix np.ndarray"""- cost_matrix = np.zeros((len(tracks), len(detections)), dtype=np.float)+ cost_matrix = np.zeros((len(tracks), len(detections)), dtype=np.float64)if cost_matrix.size == 0:return cost_matrix- det_features = np.asarray([track.curr_feat for track in detections], dtype=np.float)+ det_features = np.asarray([track.curr_feat for track in detections], dtype=np.float64)#for i, track in enumerate(tracks):#cost_matrix[i, :] = np.maximum(0.0, cdist(track.smooth_feat.reshape(1,-1), det_features, metric))- track_features = np.asarray([track.smooth_feat for track in tracks], dtype=np.float)+ track_features = np.asarray([track.smooth_feat for track in tracks], dtype=np.float64)cost_matrix = np.maximum(0.0, cdist(track_features, det_features, metric)) # Nomalized featuresreturn cost_matrix