pyiqa.archs.afine_arch ====================== .. py:module:: pyiqa.archs.afine_arch .. autoapi-nested-parse:: A-FINE Model github repo link: https://github.com/ChrisDud0257/AFINE Cite as: @inproceedings{chen2025toward, title={Toward Generalized Image Quality Assessment: Relaxing the Perfect Reference Quality Assumption}, author={Chen, Du and Wu, Tianhe and Ma, Kede and Zhang, Lei}, booktitle={Proceedings of the 2025 IEEE/CVF Computer Vision and Pattern Recognition Conference}, pages={12742--12752}, year={2025} } This file only support inferring A-FINE value. If you want to further train A-FINE, plase refer to https://github.com/ChrisDud0257/AFINE Module Contents --------------- .. py:data:: default_model_urls .. py:function:: scale_finalscore(score, yita1=100, yita2=0, yita3=-1.971, yita4=-2.3734) .. py:class:: AFINEQhead(chns=(3, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768), feature_out_channel=1, input_dim=768, hidden_dim=128, mean=(0.48145466, 0.4578275, 0.40821073), std=(0.26862954, 0.26130258, 0.27577711)) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x, h_list_x) .. py:class:: AFINEDhead(chns=(3, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768), mean=(0.48145466, 0.4578275, 0.40821073), std=(0.26862954, 0.26130258, 0.27577711)) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x, y, h_list_x, h_list_y) .. py:class:: AFINENLM_NR_Fit(yita1=2, yita2=-2, yita3=3.7833, yita4=7.5676) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x) .. py:class:: AFINENLM_FR_Fit_with_limit(yita1=2, yita2=-2, yita3=-24.1335, yita4=8.1093, yita3_upper=-21, yita3_lower=-27, yita4_upper=9, yita4_lower=7) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x) .. py:class:: AFINELearnLambda(k=5) Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(x_nr, ref_nr, xref_fr) .. py:class:: AFINE(model_type='afine_all_scale', clip_backbone='ViT-B/32', step=32, num_patch=15, pretrained=True, pretrained_model_path=None, url_key='afine') Bases: :py:obj:`torch.nn.Module` .. py:method:: forward(dis, ref=None)