Skip to content

Commit

Permalink
fix time comparaison
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoLostanlen committed Aug 2, 2024
1 parent bb2d570 commit dfed7b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyroengine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ def predict(self, frame: Image.Image, cam_id: Optional[str] = None) -> float:
output_predictions = preds
conf = 0

ts = datetime.now(timezone.utc).isoformat()
ts = datetime.now(timezone.utc)
# Alert
if conf > self.conf_thresh and len(self.api_client) > 0 and isinstance(cam_id, str):
self._stage_alert(frame, cam_id, ts, output_predictions.tolist())
self._stage_alert(frame, cam_id, ts.isoformat(), output_predictions.tolist())

if self.save_captured_frames:
self._local_backup(frame, cam_id, is_alert=False)
Expand Down

0 comments on commit dfed7b7

Please sign in to comment.