Add https://youtu.be/96NkhsV-W1U to docs and heatmaps fix (#7944)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Rizwan Munawar 2024-02-01 23:47:58 +05:00 committed by GitHub
parent ba484929e3
commit 68de79dbd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 3 deletions

View file

@ -167,9 +167,10 @@ class Heatmap:
"""
self.im0 = im0
if tracks[0].boxes.id is None:
self.heatmap = np.zeros((int(self.imh), int(self.imw)), dtype=np.float32)
if self.view_img and self.env_check:
self.display_frames()
return
return im0
self.heatmap *= self.decay_factor # decay factor
self.extract_results(tracks)
self.annotator = Annotator(self.im0, self.count_txt_thickness, None)