Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

np.float -> np.float64 #360

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yolox/tracker/byte_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class STrack(BaseTrack):
def __init__(self, tlwh, score):

# wait activate
self._tlwh = np.asarray(tlwh, dtype=np.float)
self._tlwh = np.asarray(tlwh, dtype=np.float64)
self.kalman_filter = None
self.mean, self.covariance = None, None
self.is_activated = False
Expand Down
12 changes: 6 additions & 6 deletions yolox/tracker/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ious

ious = 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
Expand Down Expand Up @@ -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 features
return cost_matrix

Expand Down