Code scan fixes (#18398)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-12-25 21:29:30 +01:00 committed by GitHub
parent 14ca9415e9
commit 9935b45377
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 11 deletions

View file

@ -135,10 +135,9 @@ class SecurityAlarm(BaseSolution):
self.annotator.box_label(box, label=self.names[cls], color=colors(cls, True))
total_det = len(self.clss)
if total_det > self.records: # Only send email If not sent before
if not self.email_sent:
self.send_email(im0, total_det)
self.email_sent = True
if total_det > self.records and not self.email_sent: # Only send email If not sent before
self.send_email(im0, total_det)
self.email_sent = True
self.display_output(im0) # display output with base class function