diff --git a/frigate/detectors/plugins/axelera.py b/frigate/detectors/plugins/axelera.py index ba302325a9..e1e6a0198d 100644 --- a/frigate/detectors/plugins/axelera.py +++ b/frigate/detectors/plugins/axelera.py @@ -424,13 +424,23 @@ class _AxeleraRuntimeInference: # -- public contract used by AxeleraDetector -------------------------- def submit(self, connection_id: str, frame: np.ndarray) -> None: - """Queue one frame for inference, owned by `connection_id`.""" + """Queue one frame for inference, owned by `connection_id`. + + On overload (input queue full) the frame's INFERENCE is dropped but a + zero-row result is still emitted for `connection_id`: the async runner + contract is strictly 1 submission : 1 result (SHM cleanup + timing + pairing), so raising here would leave the runner waiting for a result + that never arrives. + """ try: self._frame_q.put_nowait((connection_id, frame)) except queue.Full: - raise RuntimeError( - "Axelera inference queue is full; restart required." - ) from None + logger.warning( + "axelera: inference queue full; dropping frame for %s", + connection_id, + ) + self._push_result(connection_id, np.zeros((MAX_ROWS, 6), np.float32)) + return self._ensure_threads() def _ensure_threads(self) -> None: