A compact CNN classifying images as real or AI-generated, trained on Defactify across five generators, small enough at 1.7 MB to run on CPU. The part that matters is the holdout experiment: train with one generator withheld, then report per-generator recall, so the number is transfer rather than memorisation.
Trained on the Defactify image dataset, which pairs real photographs with output from five generators: SD 2.1, SDXL, SD 3, DALL·E 3, and Midjourney.
Model
A four-block CNN: convolution, batch norm, ReLU, and max pool, going 3 to 32 to 64 to 128 to 256 channels, then adaptive average pooling and two fully-connected layers with dropout. Input is 128 by 128 RGB. The checkpoint is about 1.7 MB, so it runs quickly on CPU.
The holdout experiment
Training with one generator withheld and reporting how the detector does on it. Evaluation gives a confusion matrix plus per-generator recall, so the number you read is “how well does this transfer” rather than a single aggregate accuracy that hides which generator it has memorised.
This question is what the one-class follow-up was built to answer properly.