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

        Args:
            images (str | array | list): The image path or array, or a list of
                images.
            texts (str | list): The text to do visual grounding.
            return_datasamples (bool): Whether to return results as
                :obj:`DataSample`. Defaults to False.
            batch_size (int): Batch size. Defaults to 1.
            resize (int, optional): Resize the short edge of the image to the
                specified length before visualization. Defaults to None.
            draw_score (bool): Whether to draw the prediction scores
                of prediction categories. Defaults to True.
            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.
            line_width (int): The line width of the bbox. Defaults to 3.
            bbox_color (str | tuple): The color of the bbox.
                Defaults to 'green'.

        Returns:
            list: The inference results.
        """
        if not isinstance(images, (list, tuple)):
            assert isinstance(texts, str)
            inputs = [{'img': images, 'text': texts}]
        else:
            inputs = []
            for i in range(len(images)):
                input_ = {'img': images[i], 'text': texts[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.
            texts (str | list): The text to do visual grounding.
            return_datasamples (bool): Whether to return results as
                :obj:`DataSample`. Defaults to False.
            batch_size (int): Batch size. Defaults to 1.
            resize (int, optional): Resize the short edge of the image to the
                specified length before visualization. Defaults to None.
            draw_score (bool): Whether to draw the prediction scores
                of prediction categories. Defaults to True.
            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.
            line_width (int): The line width of the bbox. Defaults to 3.
            bbox_color (str | tuple): The color of the bbox.
                Defaults to 'green'.

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