jdyjjj / All-in-One-Gait

TrackGait is a sub project of OpenGait. Implemented a gait recognition system.
74 stars 12 forks source link

Eliminate Deprecation Warning #9

Closed DavidLee528 closed 1 year ago

DavidLee528 commented 1 year ago

Silenced the warnings below:

# 1
....../libs/tracker/byte_tracker.py:18: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  self._tlwh = np.asarray(tlwh, dtype=np.float)

...

# 2
....../libs/tracker/matching.py:61: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  ious = np.zeros((len(atlbrs), len(btlbrs)), dtype=np.float)

...

# 3
....../libs/tracker/matching.py:66: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  np.ascontiguousarray(atlbrs, dtype=np.float),

...

# 4
....../libs/tracker/matching.py:67: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations