def update(self, image: Tensor) -> None:
        """Update the tracker with a new image.

        Args:
            image: The input image.

        """
        if not (image.ndim == 4 and image.shape[0] == 1) and not image.ndim == 3:
            raise ValueError(f"Input tensor must be of shape (1, 3, H, W) or (3, H, W). Got {image.shape}")

        if image.ndim == 3:
            image = image.unsqueeze(0)

        detections_raw: Union[Tensor, list[Tensor]] = self.detector(image)

        detections = detections_raw[0].cpu().numpy()  # Batch size is 1

        detections = np.array(  # type: ignore
            [
                detections[:, 2],
                detections[:, 3],
                detections[:, 2] + detections[:, 4],
                detections[:, 3] + detections[:, 5],
                detections[:, 1],
                detections[:, 0],
            ]
        ).T

        if detections.shape[0] == 0:
            # empty N X (x, y, x, y, conf, cls)
            detections = np.empty((0, 6))  # type: ignore

        frame_raw = (tensor_to_image(image) * 255).astype(np.uint8)
        # --> M X (x, y, x, y, id, conf, cls, ind)
        return self.tracker.update(detections, frame_raw)
Update the tracker with a new image.

        Args:
            image: The input image.

        
kornia/models/tracking/boxmot_tracker.py