def validation_step(self, batch: VideoBatch, *args, **kwargs) -> STEP_OUTPUT:
        """Perform the validation step of AI-VAD.

        Extract boxes and box scores from the input batch.

        Args:
            batch (VideoBatch): Input batch containing video frames and metadata.
            *args: Additional arguments (unused).
            **kwargs: Additional keyword arguments (unused).

        Returns:
            STEP_OUTPUT: Batch dictionary with added predictions and anomaly maps.
        """
        del args, kwargs  # Unused arguments.

        predictions = self.model(batch.image)
        return batch.update(pred_score=predictions.pred_score, anomaly_map=predictions.anomaly_map)
Perform the validation step of AI-VAD.

        Extract boxes and box scores from the input batch.

        Args:
            batch (VideoBatch): Input batch containing video frames and metadata.
            *args: Additional arguments (unused).
            **kwargs: Additional keyword arguments (unused).

        Returns:
            STEP_OUTPUT: Batch dictionary with added predictions and anomaly maps.
        
src/anomalib/models/video/ai_vad/lightning_model.py