def __call__(self,
                 images: Union[str, np.ndarray, list],
                 questions: Union[str, list],
                 return_datasamples: bool = False,
                 batch_size: int = 1,
                 objects: Optional[List[str]] = None,
                 **kwargs) -> dict:
        """Call the inferencer.

        Args:
            images (str | array | list): The image path or array, or a list of
                images.
            questions (str | list): The question to the correspondding image.
            return_datasamples (bool): Whether to return results as
                :obj:`DataSample`. Defaults to False.
            batch_size (int): Batch size. Defaults to 1.
            objects (List[List[str]], optional): Some algorithms like OFA
                fine-tuned VQA models requires extra object description list
                for every image. Defaults to None.
            resize (int, optional): Resize the short edge of the image to the
                specified length before visualization. Defaults to None.
            show (bool): Whether to display the visualization result in a
                window. Defaults to False.
            wait_time (float): The display time (s). Defaults to 0, which means
                "forever".
            show_dir (str, optional): If not None, save the visualization
                results in the specified directory. Defaults to None.

        Returns:
            list: The inference results.
        """
        if not isinstance(images, (list, tuple)):
            assert isinstance(questions, str)
            inputs = [{'img': images, 'question': questions}]
            if objects is not None:
                assert isinstance(objects[0], str)
                inputs[0]['objects'] = objects
        else:
            inputs = []
            for i in range(len(images)):
                input_ = {'img': images[i], 'question': questions[i]}
                if objects is not None:
                    input_['objects'] = objects[i]
                inputs.append(input_)

        return super().__call__(inputs, return_datasamples, batch_size,
                                **kwargs)
Call the inferencer.

        Args:
            images (str | array | list): The image path or array, or a list of
                images.
            questions (str | list): The question to the correspondding image.
            return_datasamples (bool): Whether to return results as
                :obj:`DataSample`. Defaults to False.
            batch_size (int): Batch size. Defaults to 1.
            objects (List[List[str]], optional): Some algorithms like OFA
                fine-tuned VQA models requires extra object description list
                for every image. Defaults to None.
            resize (int, optional): Resize the short edge of the image to the
                specified length before visualization. Defaults to None.
            show (bool): Whether to display the visualization result in a
                window. Defaults to False.
            wait_time (float): The display time (s). Defaults to 0, which means
                "forever".
            show_dir (str, optional): If not None, save the visualization
                results in the specified directory. Defaults to None.

        Returns:
            list: The inference results.
        
mmpretrain/apis/visual_question_answering.py