{"id":19146468,"url":"https://github.com/kahsolt/aigc-clf","last_synced_at":"2026-06-19T19:03:52.249Z","repository":{"id":217995945,"uuid":"744056639","full_name":"Kahsolt/AIGC-clf","owner":"Kahsolt","description":"Contest solution for distinguish AIGC images","archived":false,"fork":false,"pushed_at":"2024-02-12T08:29:50.000Z","size":7541,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T16:28:38.064Z","etag":null,"topics":["ai-or-human","aigc","contest-solution","image-classification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kahsolt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-01-16T14:45:00.000Z","updated_at":"2024-01-19T03:20:16.000Z","dependencies_parsed_at":"2024-01-22T09:43:43.196Z","dependency_job_id":"3f967482-1ea2-45d9-9af3-2452c79253e6","html_url":"https://github.com/Kahsolt/AIGC-clf","commit_stats":null,"previous_names":["kahsolt/aigc-clf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kahsolt%2FAIGC-clf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kahsolt%2FAIGC-clf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kahsolt%2FAIGC-clf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kahsolt%2FAIGC-clf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kahsolt","download_url":"https://codeload.github.com/Kahsolt/AIGC-clf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240229935,"owners_count":19768588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai-or-human","aigc","contest-solution","image-classification"],"created_at":"2024-11-09T07:44:13.753Z","updated_at":"2026-06-12T00:30:29.024Z","avatar_url":"https://github.com/Kahsolt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AIGC-clf\n\n    Contest solution for distinguish AIGC images\n\n----\n\nContest Page: [https://xihe.mindspore.cn/competition/mindcon23-aigc-img/0/introduction](https://xihe.mindspore.cn/competition/mindcon23-aigc-img/0/introduction)  \nTeam Name: 你这图保真吗  \nSubmission repo: [https://xihe.mindspore.cn/projects/kahsolt/AIGC-clf](https://xihe.mindspore.cn/projects/kahsolt/AIGC-clf)  \nFinal Score/Rank: 71%/7th, no award :( (refer to [SOLUTIONS.md](SOLUTIONS.md) for top solutions)\n\n### Results\n\n⚪ migrated pretrained apps\n\n| method | pAcc | comment |\n| :-: | :-: | :-: |\n| cheaty | 99.897224% | detect image h/w==512 |\n| [AI-generated-art-classifier](https://huggingface.co/spaces/artfan123/AI-generated-art-classifier) | 88.69476% | resnet18 clf |\n| [AI-image-detector](https://huggingface.co/umm-maybe/AI-image-detector) | 78.82837% | swin clf |\n| [sdxl-detector](https://huggingface.co/Organika/sdxl-detector) | 56.62898% | swin clf |\n| [sd-vae-ft-ema](https://huggingface.co/stabilityai/sd-vae-ft-ema) | 70.7086% | aekl + clf by loss_diff |\n\n⚪ finetuned apps\n\nℹ following apps are based on `AI-generated-art-classifier` and `sd-vae-ft-ema`\n\n- run `python predict.py --app \u003capp_name\u003e`\n\n| app |  input_size | pAcc | pAcc (`vote=5`) | pAcc (`vote=7`) | comment |\n| :-: | :-: | :-: | :-: | :-: | :-: |\n| resnet    | 224 | 85.71429% | 85.50874% | 85.09764% | migrated baseline |\n| resnet_ft | 224 | 98.86948% | 99.07503% | 99.07503% | finetune |\n| resnet_hf | 80  | 87.97533% | 93.01131% | 93.62795% | retrain from pretrained |\n| aekl_clf  | 256 | 95.67456% | 95.88900% | 96.60843% | finetune from pretrained |\n\n⚪ ensemble app\n\n- run `python predict_ensemble.py --votes 7`\n\n| app | pAcc  | pAcc (`vote=7`) |\n| :-: | :-: | :-: |\n| resnet_ft | 96.40288% | 97.22508% |\n| resnet_hf | 89.31141% | 96.71120% |\n| aekl_clf  | 96.50565% | 97.43063% |\n| ensembled | 98.15005% | 99.38335% |\n\n\n### Quickstart\n\n⚪ run pretrained apps\n\n- install [PyTorch](https://pytorch.org/get-started/locally/)\n- `pip install -r requirements.txt`\n- run `python predict.py --app \u003capp_name\u003e` and see `out/result.txt`\n\n⚪ finetune the apps\n\n- link the [contest dataset](https://xihe.mindspore.cn/datasets/drizzlezyk/ai-real/tree/image) to `data`\n- run the following train scripts\n  - `python train_resnet_ft.py`\n  - `python train_resnet_hf.py`\n  - `python train_aekl_clf.py`\n\n\n#### references\n\n- AI-detectors\n  - [https://huggingface.co/Organika/sdxl-detector](https://huggingface.co/Organika/sdxl-detector)\n  - [https://huggingface.co/umm-maybe/AI-image-detector](https://huggingface.co/umm-maybe/AI-image-detector)\n  - [https://huggingface.co/artfan123/resnet-18-finetuned-ai-art](https://huggingface.co/artfan123/resnet-18-finetuned-ai-art)\n    - [https://huggingface.co/spaces/artfan123/AI-generated-art-classifier](https://huggingface.co/spaces/artfan123/AI-generated-art-classifier)\n- SD VAEs\n  - [https://huggingface.co/stabilityai/sdxl-vae](https://huggingface.co/stabilityai/sdxl-vae)\n  - [https://huggingface.co/stabilityai/sd-vae-ft-mse](https://huggingface.co/stabilityai/sd-vae-ft-mse)\n  - [https://huggingface.co/stabilityai/sd-vae-ft-ema](https://huggingface.co/stabilityai/sd-vae-ft-ema)\n  - [https://huggingface.co/stabilityai/sd-vae-ft-mse-original](https://huggingface.co/stabilityai/sd-vae-ft-mse-original)\n- dataset\n  - JourneyDB: [https://huggingface.co/datasets/JourneyDB/JourneyDB](https://huggingface.co/datasets/JourneyDB/JourneyDB)\n- 比赛材料仓库\n  - 训练样例: [https://source-xihe-mindspore.osinfra.cn/champagne11/mindcv_twoclass.git](https://source-xihe-mindspore.osinfra.cn/champagne11/mindcv_twoclass.git)\n  - 数据样例: [https://source-xihe-mindspore.osinfra.cn/drizzlezyk/ai-real.git](https://source-xihe-mindspore.osinfra.cn/drizzlezyk/ai-real.git)\n  - mindspore: [https://www.mindspore.cn/docs/zh-CN/r2.2/index.html](https://www.mindspore.cn/docs/zh-CN/r2.2/index.html)\n  - mindcv: [https://mindspore-lab.github.io/mindcv/](https://mindspore-lab.github.io/mindcv/)\n\n----\nby Armit\n2024/01/03\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkahsolt%2Faigc-clf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkahsolt%2Faigc-clf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkahsolt%2Faigc-clf/lists"}