Files
iqa-study/scripts/fr_fusion/utils.py
T
2025-04-12 03:19:13 +01:00

21 lines
580 B
Python

'''
Filename: utils.py
Path: /home/netoa/Desktop/ISR/scripts
Created Date: Monday March 24th 2025
Author: Andre Neto
-----
Last Modified: Tue Mar 25 2025
Modified By: Andre Neto
-----
Copyright (c) 2025 Institute of Systems and Robotics
'''
import os
import pandas as pd
def save_fused_scores(predictions, filenames, output_path):
"""Save fused quality scores with associated filenames to CSV."""
os.makedirs(os.path.dirname(output_path), exist_ok=True)
df = pd.DataFrame({"file_name": filenames, "fused_score": predictions})
df.to_csv(output_path, index=False)