pyiqa.archs.qualiclip_arch ========================== .. py:module:: pyiqa.archs.qualiclip_arch .. autoapi-nested-parse:: Quality-Aware Image-Text Alignment for Real-World Image Quality Assessment @article{agnolucci2024qualityaware, title={Quality-Aware Image-Text Alignment for Real-World Image Quality Assessment}, author={Agnolucci, Lorenzo and Galteri, Leonardo and Bertini, Marco}, journal={arXiv preprint arXiv:2403.11176}, year={2024} } Reference: - Arxiv link: https://arxiv.org/abs/2403.11176 - Official Github: https://github.com/miccunifi/QualiCLIP Module Contents --------------- .. py:data:: default_model_urls .. py:class:: PromptLearner(clip_model, prompt_pairs, n_ctx=16, ctx_init='', prompt_specific_ctx=False) Bases: :py:obj:`torch.nn.Module` PromptLearner class for learning prompts for QualiCLIP+. See https://github.com/IceClear/CLIP-IQA for reference. .. py:method:: get_prompts_with_middle_class() Get prompts with the original text embedding inserted in the middle. :returns: The generated prompts. :rtype: torch.Tensor .. py:method:: forward(clip_model) Forward pass for the PromptLearner. :param clip_model: The CLIP model. :type clip_model: nn.Module :returns: The output features. :rtype: torch.Tensor .. py:class:: QualiCLIP(model_type='qualiclip+', backbone='RN50', temperature=2, n_ctx=16, ctx_init='', prompt_specific_ctx=True, pretrained=True, pos_embedding=False) Bases: :py:obj:`torch.nn.Module` QualiCLIP model implementation following the original paper. QualiCLIP+ represents the version that employs prompt learning, similar to CLIP-IQA+ (https://arxiv.org/abs/2207.12396). .. py:method:: forward(x)