ParrotG commited on
Commit
b7d4ee3
·
verified ·
1 Parent(s): 8ff01e4

Upload configs/default.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. configs/default.yaml +364 -0
configs/default.yaml ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ project:
2
+ seed: 2026
3
+ run_name: clip_b16_multilayer_v3
4
+
5
+ data:
6
+ repo_id: Shanmuk4622/ai-image-detection-dataset
7
+ revision: 8f1f536676f96cbc58bffd520ed50d1e7b9e894a
8
+ metadata_file: metadata/manifest.parquet
9
+ source_config_file: metadata/config.json
10
+ shard_cache_dir: data/cache/ai_image_detection_shards
11
+ output_dir: data/processed/mixed_aigc_80k
12
+ manifest_path: data/processed/mixed_aigc_80k/manifest.jsonl
13
+ audit_path: data/processed/mixed_aigc_80k/audit.json
14
+ state_path: data/processed/mixed_aigc_80k/selection_state.json
15
+ nuisance_report_path: data/processed/mixed_aigc_80k/nuisance_report.json
16
+ hf_auth: required
17
+ generators:
18
+ - sd15
19
+ - sdxl
20
+ - flux_schnell
21
+ - kandinsky22
22
+ - pixart_sigma
23
+ - wuerstchen
24
+ expected_parent_count: 10000
25
+ expected_pipeline_version: "1.2"
26
+ expected_image_size: 512
27
+ download_workers: 2
28
+ checkpoint_every_shards: 10
29
+ network_max_retries: 5
30
+ network_retry_base_seconds: 5.0
31
+ max_download_gb: 28.0
32
+ max_shard_cache_gb: 3.0
33
+ max_image_pixels: 50000000
34
+ exact_deduplication: true
35
+ perceptual_deduplication: true
36
+ perceptual_hash_size: 16
37
+ official_leakage_manifest: data/evaluation/wildfake_official/manifest.jsonl
38
+ official_leakage_root: data/evaluation/wildfake_official
39
+ leakage_phash_distance: 8
40
+ leakage_dhash_distance: 8
41
+
42
+ mixed_data:
43
+ enabled: true
44
+ output_dir: data/processed/mixed_aigc_80k
45
+ manifest_path: data/processed/mixed_aigc_80k/manifest.jsonl
46
+ audit_path: data/processed/mixed_aigc_80k/audit.json
47
+ state_path: data/processed/mixed_aigc_80k/selection_state.json
48
+ dedup_report_path: data/processed/mixed_aigc_80k/dedup_report.json
49
+ distribution_report_path: data/processed/mixed_aigc_80k/distribution_report.json
50
+ cache_dir: data/cache/mixed_aigc_80k
51
+ shanmuk_root: data/processed/ai_image_detection_20k
52
+ community_root: data/processed/community_forensics_20k
53
+ shanmuk_repo_id: Shanmuk4622/ai-image-detection-dataset
54
+ shanmuk_revision: 8f1f536676f96cbc58bffd520ed50d1e7b9e894a
55
+ community_repo_id: OwensLab/CommunityForensics-Small
56
+ community_revision: 6c539a534c07917307c381f5af4053c6091b5278
57
+ tiny_genimage_repo_id: TheKernel01/Tiny-GenImage
58
+ tiny_genimage_revision: 89c4fe9efd0ebc7ce5c7641ef57d578ccd639c69
59
+ wildfake_repo_id: hy2628982280/WildFake
60
+ wildfake_revision: 18f53ff36ad9da60644039f0452b0e7b3907af6f
61
+ wildfake_train_metadata_file: split_train_test/csv_file/total_split/train_metadata.csv
62
+ wildfake_train_metadata_sha256: 26c6eacf6a34b7c61e7a1a3230c97624f58f857553cb525fe7f95dfbd5858be5
63
+ target_total: 80000
64
+ target_real: 40000
65
+ target_fake: 40000
66
+ reserve_multiplier: 1.25
67
+ max_network_gb: 80.0
68
+ storage_warning_min_gb: 25.0
69
+ storage_warning_max_gb: 45.0
70
+ download_workers: 4
71
+ hash_workers: 4
72
+ hash_checkpoint_every: 5000
73
+ checkpoint_every: 100
74
+ network_max_retries: 5
75
+ network_retry_base_seconds: 2.0
76
+ request_timeout_seconds: 60.0
77
+ max_image_pixels: 50000000
78
+ phash_size: 16
79
+ phash_distance: 8
80
+ dhash_distance: 8
81
+ crop_phash_distance: 8
82
+ source_quotas:
83
+ shanmuk:
84
+ train: {"0": 4000, "1": 4000}
85
+ val_id: {"0": 1000, "1": 1000}
86
+ val_dg: {"0": 0, "1": 0}
87
+ wildfake:
88
+ train: {"0": 9000, "1": 9000}
89
+ val_id: {"0": 0, "1": 0}
90
+ val_dg: {"0": 4000, "1": 2000}
91
+ community_forensics:
92
+ train: {"0": 13000, "1": 13000}
93
+ val_id: {"0": 1000, "1": 2000}
94
+ val_dg: {"0": 0, "1": 1000}
95
+ tiny_genimage:
96
+ train: {"0": 6000, "1": 6000}
97
+ val_id: {"0": 2000, "1": 1000}
98
+ val_dg: {"0": 0, "1": 1000}
99
+ external_deny_manifests:
100
+ - data/evaluation/wildfake_official/manifest.jsonl
101
+ - data/evaluation/wildfake_broad_6k/manifest.jsonl
102
+ - data/evaluation/sid_set_4k/manifest.jsonl
103
+ wildfake_train_real_sources: [laion5b, imagenet, ffhq, celebahq]
104
+ wildfake_dg_real_sources: [afhq, church]
105
+ wildfake_dg_fake_architectures: [DDPM, GALIP, MAGE]
106
+ global_heldout_generator_aliases: [ddpm, galip, mage, wukong]
107
+ community_subset_weights: {Systematic: 0.50, Manual: 0.40, Commercial: 0.10}
108
+ community_architecture_weights: {LatDiff: 0.50, GAN: 0.20, PixDiff: 0.15, other: 0.15}
109
+ community_systematic_model_cap: 8
110
+ community_other_model_cap: 200
111
+ tiny_expected_rows: 35000
112
+ tiny_expected_license: cc-by-nc-sa-4.0
113
+ tiny_generators: [ADM, BigGAN, GLIDE, Midjourney, SD14, SD15, VQDM, Wukong]
114
+ tiny_allowed_empty_generators: [SD14]
115
+
116
+ standardization:
117
+ enabled: true
118
+ application_probability: 0.75
119
+ resize_weight: 0.30
120
+ codec_weight: 0.30
121
+ resize_codec_weight: 0.40
122
+ resize_scale_min: 0.75
123
+ resize_scale_max: 1.0
124
+ jpeg_weight: 0.80
125
+ webp_weight: 0.20
126
+ quality_min: 85
127
+ quality_max: 100
128
+
129
+ nuisance_audit:
130
+ enabled: true
131
+ random_state: 2026
132
+ feature_size: 128
133
+ max_iter: 150
134
+ learning_rate: 0.08
135
+ max_leaf_nodes: 15
136
+ min_samples_leaf: 20
137
+ permutation_repeats: 5
138
+ max_train_samples: 12000
139
+ max_evaluation_samples: 4000
140
+ feature_workers: 4
141
+
142
+ views:
143
+ input_size: 224
144
+ global_crop_scale_min: 0.90
145
+ global_crop_scale_max: 1.0
146
+ local_scale_min: 0.50
147
+ local_scale_max: 0.90
148
+ padding_color: 127
149
+ random_interpolation: true
150
+
151
+ augmentations:
152
+ transformed_clean_probability: 0.25
153
+ single_operation_probability: 0.50
154
+ double_operation_probability: 0.25
155
+ jpeg_quality_min: 30
156
+ jpeg_quality_max: 95
157
+ blur_sigma_min: 0.1
158
+ blur_sigma_max: 2.0
159
+ resize_scale_min: 0.25
160
+ resize_scale_max: 1.0
161
+ gaussian_noise_sigma_min: 0.0
162
+ gaussian_noise_sigma_max: 0.10
163
+ color_jitter_strength: 0.20
164
+ center_crop_min_fraction: 0.70
165
+ center_crop_max_fraction: 1.0
166
+ double_jpeg_weight: 0.08
167
+ webp_weight: 0.05
168
+ enable_double_jpeg: true
169
+ enable_webp: true
170
+
171
+ model:
172
+ backbone_name: ViT-B-16-quickgelu
173
+ pretrained: openai
174
+ embedding_dim: 512
175
+ intermediate_layers: [3, 6, 9, 11]
176
+ intermediate_dim: 768
177
+ head_dim: 256
178
+ projection_dim: 128
179
+ dropout: 0.10
180
+ residual_statistics_enabled: false
181
+ residual_statistics_dim: 24
182
+ residual_hidden_dim: 64
183
+
184
+ loss:
185
+ classification_weight: 1.0
186
+ consistency_weight: 0.5
187
+ consistency_rampup_epochs: 1
188
+ contrastive_weight: 0.05
189
+ contrastive_temperature: 0.10
190
+
191
+ training:
192
+ epochs: 8
193
+ batch_size: 64
194
+ gradient_accumulation_steps: 1
195
+ learning_rate: 0.0001
196
+ weight_decay: 0.001
197
+ warmup_fraction: 0.05
198
+ num_workers: 12
199
+ prefetch_factor: 1
200
+ persistent_workers: false
201
+ amp: true
202
+ amp_dtype: fp16
203
+ device: auto
204
+ gradient_clip_norm: 1.0
205
+ early_stopping_patience: 3
206
+ threshold: 0.5
207
+ resume_from: null
208
+ pin_memory: true
209
+
210
+ output:
211
+ root_dir: artifacts/runs
212
+ save_last: true
213
+ keep_best_only: false
214
+
215
+ feature_cache:
216
+ root_dir: data/processed/feature_cache
217
+ use_for_training: false
218
+ train_variants: 2
219
+ shard_size: 2048
220
+ batch_size: 64
221
+ num_workers: 12
222
+ prefetch_factor: 1
223
+ pin_memory: true
224
+ dtype: float16
225
+
226
+ official_evaluation:
227
+ repo_id: hy2628982280/WildFake
228
+ revision: master
229
+ output_dir: data/evaluation/wildfake_official
230
+ manifest_path: data/evaluation/wildfake_official/manifest.jsonl
231
+ audit_path: data/evaluation/wildfake_official/audit.json
232
+ metadata_dir: data/cache/wildfake_official_metadata
233
+ results_path: artifacts/evaluations/wildfake_official/results.json
234
+ predictions_path: artifacts/evaluations/wildfake_official/predictions.jsonl
235
+ dalle_metadata_file: label_csv_files/dalle3.csv
236
+ coco_metadata_file: label_csv_files/real_coco.csv
237
+ dalle_archive_file: Images/Diffusion_based/DALLE.zip
238
+ coco_archive_file: Images/Real/coco.zip
239
+ dalle_archive_sha256: 5e4ebc56daa06ebeec99711b9cc204571558d3e17366f2df992a8cfd4f251d4c
240
+ coco_archive_sha256: 0b4dda0968e5f0d3cb60434c24204fcdac1cc0b40018093f15307edd545905b3
241
+ expected_real_count: 4998
242
+ expected_fake_count: 8843
243
+ max_download_gb: 4.0
244
+ checkpoint_every: 100
245
+ request_timeout_seconds: 60.0
246
+ network_max_retries: 5
247
+ network_retry_backoff: 1.0
248
+ evaluation:
249
+ checkpoint_path: artifacts/models/robustfake/best.pt
250
+ batch_size: 32
251
+ num_workers: 8
252
+ prefetch_factor: 2
253
+ save_predictions: true
254
+ calibration_path: null
255
+ calibration_threshold_strategy: constrained_minimax
256
+ calibration_max_clean_ba_drop: 0.005
257
+ hf_model_repo_id: Gin123/RobustFake
258
+ hf_model_revision: main
259
+ hf_checkpoint_filename: best.pt
260
+ hf_calibration_filename: calibration.json
261
+ external_feature_cache_enabled: true
262
+ external_feature_cache_dir: data/processed/external_feature_cache
263
+ external_feature_cache_dtype: float16
264
+ fast_max_samples: 2000
265
+ fast_scenarios:
266
+ - clean
267
+ - jpeg_30
268
+ - blur_2.0
269
+ - resize_0.25
270
+ - noise_0.10
271
+ - color_jitter_0.20
272
+ - center_crop_0.80
273
+ - combo_stress_crop_0.80_blur_1.0_resize_0.25_jpeg_30
274
+ enable_composed_scenarios: true
275
+ scenarios:
276
+ - clean
277
+ - jpeg_90
278
+ - jpeg_70
279
+ - jpeg_50
280
+ - jpeg_30
281
+ - blur_0.5
282
+ - blur_1.0
283
+ - blur_2.0
284
+ - resize_0.5
285
+ - resize_0.25
286
+ - noise_0.02
287
+ - noise_0.05
288
+ - noise_0.10
289
+ - color_jitter_0.20
290
+ - center_crop_0.80
291
+ composed_scenarios:
292
+ - combo_social_resize_0.5_jpeg_70
293
+ - combo_repost_jpeg_90_resize_0.5_jpeg_70
294
+ - combo_crop_0.80_resize_0.5_jpeg_70
295
+ - combo_blur_1.0_resize_0.5_jpeg_50
296
+ - combo_edit_color_0.20_noise_0.02_jpeg_70
297
+ - combo_stress_crop_0.80_blur_1.0_resize_0.25_jpeg_30
298
+
299
+ wildfake_evaluation:
300
+ repo_id: hy2628982280/WildFake
301
+ revision: master
302
+ metadata_file: split_train_test/csv_file/total_split/test_metadata.csv
303
+ metadata_sha256: 0cec85fcec02e6e262f5b9726560b0355ab1293a30d29f063bf10a3c9d1b16c3
304
+ metadata_dir: data/cache/wildfake_broad_metadata
305
+ integrity_cache_path: data/cache/wildfake_broad_metadata/archive_integrity.json
306
+ output_dir: data/evaluation/wildfake_broad_6k
307
+ manifest_path: data/evaluation/wildfake_broad_6k/manifest.jsonl
308
+ audit_path: data/evaluation/wildfake_broad_6k/audit.json
309
+ state_path: data/evaluation/wildfake_broad_6k/preparation_state.json
310
+ results_path: artifacts/evaluations/wildfake_broad_6k/results.json
311
+ predictions_path: artifacts/evaluations/wildfake_broad_6k/predictions.jsonl
312
+ target_real: 3000
313
+ target_fake: 3000
314
+ fake_families: [GAN_based, Diffusion_based, Other_based]
315
+ fake_architectures:
316
+ - BigGAN
317
+ - DF-GAN
318
+ - GALIP
319
+ - GigaGAN
320
+ - starGAN
321
+ - styleGAN
322
+ - ADM
323
+ - DDIM
324
+ - DDPM
325
+ - Imagen
326
+ - VQDM
327
+ - MAE
328
+ - MAGE
329
+ - VQGAN
330
+ - VQVAE
331
+ real_sources: [afhq, celebahq, church, ffhq, imagenet, laion5b]
332
+ excluded_source_paths:
333
+ # This upstream ZIP member contains zero-filled bytes rather than a PNG.
334
+ - GAN_based/Advanced/GigaGAN/fake_images/18598.png
335
+ detect_extreme_zip_compression: true
336
+ extreme_zip_compression_ratio: 0.02
337
+ download_workers: 4
338
+ checkpoint_every: 100
339
+ request_timeout_seconds: 60.0
340
+ network_max_retries: 5
341
+ network_retry_backoff: 1.0
342
+ max_download_gb: 12.0
343
+
344
+ sid_evaluation:
345
+ repo_id: saberzl/SID_Set
346
+ revision: dc03ead57929879319ce30a82bfcfb8d317b10bd
347
+ split: validation
348
+ shard_prefix: data/validation-
349
+ shard_cache_dir: data/cache/sid_set_validation_shards
350
+ output_dir: data/evaluation/sid_set_4k
351
+ manifest_path: data/evaluation/sid_set_4k/manifest.jsonl
352
+ audit_path: data/evaluation/sid_set_4k/audit.json
353
+ state_path: data/evaluation/sid_set_4k/preparation_state.json
354
+ results_path: artifacts/evaluations/sid_set_4k/results.json
355
+ predictions_path: artifacts/evaluations/sid_set_4k/predictions.jsonl
356
+ hf_auth: auto
357
+ target_real: 2000
358
+ target_fake: 2000
359
+ download_workers: 3
360
+ checkpoint_every_shards: 1
361
+ network_max_retries: 5
362
+ network_retry_base_seconds: 5.0
363
+ max_download_gb: 18.0
364
+ max_shard_cache_gb: 2.0