{"id":51013053,"url":"https://github.com/addytrunks/ivp_ntire_2026","last_synced_at":"2026-06-21T06:01:51.268Z","repository":{"id":350823284,"uuid":"1208399835","full_name":"addytrunks/IVP_NTIRE_2026","owner":"addytrunks","description":"Robust AI-Generated image Detection in the Wild","archived":false,"fork":false,"pushed_at":"2026-04-12T08:28:57.000Z","size":18578,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T10:19:07.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/addytrunks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-12T08:15:11.000Z","updated_at":"2026-04-12T08:29:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/addytrunks/IVP_NTIRE_2026","commit_stats":null,"previous_names":["addytrunks/ivp_ntire_2026"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/addytrunks/IVP_NTIRE_2026","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addytrunks%2FIVP_NTIRE_2026","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addytrunks%2FIVP_NTIRE_2026/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addytrunks%2FIVP_NTIRE_2026/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addytrunks%2FIVP_NTIRE_2026/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/addytrunks","download_url":"https://codeload.github.com/addytrunks/IVP_NTIRE_2026/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addytrunks%2FIVP_NTIRE_2026/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34596047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-21T06:01:47.287Z","updated_at":"2026-06-21T06:01:51.260Z","avatar_url":"https://github.com/addytrunks.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robust AI-Generated Image Detection in the Wild\n### NTIRE 2026 Challenge — Team *Three Guys*\n\n\u003e **75th place** in the final testing phase (94 active participants)  \n\u003e **100th place** in the validation phase (193 participants)\n\n---\n\n## Overview\n\nThis repository contains our submission for the [NTIRE 2026: Robust AI-Generated Image Detection in the Wild](https://cvlai.net/ntire/2026/) challenge. The task is to distinguish AI-generated images from real photographs under heavy \"in-the-wild\" degradations such as JPEG compression, blur, noise, and resolution downscaling.\n\nOur approach fuses **spatial RGB features** with **frequency-domain (FFT) features** through a modified **EfficientNet-B5** backbone that accepts a 4-channel input tensor `(3×RGB + 1×FFT)`.\n\n---\n\n## Method\n\n### Architecture\n\n- **Backbone:** EfficientNet-B5 with a modified 4-channel input stem\n- **Frequency Branch:** On-the-fly GPU-accelerated 2D FFT — grayscale luminosity map → FFT shift → log-magnitude spectrum → per-image min-max normalization → single additional channel\n- **Stem Initialization:** First 3 channels copied from ImageNet pretrained weights; 4th (FFT) channel initialized as the mean of the RGB weights, preserving Squeeze-and-Excitation attention\n\n```\nInput Image (456×456×3)\n       │\n       ├──── RGB Branch (3ch) ──────────────────────┐\n       │                                             │\n       └──── FFT Branch: log|FFTshift(G)| (1ch) ────┤\n                                                     ▼\n                                          4-Channel Tensor (456×456×4)\n                                                     │\n                                          Modified EfficientNet-B5 Stem\n                                                     │\n                                          SE Blocks (spatial + freq attention)\n                                                     │\n                                          Binary Classification Head\n                                                     │\n                                          P(AI-Generated)\n```\n\n### Augmentation Strategy\n\nA stochastic distortion pipeline applies **1–3 random transforms per image at 60% probability**, with severity sampled from a Gaussian centered at mild levels. The 7 distortion groups are:\n\n| Group | Transforms |\n|---|---|\n| Blur | Gaussian, Lens |\n| Noise | White, Impulse |\n| Compression | JPEG (quality 4–43) |\n| Color | Jitter, Saturation |\n| Brightness | Gamma, Exposure |\n| Spatial | Jitter, Crop |\n| Tonal | Quantization |\n\n---\n\n## Results\n\n### Ablation Study (Validation Set)\n\n| Model Variant | Clean AUC | Robust AUC |\n|---|---|---|\n| EfficientNet-B0 | 0.9290 | 0.8402 |\n| EfficientNet-B4 | 0.9410 | 0.9212 |\n| Swin Transformer | 0.9709 | 0.8965 |\n| EffNet-B5 (PID + FFT + Contrastive Loss) | 0.9506 | 0.8701 |\n| **EffNet-B5 (RGB + FFT) — Final** | **0.9768** | **0.9341** |\n\n### Leaderboard\n\n| Phase | Clean AUC | Robust AUC | Clean Hard AUC | Robust Hard AUC | Rank |\n|---|---|---|---|---|---|\n| Validation | 0.9768 | 0.9341 | 0.9220 | 0.8324 | 100 / 193 |\n| Testing | 0.8084 | 0.7099 | — | — | 75 / 94 |\n\n---\n\n## Training Configuration\n\n| Parameter | Value |\n|---|---|\n| Backbone | EfficientNet-B5 (4-channel) |\n| Input Resolution | 456 × 456 |\n| Batch Size | 4 (× 8 gradient accumulation = 32 effective) |\n| Epochs | 4 |\n| Optimizer | AdamW |\n| Learning Rate | 1×10⁻⁴ |\n| Weight Decay | 1×10⁻² |\n| Scheduler | OneCycleLR |\n| Loss | BCEWithLogitsLoss |\n| Distortion Probability | 0.6 |\n| Hardware | Tesla P100 (16 GB VRAM) |\n| Precision | AMP (mixed precision) |\n\n---\n\n## Setup\n\n```bash\ngit clone https://github.com/addytrunks/IVP_NTIRE_2026.git\ncd IVP_NTIRE_2026\npip install -r requirements.txt\n```\n\n### Training\n\n```bash\npython train.py --data_dir /path/to/dataset --epochs 4 --lr 1e-4\n```\n\n### Inference\n\n```bash\npython inference.py --checkpoint /path/to/best_checkpoint.pth --input_dir /path/to/images --output submission.csv\n```\n\n---\n\n## Dataset\n\nThe NTIRE 2026 dataset contains ~277K training images generated by 20 different models. Access requires registration through the official challenge page.\n\n| Split | Images | Real:Fake | Distortions |\n|---|---|---|---|\n| Train | ~277K | ~1:1.77 | 12 |\n| Validation | 10K | 1:1 | 19 |\n| Validation Hard | 2.5K | 1:1 | 19 |\n| Test (Public) | 2.5K | 1:1 | 22 |\n| Test (Private) | 2.5K | ~1:1 | 24 |\n\n---\n\n## References\n\n- Tan \u0026 Le, \"EfficientNet: Rethinking Model Scaling for CNNs,\" *ICML 2019*\n- Ross Wightman, [PyTorch Image Models (timm)](https://github.com/huggingface/pytorch-image-models)\n- Buslaev et al., \"Albumentations: Fast and Flexible Image Augmentations,\" *Information 2020*\n\n---\n\n## Team\n\n**Three Guys** — Department of Artificial Intelligence and Data Science, Shiv Nadar University Chennai\n\n| Name | Role |\n|---|---|\n| Sharan K | Team Lead |\n| Adhithya Srivatsan | Member |\n| Ankith V | Member |\n\nCodaBench username: `sharank`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddytrunks%2Fivp_ntire_2026","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faddytrunks%2Fivp_ntire_2026","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddytrunks%2Fivp_ntire_2026/lists"}