Coder Social home page Coder Social logo

face_augmentation_tool's Introduction

face_augmentation_tool

A repo to augmentation your face datasets: random cut top half of face-image, random cut bottom-half and put mask on face

Recommend: Use conda to create a virtual env for this tool.

Install dependency Library

  1. Create conda env:

    conda create --name tool_env python=3.6
    
    conda activate tool_env
  2. Install all dependency by pip

    pip install -r requirements.txt
    pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

    see: https://pytorch.org/get-started/previous-versions/ for suitable version of pytorch

  3. Download weight file and backbone file of (Resnet50) for Retinaface module:

  4. Prepare your data:

    • Your data should contain only face image
    • Your data should following this example path
    • Folder_data
      • folder_1
        • image1.jpg
        • image2.jpg
      • folder_2
        • image3.jpg
        • image4.jpg
      • ...
      • folder_n
        • imagem-1.jpg
        • imagem.jpg
    • This tool will infer through your data folder and execute Augmentation on Prob % of total images in each folder if total images in each folder is bigger than minimum_image in config file.
  5. Run scripts:

    python process.py

    For first time run, this tool will download dlib model file for Mask_module, it takes sometime.

Result:

Reference:

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.