Giter VIP home page Giter VIP logo

fakeface's Introduction

FakeFace

Introduction

This repository holds the PyTorch-based code for training a fake (face) image classifier.

We used this code to participate in the 2018 AI RnD Challenge, hosted by the Ministry of Science and ICT, Government of South Korea. Our team(Lomin) won the 2nd place of the challenge.

In this repository, we provide

  • Training/Test code
  • Our 'Photoshop dataset', which we specially made for this task
  • Demo website for the test: visit https://faceforensic.lomin.ai

Dependencies

  • Python packages (We recommend using Conda environment)
    • tensorflow-gpu==1.12.0
    • torch==1.0.0
    • torchvision==0.2.1
    • Pillow==5.2.0
    • matplotlib==2.2.2
    • scipy==1.1.0
    • tqdm==4.24.0
    • opencv-python==3.4.3.18
    • pyyaml==4.2b1
    • addict==2.2.0
    • tensorboardX==1.4
    • mtcnn==0.0.8
  • An NVIDIA GPU & CUDA 9.0

Quick start

  • To test our models, visit our demo website: https://faceforensic.lomin.ai (Korean)
  • If you want to manually test and get scores for each images, follow the steps:
    1. Place your images at any directory.

    2. Download our models from this link.

    3. Run the script "test.py". Use at least one of —inference or —avg option.

      python test.py --root_dset (root directory for your test images) --root_model (root directory where you downloaded models) --batch_size (batch size for inference) --inference (if you want to run inference) --avg (if you want to ensemble results)

Data preparation

Photoshop dataset: In order to train a more accurate classifier, we created 3,000 synthetic face images with the help of image editing experts. You can download it from this link.

Other images used for real/fake samples are from public datasets. We use

Locate datasets (or create softlinks to directories) under fakeface/dataset.

Training

git clone https://github.com/lomin-ai/fakeface.git

python train.py
	--tag         (tag, or identifier of training)
	--preset      (choose one of 'gan', 'syn', 'mod', 'gan+syn')
	--clear_cache (do not use cache for dataset)
	--set         (additional settings)

Contact

Bee Lim ([email protected])

fakeface's People

Contributors

limbee avatar

Watchers

 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.