File size: 5,400 Bytes
b087e88
 
 
 
54be5f9
b087e88
54be5f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b087e88
 
 
 
 
 
 
 
54be5f9
b087e88
54be5f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b087e88
 
 
 
 
 
 
 
54be5f9
b087e88
54be5f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b087e88
 
 
 
 
 
 
 
 
 
 
 
 
54be5f9
b087e88
54be5f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b087e88
 
 
 
 
 
 
 
 
 
 
54be5f9
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
ABS_DATASET_DOMAIN = "https://dl.fbaipublicfiles.com"
ABS_DATASET_PATH = f"{ABS_DATASET_DOMAIN}/omnisealbench/"


def get_dataset_config(dataset_name):
    if dataset_name == "voxpopuli_1k/audio":
        return {
            "first_cols": [
                "snr",
                "sisnr",
                "stoi",
                "pesq",
            ],
            "attack_scores": [
                "bit_acc",
                "log10_p_value",
                "TPR",
                "FPR",
            ],
            "categories": {
                "speed": "Time",
                "updownresample": "Time",
                "echo": "Time",
                "random_noise": "Amplitude",
                "lowpass_filter": "Amplitude",
                "highpass_filter": "Amplitude",
                "bandpass_filter": "Amplitude",
                "smooth": "Amplitude",
                "boost_audio": "Amplitude",
                "duck_audio": "Amplitude",
                "shush": "Amplitude",
                "pink_noise": "Amplitude",
                "aac_compression": "Compression",
                "mp3_compression": "Compression",
            },
            "attacks_with_variations": [
                "random_noise",
                "lowpass_filter",
                "highpass_filter",
                "boost_audio",
                "duck_audio",
                "shush",
            ],
        }
    elif dataset_name == "ravdess_1k/audio":
        return {
            "first_cols": ["snr", "sisnr", "stoi", "pesq"],
            "attack_scores": ["bit_acc", "log10_p_value", "TPR", "FPR"],
            "categories": {
                "speed": "Time",
                "updownresample": "Time",
                "echo": "Time",
                "random_noise": "Amplitude",
                "lowpass_filter": "Amplitude",
                "highpass_filter": "Amplitude",
                "bandpass_filter": "Amplitude",
                "smooth": "Amplitude",
                "boost_audio": "Amplitude",
                "duck_audio": "Amplitude",
                "shush": "Amplitude",
                "pink_noise": "Amplitude",
                "aac_compression": "Compression",
                "mp3_compression": "Compression",
            },
            "attacks_with_variations": [
                "random_noise",
                "lowpass_filter",
                "highpass_filter",
                "boost_audio",
                "duck_audio",
                "shush",
            ],
        }
    elif dataset_name == "val2014_1k/image":
        return {
            "first_cols": ["psnr", "ssim", "lpips", "decoder_time"],
            "attack_scores": ["bit_acc", "log10_p_value", "TPR", "FPR"],
            "categories": {
                "proportion": "Geometric",
                "collage": "Inpainting",
                "center_crop": "Geometric",
                "rotate": "Geometric",
                "jpeg": "Compression",
                "brightness": "Visual",
                "contrast": "Visual",
                "saturation": "Visual",
                "sharpness": "Visual",
                "resize": "Geometric",
                "overlay_text": "Inpainting",
                "hflip": "Geometric",
                "perspective": "Geometric",
                "median_filter": "Visual",
                "hue": "Visual",
                "gaussian_blur": "Visual",
                "comb": "Mixed",
                "avg": "Averages",
                "none": "Baseline",
            },
            "attacks_with_variations": [
                "center_crop",
                "jpeg",
                "brightness",
                "contrast",
                "saturation",
                "sharpness",
                "resize",
                "perspective",
                "median_filter",
                "hue",
                "gaussian_blur",
            ],
        }
    elif dataset_name == "sav_val_full/video":
        return {
            "first_cols": ["psnr", "ssim", "msssim", "lpips", "vmaf", "decoder_time"],
            "attack_scores": ["bit_acc", "log10_p_value", "TPR", "FPR"],
            "categories": {
                "HorizontalFlip": "Geometric",
                "Rotate": "Geometric",
                "Resize": "Geometric",
                "Crop": "Geometric",
                "Perspective": "Geometric",
                "Brightness": "Visual",
                "Contrast": "Visual",
                "Saturation": "Visual",
                "Grayscale": "Visual",
                "Hue": "Visual",
                "JPEG": "Compression",
                "GaussianBlur": "Visual",
                "MedianFilter": "Visual",
                "H264": "Compression",
                "H264rgb": "Compression",
                "H265": "Compression",
                "VP9": "Compression",
                "H264_Crop_Brightness0": "Mixed",
                "H264_Crop_Brightness1": "Mixed",
                "H264_Crop_Brightness2": "Mixed",
                "H264_Crop_Brightness3": "Mixed",
            },
            "attacks_with_variations": [
                "Rotate",
                "Resize",
                "Crop",
                "Brightness",
                "Contrast",
                "Saturation",
                "H264",
                "H264rgb",
                "H265",
            ],
        }
    else:
        raise ValueError(f"Unknown dataset: {dataset_name}")