    def apply_image(self, image: np.ndarray) -> np.ndarray:
        """
        Expects a numpy array with shape HxWxC in uint8 format.
        """
        img = to_pil_image(image, mode='RGB')
        return np.array(img.resize((self.target_length, self.target_length)))
Expects a numpy array with shape HxWxC in uint8 format.
projects/llava_sam2/hf/models/modeling_sa2va_chat.py