Git Product home page Git Product logo

fake_gan_accounts's Introduction

Introduction

This repo contains the code and information for the paper "Characteristics and prevalence of fake social media profiles with AI-generated faces".

We analyze the fake accounts using GAN-generated images as their profiles on Twitter.

ganed package

The ganed package implements the GANEyeDistance metric proposed in our paper. The metric can help detect GAN-generated profiles on Twitter.

Usage

Install

The package is not on PyPI. Assuming you are under the root directory of this project, you can use the following command:

pip install -e ./

This would install the package locally to your current Python environment. It will also install the following dependencies:

  • face_recognition>=1.3.0
  • pillow
  • numpy

Note that we only tested the package under Python 3.

Examples

Using the package is straightforward:

import ganed

ganed_calc = ganed.GANEyeDistance()

# Assuming image_path is a path to an image on your disk
ganed_result = ganed_calc.calculate_distance(path_to_image=image_path)

# Assuming pil_image is a PIL.Image.Image instance
ganed_result = ganed_calc.calculate_distance(pil_image=pil_image)

Recommendations

Applying the package to an input image would yield a GANEyeDistance value between 0 and 1. A value close to 0 indicates that the eye locations of the input image are close to the expected locations of GAN-generated faces.

According to our experiment, using a threshold of 0.02 leads to a recall of over 99.5% for GAN-generated faces. However, false positives are inevitable. So, additional examinations are necessary to determine the true nature of the images labeled as positive.

Data release

DOI

We released the TwitterGAN dataset collected for our study. The dataset contains 1,420 fake accounts with GAN-generated profiles. We share their recent tweets and their profile images. You can download the files from Zenodo.

  • TwitterGAN_tweets.ndjson.gz: User objects and recent tweets of the TwitterGAN accounts, collected using Twitter's V2 API. Each line is a JSON object containing the information for one account.
  • TwitterGAN_GPT_tweets.ndjson.gz: User objects and recent tweets of the chatgpt sub-dataset of TwitterGAN. Note that this dataset was collected by parsing Twitter's webpage, the data structure is different from that of the API.
  • TwitterGAN_profiles.tar.gz: Profile images for the accounts.
  • TwitterGAN_id_label_mapping.csv: Mapping between user IDs, labels, and the file names of the profile images.

We also released the basic information of accounts in RandomTwitter. Their profile images are publicly accessible.

  • RandomTwitter_id_ganed.csv.gz: User IDs, profile image URLs, and the GANEyeDistance values for accounts in RandomTwitter

Citation

@article{yang2024characteristics,
  title={Characteristics and prevalence of fake social media profiles with AI-generated faces},
  author={Yang, Kai-Cheng and Singh, Danishjeet and Menczer, Filippo},
  journal={Preprint arXiv:2401.02627},
  year={2024}
}

fake_gan_accounts's People

Contributors

yang3kc avatar

Stargazers

 avatar  avatar Danishjeet Singh avatar

Watchers

Ben Serrette avatar Fil Menczer avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.