diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..da521dc --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +thesis-code diff --git a/requirements.txt b/requirements.txt index 3f5dd67..e9c4b7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,126 +1,18 @@ -acme==1.21.0 -apturl==0.5.2 -asgiref==3.8.1 -astroid==2.9.3 -bcrypt==3.2.0 -blinker==1.4 -Brlapi==0.8.3 -certbot==1.21.0 -certbot-nginx==1.21.0 -certifi==2020.6.20 -chardet==4.0.0 -click==8.0.3 -colorama==0.4.4 -command-not-found==0.3 -ConfigArgParse==1.5.3 -configobj==5.0.6 -cryptography==3.4.8 -cupshelpers==1.0 -dbus-python==1.2.18 -defer==1.0.6 -distlib==0.3.4 -distro==1.7.0 -distro-info==1.1+ubuntu0.2 -Django==3.2.12 -duplicity==0.8.21 -fasteners==0.14.1 -filelock==3.6.0 -future==0.18.2 -gpg==1.16.0 -gunicorn==20.1.0 -httplib2==0.20.2 -idna==3.3 -importlib-metadata==4.6.4 -isort==5.6.4 -jeepney==0.7.1 -josepy==1.10.0 -keyring==23.5.0 -language-selector==0.1 -launchpadlib==1.10.16 -lazr.restfulclient==0.14.4 -lazr.uri==1.0.6 -lazy-object-proxy==0.0.0 -lockfile==0.12.2 -logilab-common==1.8.2 -louis==3.20.0 -macaroonbakery==1.3.1 -Mako==1.1.3 -MarkupSafe==2.0.1 -mccabe==0.6.1 -mock==4.0.3 -monotonic==1.6 -more-itertools==8.10.0 -mypy-extensions==0.4.3 -netifaces==0.11.0 -numpy==2.2.3 -oauthlib==3.2.0 -olefile==0.46 -opencv-python==4.11.0.86 -packaging==21.3 -paramiko==2.9.3 -parsedatetime==2.6 -pbr==5.8.0 -pexpect==4.8.0 -Pillow==9.0.1 -platformdirs==2.5.1 -protobuf==3.12.4 -psycopg2-binary==2.9.10 -ptyprocess==0.7.0 -pycairo==1.20.1 -pycryptodomex==3.11.0 -pycups==2.0.1 -Pygments==2.11.2 -PyGObject==3.42.1 -PyICU==2.8.1 -PyJWT==2.3.0 -pylint==2.12.2 -pymacaroons==0.13.0 -PyNaCl==1.5.0 -pyOpenSSL==21.0.0 -pyparsing==2.4.7 -PyQt5==5.15.6 -PyQt5-sip==12.9.1 -PyQtWebEngine==5.15.5 -pyRFC3339==1.1 -PySocks==1.7.1 -python-apt==2.4.0+ubuntu4 -python-dateutil==2.8.1 -python-debian==0.1.43+ubuntu1.1 -pytz==2022.1 -pyxattr==0.7.2 -pyxdg==0.27 -PyYAML==5.4.1 -QtPy==2.0.0 -reportlab==3.6.8 -requests==2.25.1 -requests-toolbelt==0.9.1 -screen-resolution-extra==0.0.0 -SecretStorage==3.3.1 -six==1.16.0 -sqlparse==0.5.1 -stevedore==3.5.0 -systemd-python==234 -toml==0.10.2 -torbrowser-launcher==0.3.3 -typing_extensions==4.12.2 -ubuntu-drivers-common==0.0.0 -ubuntu-pro-client==8001 -ufw==0.36.1 -unattended-upgrades==0.1 -urllib3==1.26.5 -usb-creator==0.3.7 -vboxapi==1.0 -virtualenv==20.13.0+ds -virtualenv-clone==0.3.0 -virtualenvwrapper==4.8.4 -wadllib==1.3.6 -wrapt==1.13.3 -xdg==5 -xkit==0.0.0 -youtube-dl==2021.12.17 -yt-dlp==2024.11.4 -zipp==1.0.0 -zope.component==4.3.0 -zope.event==4.4 -zope.hookable==5.1.0 -zope.interface==5.4.0 +contourpy==1.3.2 +cycler==0.12.1 +fonttools==4.58.5 +kiwisolver==1.4.8 +matplotlib==3.10.3 +numpy==2.2.6 +packaging==25.0 +pandas==2.3.1 +patsy==1.0.1 +pillow==11.3.0 +pyparsing==3.2.3 +python-dateutil==2.9.0.post0 +pytz==2025.2 +scipy==1.15.3 +seaborn==0.13.2 +six==1.17.0 +statsmodels==0.14.5 +tzdata==2025.2 diff --git a/results/iqa_correlation/train/correlation_results.csv b/results/iqa_correlation/train/correlation_results.csv index f92feec..ef813fa 100644 --- a/results/iqa_correlation/train/correlation_results.csv +++ b/results/iqa_correlation/train/correlation_results.csv @@ -3,22 +3,34 @@ MS-SSIM,0.7711599803763707,0.8488749153819912,2542.203930904345,47.2740933452696 PSNR,0.8009475497861607,0.813210173570365,420.7240947981431,16.570601980759005 PSNR-B,0.7995571865391823,0.8126316156100803,434.83170009314574,16.842773740427678 SNR,0.7931473411537266,0.8047370605147515,493.95551137230103,18.08411907891138 +SAM,0.7770389912891644,0.8162641617949914,2632.833828544673,48.214550897907394 +RMSE,0.7718884463351641,0.813210173570365,2633.315640450051,48.22026456673957 +ERGAS,0.7504733199011894,0.7947467770734464,2573.298974386009,47.5141107352928 VIF,0.7722874762051675,0.7670696180713703,2584.9552675764007,47.75317338149651 +MSE,0.7074178445047129,0.813210173570365,2635.0900586721527,48.24091007077083 UQI,0.6865837869518063,0.8084840679992403,2540.109778134789,47.24779457376503 VIFp,0.6868426441470574,0.8055987204149543,2540.597835426247,47.25440521158911 FIQ,0.7352539281838113,0.7326505545642523,2558.269692610438,47.45306230899651 R-SSIM,0.7201415238613168,0.7465715194090047,2543.39455012764,47.28954885982985 CW-SSIM,0.710650610583131,0.745458014880862,2540.9046223258797,47.25716562017706 W-SSIM,0.7106505795115421,0.745458014880862,2542.163008859867,47.272902845848364 +LPIPS-vgg,0.7171544936651275,0.7197005013672841,2617.175982848352,48.04282490211225 +MAE,0.6853471881300869,0.7443915451650297,2633.89410247641,48.22712092235577 L-SSIM,0.6869413603651108,0.7135185492796828,2541.679829967222,47.26711514195948 SSIM,0.6798668142340023,0.7008230199088239,2541.7293381070745,47.267739617075215 +DSSIM,0.6798668139230113,0.7008230199088239,2634.062962054872,48.228272783121746 MS-FSIM,0.6730099342782921,0.6906926739409875,2540.8130505171507,47.25603142478355 FSIMc,0.6450953007694107,0.7052182445060065,2541.892399728251,47.26977669448262 SPIQ,0.6192722470922214,0.6453948751106658,2542.7145217089897,47.280296732190955 -FSIM,0.6192722470922214,0.6453948751106658,2542.7145217089897,47.280296732190955 G-SSIM,0.6192722470922214,0.6453948751106658,2542.7145217089897,47.280296732190955 +FSIM,0.6192722470922214,0.6453948751106658,2542.7145217089897,47.280296732190955 +LPIPS-alex,0.5866177425258018,0.6345505228306384,2632.536823695388,48.210805123861554 +DISTS,0.6126323512072798,0.6074854117659668,2624.7945495112776,48.12608814055439 +LPIPS-squeeze,0.5995293753936823,0.5926678086004643,2630.110800445677,48.18301891696156 ESIM,0.5574586601299032,0.5313854123087062,2539.8971619407935,47.24432323260763 WaDIQaM,0.5338656366789427,0.48408928398131235,2561.329325876068,47.474822634436336 +D-lambda,0.44680796254880584,0.51519417935267,2635.0162825054786,48.240048251566364 +GMSD,0.48395322360984483,0.45809570334012667,2634.6578141635196,48.23611135355554 SCC,0.41642918147299834,0.5179808431377102,2578.2723642190886,47.6676448235567 PSM,0.42583105943221133,0.3636487583107239,2953.4792933746644,51.45463918429053 VSNR,0.3797043014490443,0.3832275943122409,1255.1537764973389,30.954847076693138 @@ -27,15 +39,3 @@ C-SSIM,0.37056681618354326,0.3277108871301441,2542.3177472352236,47.273133897607 IW-SSIM,0.22167618876838013,0.2826622537295927,2583.0431675941995,47.70066607316317 VIFc,0.20692689932674108,0.18374893650717106,2546.8674631677154,47.32164731596409 SRSIM,0.044071832529778365,0.05525786687004758,2603.152914549782,47.91112392050115 -GMSD,-0.48395322360984483,-0.45809570334012667,2634.6578141635196,48.23611135355554 -D-lambda,-0.44680796254880584,-0.51519417935267,2635.0162825054786,48.240048251566364 -LPIPS-squeeze,-0.5995293753936823,-0.5926678086004643,2630.110800445677,48.18301891696156 -DISTS,-0.6126323512072798,-0.6074854117659668,2624.7945495112776,48.12608814055439 -LPIPS-alex,-0.5866177425258018,-0.6345505228306384,2632.536823695388,48.210805123861554 -DSSIM,-0.6798668139230113,-0.7008230199088239,2634.062962054872,48.228272783121746 -MAE,-0.6853471881300869,-0.7443915451650297,2633.89410247641,48.22712092235577 -LPIPS-vgg,-0.7171544936651275,-0.7197005013672841,2617.175982848352,48.04282490211225 -MSE,-0.7074178445047129,-0.813210173570365,2635.0900586721527,48.24091007077083 -ERGAS,-0.7504733199011894,-0.7947467770734464,2573.298974386009,47.5141107352928 -RMSE,-0.7718884463351641,-0.813210173570365,2633.315640450051,48.22026456673957 -SAM,-0.7770389912891644,-0.8162641617949914,2632.833828544673,48.214550897907394 diff --git a/results/iqa_correlation/train/scatter_ranked8x5.pdf b/results/iqa_correlation/train/scatter_ranked8x5.pdf new file mode 100644 index 0000000..2cb0ab6 Binary files /dev/null and b/results/iqa_correlation/train/scatter_ranked8x5.pdf differ diff --git a/results/iqa_correlation/train/scatter_ranked8x5.png b/results/iqa_correlation/train/scatter_ranked8x5.png new file mode 100644 index 0000000..7d0406d Binary files /dev/null and b/results/iqa_correlation/train/scatter_ranked8x5.png differ diff --git a/scripts/full_ref_analysis.py b/scripts/full_ref_analysis.py index 546f25a..28761b3 100644 --- a/scripts/full_ref_analysis.py +++ b/scripts/full_ref_analysis.py @@ -36,8 +36,8 @@ def compute_iqa_statistics(df: pd.DataFrame) -> pd.DataFrame: for metric in metrics.columns: print(f"- {metric}") values = df[metric].values - plcc, _ = pearsonr(values, mos) - srcc, _ = spearmanr(values, mos) + plcc, _ = np.abs(pearsonr(values, mos)) + srcc, _ = np.abs(spearmanr(values, mos)) mse = np.mean((values - mos) ** 2) mae = np.mean(np.abs(values - mos)) avg = (plcc + srcc) / 2 @@ -50,7 +50,7 @@ def compute_iqa_statistics(df: pd.DataFrame) -> pd.DataFrame: def plot_iqa_scatter(df: pd.DataFrame, metrics_df: pd.DataFrame, output_dir: str, file_name: str): print("plotting scatter plots ordered by PLCC+SRCC average") ranked_metrics = metrics_df["Metric"].tolist() - cols = 5 + cols = 4 rows = -(-len(ranked_metrics) // cols) fig, axes = plt.subplots(rows, cols, figsize=(16, rows * 3)) @@ -74,8 +74,8 @@ def plot_iqa_scatter(df: pd.DataFrame, metrics_df: pd.DataFrame, output_dir: str os.makedirs(output_dir, exist_ok=True) plt.tight_layout() - plt.savefig(os.path.join(output_dir, f"{file_name}.png"), dpi=300) - plt.savefig(os.path.join(output_dir, f"{file_name}.pdf"), dpi=300) + plt.savefig(os.path.join(output_dir, f"{file_name}8x5.png"), dpi=300, bbox_inches='tight', pad_inches=0) + plt.savefig(os.path.join(output_dir, f"{file_name}8x5.pdf"), dpi=300) plt.close() print(f"- scatter plots saved to: {output_dir}")