ymcmy's picture
Update README.md
1adb073 verified

A newer version of the Gradio SDK is available: 5.29.0

Upgrade
metadata
title: AI Generated Image Detector
emoji: 🐨
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 4.36.1
app_file: app.py
pinned: false
license: mit

Mode Description

Images are first divided into patches and classified as rich texture or poor texture. The azimuthal integral is then calculated for each patch with positional embedding applied. See train.py for subsequent classifier architecture. The four datasets I trained on:

I sampled approximated 50,000 real and 50,000 AI generated images. I was able to achieve 97.5% validation accuracy

Training Suggestion

First run preprocess.py and save the preprocessed data as .h5 files in disk. Then run train.py for model training. Preprocessing takes a long time (probably longer than training). It's not a good idea to preprocess while you train, because preprocessing will max out the CPU and leave the GPU idle.

Thanks

The model design is inspired by https://arxiv.org/abs/2311.12397 and https://arxiv.org/abs/2003.01826. Used code from https://github.com/hridayK/Detection-of-AI-generated-images and https://github.com/cc-hpc-itwm/UpConv