pyiqa.archs.inceptionscore_arch =============================== .. py:module:: pyiqa.archs.inceptionscore_arch .. autoapi-nested-parse:: Inception score metric, proposed by Salimans, Tim, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. "Improved techniques for training gans." Advances in neural information processing systems 29 (2016). Reference codes: - https://github.com/openai/improved-gan/tree/master/inception_score - https://github.com/sbarratt/inception-score-pytorch Module Contents --------------- .. py:class:: InceptionScore Bases: :py:obj:`torch.nn.Module` Compute Inception Score (IS) for a folder of generated images. .. py:method:: forward(img_dir, mode='legacy_tensorflow', splits=10, num_workers=12, batch_size=32, device=torch.device('cuda'), verbose=True, **kwargs) Compute IS mean and standard deviation. :param img_dir: Directory containing images. :type img_dir: str :param mode: Preprocessing mode used by the Inception feature extractor. :type mode: str :param splits: Number of splits used in IS estimation. :type splits: int :param num_workers: Number of dataloader workers. :type num_workers: int :param batch_size: Batch size for feature extraction. :type batch_size: int :param device: Device for inference. :type device: torch.device :param verbose: Whether to print progress. :type verbose: bool :param \*\*kwargs: Unused extra keyword arguments for compatibility. :returns: Dictionary with ``inception_score_mean`` and ``inception_score_std``. :rtype: dict[str, float]