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

Fixed the two Numpy alias deprecation errors #29

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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ https://user-images.githubusercontent.com/37156032/160282244-42f6bd8c-bfc8-47af-
<li>Clone this repo</li>
<li>Install all the dependencies</li>
<li>Download deepsort <a href="https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6">checkpoint</a> file and paste it in deep_sort_pytorch/deep_sort/deep/checkpoint</li>
<li>Run -> streamlit run app.py</li>
<li>Run -> 'streamlit run app.py' or 'python -m streamlit run app.py' in Windows.</li>
</ol>

## :star: Recent changelog
<ol>
<li>Fixed the errors related to <a href="https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations">Numpy 1.20.0 alias deprecations.</a></li>
<li>Updated yolov5s weight file name in detect() in app.py</li>
<li>Added drive link to download DeepSort checkpoint file (45Mb).</li>
</ol>
Expand Down
2 changes: 1 addition & 1 deletion deep_sort_pytorch/deep_sort/deep_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def update(self, bbox_xywh, confidences, ori_img):
box = track.to_tlwh()
x1, y1, x2, y2 = self._tlwh_to_xyxy(box)
track_id = track.track_id
outputs.append(np.array([x1, y1, x2, y2, track_id], dtype=np.int))
outputs.append(np.array([x1, y1, x2, y2, track_id], dtype=np.int32))
if len(outputs) > 0:
outputs = np.stack(outputs, axis=0)
return outputs
Expand Down
2 changes: 1 addition & 1 deletion deep_sort_pytorch/deep_sort/sort/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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.float32)
self.confidence = float(confidence)
self.feature = np.asarray(feature, dtype=np.float32)

Expand Down