--- license: cc-by-4.0 task_categories: - image-classification pretty_name: Community Forensics configs: - config_name: default data_files: - split: Systematic path: - data/systematic/*.parquet - split: Manual path: - data/manual/*.parquet - split: PublicEval path: - data/publicEval/*.parquet - split: Commercial path: - data/commercial/*.parquet tags: - image size_categories: - 1M=10000: # use only first 10000 samples break img, label = Image.open(io.BytesIO(data['image_data'])), data['label'] ## Your operations here ## # e.g., img_torch = torchvision.transforms.functional.pil_to_tensor(img) ``` Please check [Hugging Face documentation](https://huggingface.co/docs/datasets/v3.5.0/loading#slice-splits) for more usage examples. ### Training fake image classifiers For training a fake image classifier, it is necessary to pair the generated images with "real" images (here, "real" refers to images that are not generated by AI). In our [paper](https://arxiv.org/abs/2411.04125), we used 11 different image datasets: [LAION](https://laion.ai/)([our training distribution](https://huggingface.co/datasets/OwensLab/CommunityForensics/blob/main/data/Real/laion_commfor_train_subset_2M.csv)), [ImageNet](https://www.image-net.org/), [COCO](https://cocodataset.org/), [FFHQ](https://github.com/NVlabs/ffhq-dataset), [CelebA](https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html), [MetFaces](https://github.com/NVlabs/metfaces-dataset), [AFHQ-v2](https://github.com/clovaai/stargan-v2/), [Forchheim](https://faui1-files.cs.fau.de/public/mmsec/datasets/fodb/), [IMD2020](https://staff.utia.cas.cz/novozada/db/), [Landscapes HQ](https://github.com/universome/alis), and [VISION](https://lesc.dinfo.unifi.it/VISION/), for sampling the generators and training the [classifiers](https://huggingface.co/OwensLab/commfor-model-384). To accurately reproduce our training settings, it is necessary to download all datasets and pair them with the generated images. We understand that this may be inconvenient for simple prototyping, and thus we also release [Community Forensics-Small](https://huggingface.co/datasets/OwensLab/CommunityForensics-Small) dataset, which is paired with real datasets that have redistributable licenses and contains roughly 11% of the base dataset. For evaluation, please check our [Community Forensics-Eval](https://huggingface.co/datasets/OwensLab/CommunityForensics-Eval) set. ### Real data composition for training When training our [classifiers](https://huggingface.co/OwensLab/commfor-model-384), we used the following real data composition: ``` LAION 40.30 % imagenet 40.30 % CelebA 7.15 % COCO 4.39 % LandscapesHQ 3.34 % FFHQ 2.34 % IMD2020 1.17 % AFHQv2 0.59 % VISION 0.25 % Forchheim 0.13 % Metfaces 0.05 % ``` We clipped the `LAION` and `ImageNet` data to around 1.08M images to ensure that the ratio of real/fake is 1:1. We release the links to the LAION data subset we used for training [here](https://huggingface.co/datasets/OwensLab/CommunityForensics/blob/main/data/Real/laion_commfor_train_subset_2M.csv). Please note that the data may not be exactly reproducible due to link rot. # Dataset Creation ## Curation Rationale This dataset is created to address the limited model diversity of the existing datasets for generated image detection. While some existing datasets contain millions of images, they are typically sampled from handful of generator models. We instead sample 2.7M images from 4803 generator models, approximately 34 times more generators than the most extensive previous dataset that we are aware of. ## Collection Methodology We collect generators in three different subgroups. (1) We systematically download and sample open source latent diffusion models from Hugging Face. (2) We manually sample open source generators with various architectures and training procedures. (3) We sample from both open and closed commercially available generators. ## Personal and Sensitive Information The dataset does not contain any sensitive identifying information (i.e., does not contain data that reveals information such as racial or ethnic origin, sexual orientation, religious or political beliefs). # Considerations of Using the Data ## Social Impact of Dataset This dataset may be useful for researchers in developing and benchmarking forensics methods. Such methods may aid users in better understanding the given image. However, we believe the classifiers, at least the ones that we have trained or benchmarked, still show far too high error rates to be used directly in the wild, and can lead to unwanted consequences (e.g., falsely accusing an author of creating fake images or allowing generated content to be certified as real). ## Discussion of Biases The dataset has been primarily sampled from LAION captions. This may introduce biases that could be present in web-scale data (e.g., favoring human photos instead of other categories of photos). In addition, a vast majority of the generators we collect are derivatives of Stable Diffusion, which may introduce bias towards detecting certain types of generators. ## Other Known Limitations The generative models are sourced from the community and may contain inappropriate content. While in many contexts it is important to detect such images, these generated images may require further scrutiny before being used in other downstream applications. # Additional Information ## Acknowledgement We thank the creators of the many open source models that we used to collect the Community Forensics dataset. We thank Chenhao Zheng, Cameron Johnson, Matthias Kirchner, Daniel Geng, Ziyang Chen, Ayush Shrivastava, Yiming Dou, Chao Feng, Xuanchen Lu, Zihao Wei, Zixuan Pan, Inbum Park, Rohit Banerjee, and Ang Cao for the valuable discussions and feedback. This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001120C0123. ## Licensing Information We release the dataset with a `cc-by-4.0` license for research purposes only. In addition, we note that each image in this dataset has been generated by the models with their respective licenses. We therefore provide metadata of all models present in our dataset with their license information. A vast majority of the generators use the [CreativeML OpenRAIL-M license](https://github.com/CompVis/stable-diffusion/blob/main/LICENSE). Please refer to the [metadata](https://huggingface.co/datasets/OwensLab/CommunityForensics/tree/main/data/metadata) for detailed licensing information for your specific application. ## Citation Information Please cite our work as below if you used our dataset for your project. ``` @InProceedings{Park_2025_CVPR, author = {Park, Jeongsoo and Owens, Andrew}, title = {Community Forensics: Using Thousands of Generators to Train Fake Image Detectors}, booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)}, month = {June}, year = {2025}, pages = {8245-8257} } ```