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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
project:
  seed: 2026
  run_name: clip_b16_multilayer_residual_consistency_v5
data:
  repo_id: Shanmuk4622/ai-image-detection-dataset
  revision: 8f1f536676f96cbc58bffd520ed50d1e7b9e894a
  metadata_file: metadata/manifest.parquet
  source_config_file: metadata/config.json
  shard_cache_dir: data/cache/ai_image_detection_shards
  output_dir: data/processed/mixed_aigc_80k
  manifest_path: data/processed/mixed_aigc_80k/manifest.jsonl
  audit_path: data/processed/mixed_aigc_80k/audit.json
  state_path: data/processed/mixed_aigc_80k/selection_state.json
  nuisance_report_path: data/processed/mixed_aigc_80k/nuisance_report.json
  hf_auth: required
  generators:
  - sd15
  - sdxl
  - flux_schnell
  - kandinsky22
  - pixart_sigma
  - wuerstchen
  expected_parent_count: 10000
  expected_pipeline_version: '1.2'
  expected_image_size: 512
  download_workers: 2
  checkpoint_every_shards: 10
  network_max_retries: 5
  network_retry_base_seconds: 5.0
  max_download_gb: 28.0
  max_shard_cache_gb: 3.0
  max_image_pixels: 50000000
  exact_deduplication: true
  perceptual_deduplication: true
  perceptual_hash_size: 16
  official_leakage_manifest: data/evaluation/wildfake_official/manifest.jsonl
  official_leakage_root: data/evaluation/wildfake_official
  leakage_phash_distance: 8
  leakage_dhash_distance: 8
standardization:
  enabled: true
  application_probability: 0.75
  resize_weight: 0.3
  codec_weight: 0.3
  resize_codec_weight: 0.4
  resize_scale_min: 0.75
  resize_scale_max: 1.0
  jpeg_weight: 0.8
  webp_weight: 0.2
  quality_min: 85
  quality_max: 100
nuisance_audit:
  enabled: true
  random_state: 2026
  feature_size: 128
  max_iter: 150
  learning_rate: 0.08
  max_leaf_nodes: 15
  min_samples_leaf: 20
  permutation_repeats: 5
  max_train_samples: 12000
  max_evaluation_samples: 4000
  feature_workers: 4
mixed_data:
  enabled: true
  output_dir: data/processed/mixed_aigc_80k
  manifest_path: data/processed/mixed_aigc_80k/manifest.jsonl
  audit_path: data/processed/mixed_aigc_80k/audit.json
  state_path: data/processed/mixed_aigc_80k/selection_state.json
  dedup_report_path: data/processed/mixed_aigc_80k/dedup_report.json
  distribution_report_path: data/processed/mixed_aigc_80k/distribution_report.json
  cache_dir: data/cache/mixed_aigc_80k
  shanmuk_root: data/processed/ai_image_detection_20k
  community_root: data/processed/community_forensics_20k
  shanmuk_repo_id: Shanmuk4622/ai-image-detection-dataset
  shanmuk_revision: 8f1f536676f96cbc58bffd520ed50d1e7b9e894a
  community_repo_id: OwensLab/CommunityForensics-Small
  community_revision: 6c539a534c07917307c381f5af4053c6091b5278
  tiny_genimage_repo_id: TheKernel01/Tiny-GenImage
  tiny_genimage_revision: 89c4fe9efd0ebc7ce5c7641ef57d578ccd639c69
  wildfake_repo_id: hy2628982280/WildFake
  wildfake_revision: 18f53ff36ad9da60644039f0452b0e7b3907af6f
  wildfake_train_metadata_file: split_train_test/csv_file/total_split/train_metadata.csv
  wildfake_train_metadata_sha256: 26c6eacf6a34b7c61e7a1a3230c97624f58f857553cb525fe7f95dfbd5858be5
  target_total: 80000
  target_real: 40000
  target_fake: 40000
  reserve_multiplier: 1.25
  max_network_gb: 80.0
  storage_warning_min_gb: 25.0
  storage_warning_max_gb: 45.0
  download_workers: 4
  hash_workers: 4
  hash_checkpoint_every: 5000
  checkpoint_every: 100
  network_max_retries: 5
  network_retry_base_seconds: 2.0
  request_timeout_seconds: 60.0
  max_image_pixels: 50000000
  phash_size: 16
  phash_distance: 8
  dhash_distance: 8
  crop_phash_distance: 8
  source_quotas:
    shanmuk:
      train:
        '0': 4000
        '1': 4000
      val_id:
        '0': 1000
        '1': 1000
      val_dg:
        '0': 0
        '1': 0
    wildfake:
      train:
        '0': 9000
        '1': 9000
      val_id:
        '0': 0
        '1': 0
      val_dg:
        '0': 4000
        '1': 2000
    community_forensics:
      train:
        '0': 13000
        '1': 13000
      val_id:
        '0': 1000
        '1': 2000
      val_dg:
        '0': 0
        '1': 1000
    tiny_genimage:
      train:
        '0': 6000
        '1': 6000
      val_id:
        '0': 2000
        '1': 1000
      val_dg:
        '0': 0
        '1': 1000
  external_deny_manifests:
  - data/evaluation/wildfake_official/manifest.jsonl
  - data/evaluation/wildfake_broad_6k/manifest.jsonl
  - data/evaluation/sid_set_4k/manifest.jsonl
  wildfake_train_real_sources:
  - laion5b
  - imagenet
  - ffhq
  - celebahq
  wildfake_dg_real_sources:
  - afhq
  - church
  wildfake_dg_fake_architectures:
  - DDPM
  - GALIP
  - MAGE
  global_heldout_generator_aliases:
  - ddpm
  - galip
  - mage
  - wukong
  community_subset_weights:
    Systematic: 0.5
    Manual: 0.4
    Commercial: 0.1
  community_architecture_weights:
    LatDiff: 0.5
    GAN: 0.2
    PixDiff: 0.15
    other: 0.15
  community_systematic_model_cap: 8
  community_other_model_cap: 200
  tiny_expected_rows: 35000
  tiny_expected_license: cc-by-nc-sa-4.0
  tiny_generators:
  - ADM
  - BigGAN
  - GLIDE
  - Midjourney
  - SD14
  - SD15
  - VQDM
  - Wukong
  tiny_allowed_empty_generators:
  - SD14
views:
  input_size: 224
  global_crop_scale_min: 0.9
  global_crop_scale_max: 1.0
  local_scale_min: 0.5
  local_scale_max: 0.9
  padding_color: 127
  random_interpolation: true
augmentations:
  transformed_clean_probability: 0.25
  single_operation_probability: 0.5
  double_operation_probability: 0.25
  jpeg_quality_min: 30
  jpeg_quality_max: 95
  blur_sigma_min: 0.1
  blur_sigma_max: 2.0
  resize_scale_min: 0.25
  resize_scale_max: 1.0
  gaussian_noise_sigma_min: 0.0
  gaussian_noise_sigma_max: 0.1
  color_jitter_strength: 0.2
  center_crop_min_fraction: 0.7
  center_crop_max_fraction: 1.0
  double_jpeg_weight: 0.08
  webp_weight: 0.05
  enable_double_jpeg: true
  enable_webp: true
model:
  backbone_name: ViT-B-16-quickgelu
  pretrained: openai
  embedding_dim: 512
  intermediate_layers:
  - 3
  - 6
  - 9
  - 11
  intermediate_dim: 768
  head_dim: 256
  projection_dim: 128
  dropout: 0.1
  residual_statistics_enabled: true
  residual_statistics_dim: 24
  residual_hidden_dim: 64
loss:
  classification_weight: 1.0
  consistency_weight: 0.5
  consistency_rampup_epochs: 1
  contrastive_weight: 0.05
  contrastive_temperature: 0.1
training:
  epochs: 8
  batch_size: 64
  gradient_accumulation_steps: 1
  learning_rate: 0.0001
  weight_decay: 0.001
  warmup_fraction: 0.05
  num_workers: 12
  prefetch_factor: 1
  persistent_workers: false
  amp: true
  amp_dtype: fp16
  device: auto
  gradient_clip_norm: 1.0
  early_stopping_patience: 3
  threshold: 0.5
  resume_from: null
  pin_memory: true
output:
  root_dir: artifacts/runs
  save_last: true
  keep_best_only: false
feature_cache:
  root_dir: data/processed/feature_cache
  use_for_training: true
  train_variants: 2
  shard_size: 2048
  batch_size: 64
  num_workers: 12
  prefetch_factor: 1
  pin_memory: true
  dtype: float16
official_evaluation:
  repo_id: hy2628982280/WildFake
  revision: master
  output_dir: data/evaluation/wildfake_official
  manifest_path: data/evaluation/wildfake_official/manifest.jsonl
  audit_path: data/evaluation/wildfake_official/audit.json
  metadata_dir: data/cache/wildfake_official_metadata
  results_path: artifacts/evaluations/wildfake_official/results.json
  predictions_path: artifacts/evaluations/wildfake_official/predictions.jsonl
  dalle_metadata_file: label_csv_files/dalle3.csv
  coco_metadata_file: label_csv_files/real_coco.csv
  dalle_archive_file: Images/Diffusion_based/DALLE.zip
  coco_archive_file: Images/Real/coco.zip
  dalle_archive_sha256: 5e4ebc56daa06ebeec99711b9cc204571558d3e17366f2df992a8cfd4f251d4c
  coco_archive_sha256: 0b4dda0968e5f0d3cb60434c24204fcdac1cc0b40018093f15307edd545905b3
  expected_real_count: 4998
  expected_fake_count: 8843
  max_download_gb: 4.0
  checkpoint_every: 100
  request_timeout_seconds: 60.0
  network_max_retries: 5
  network_retry_backoff: 1.0
evaluation:
  checkpoint_path: artifacts/runs/clip_b16_multilayer_v3/best.pt
  batch_size: 32
  num_workers: 8
  prefetch_factor: 2
  save_predictions: true
  calibration_path: null
  external_feature_cache_enabled: true
  external_feature_cache_dir: data/processed/external_feature_cache
  external_feature_cache_dtype: float16
  fast_max_samples: 2000
  fast_scenarios:
  - clean
  - jpeg_30
  - blur_2.0
  - resize_0.25
  - noise_0.10
  - color_jitter_0.20
  - center_crop_0.80
  - combo_stress_crop_0.80_blur_1.0_resize_0.25_jpeg_30
  enable_composed_scenarios: true
  scenarios:
  - clean
  - jpeg_90
  - jpeg_70
  - jpeg_50
  - jpeg_30
  - blur_0.5
  - blur_1.0
  - blur_2.0
  - resize_0.5
  - resize_0.25
  - noise_0.02
  - noise_0.05
  - noise_0.10
  - color_jitter_0.20
  - center_crop_0.80
  composed_scenarios:
  - combo_social_resize_0.5_jpeg_70
  - combo_repost_jpeg_90_resize_0.5_jpeg_70
  - combo_crop_0.80_resize_0.5_jpeg_70
  - combo_blur_1.0_resize_0.5_jpeg_50
  - combo_edit_color_0.20_noise_0.02_jpeg_70
  - combo_stress_crop_0.80_blur_1.0_resize_0.25_jpeg_30
wildfake_evaluation:
  repo_id: hy2628982280/WildFake
  revision: master
  metadata_file: split_train_test/csv_file/total_split/test_metadata.csv
  metadata_sha256: 0cec85fcec02e6e262f5b9726560b0355ab1293a30d29f063bf10a3c9d1b16c3
  metadata_dir: data/cache/wildfake_broad_metadata
  integrity_cache_path: data/cache/wildfake_broad_metadata/archive_integrity.json
  output_dir: data/evaluation/wildfake_broad_6k
  manifest_path: data/evaluation/wildfake_broad_6k/manifest.jsonl
  audit_path: data/evaluation/wildfake_broad_6k/audit.json
  state_path: data/evaluation/wildfake_broad_6k/preparation_state.json
  results_path: artifacts/evaluations/wildfake_broad_6k/results.json
  predictions_path: artifacts/evaluations/wildfake_broad_6k/predictions.jsonl
  target_real: 3000
  target_fake: 3000
  fake_families:
  - GAN_based
  - Diffusion_based
  - Other_based
  fake_architectures:
  - BigGAN
  - DF-GAN
  - GALIP
  - GigaGAN
  - starGAN
  - styleGAN
  - ADM
  - DDIM
  - DDPM
  - Imagen
  - VQDM
  - MAE
  - MAGE
  - VQGAN
  - VQVAE
  real_sources:
  - afhq
  - celebahq
  - church
  - ffhq
  - imagenet
  - laion5b
  excluded_source_paths:
  - GAN_based/Advanced/GigaGAN/fake_images/18598.png
  detect_extreme_zip_compression: true
  extreme_zip_compression_ratio: 0.02
  download_workers: 4
  checkpoint_every: 100
  request_timeout_seconds: 60.0
  network_max_retries: 5
  network_retry_backoff: 1.0
  max_download_gb: 12.0
sid_evaluation:
  repo_id: saberzl/SID_Set
  revision: dc03ead57929879319ce30a82bfcfb8d317b10bd
  split: validation
  shard_prefix: data/validation-
  shard_cache_dir: data/cache/sid_set_validation_shards
  output_dir: data/evaluation/sid_set_4k
  manifest_path: data/evaluation/sid_set_4k/manifest.jsonl
  audit_path: data/evaluation/sid_set_4k/audit.json
  state_path: data/evaluation/sid_set_4k/preparation_state.json
  results_path: artifacts/evaluations/sid_set_4k/results.json
  predictions_path: artifacts/evaluations/sid_set_4k/predictions.jsonl
  hf_auth: auto
  target_real: 2000
  target_fake: 2000
  download_workers: 3
  checkpoint_every_shards: 1
  network_max_retries: 5
  network_retry_base_seconds: 5.0
  max_download_gb: 18.0
  max_shard_cache_gb: 2.0