diff --git a/pyroengine/engine.py b/pyroengine/engine.py index 32c424c1..4ab06fbd 100644 --- a/pyroengine/engine.py +++ b/pyroengine/engine.py @@ -251,6 +251,10 @@ def _update_states(self, frame: Image.Image, preds: np.array, cam_key: str) -> b else: output_predictions = combine_predictions + # Limit bbox size in api + output_predictions = np.round(output_predictions, 3) # max 3 digit + 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) )