Skip to content

Commit

Permalink
Send bbox again (#173)
Browse files Browse the repository at this point in the history
* send localization

* remove useless str convertion
  • Loading branch information
MateoLostanlen authored Oct 26, 2023
1 parent 49a23fb commit f01f2f3
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 @@ -256,7 +256,7 @@ def _update_states(self, frame: Image.Image, preds: np.ndarray, cam_key: str) ->
output_predictions = output_predictions[:5, :] # max 5 bbox

self._states[cam_key]["last_predictions"].append(
(frame, preds, str(json.dumps(output_predictions.tolist())), datetime.utcnow().isoformat(), False)
(frame, preds, json.dumps(output_predictions.tolist()), datetime.utcnow().isoformat(), False)
)

# update state
Expand Down Expand Up @@ -390,7 +390,7 @@ def _process_alerts(self) -> None:
lat=self.latitude,
lon=self.longitude,
media_id=self._alerts[0]["media_id"],
# localization=self._alerts[0]["localization"],
localization=self._alerts[0]["localization"],
)
.json()["id"]
)
Expand Down

0 comments on commit f01f2f3

Please sign in to comment.