from __future__ import annotations import numpy as np from loguru import logger TARGET_WIDTH = 1280 TARGET_HEIGHT = 720 def validate_frame_size(image: np.ndarray, width: int = TARGET_WIDTH, height: int = TARGET_HEIGHT) -> None: h, w = image.shape[:2] if w != width or h != height: logger.warning("Unexpected frame size: {}x{}", w, h)