Giter Club home page Giter Club logo

retinaface's Introduction

RetinaFace:

These are codes of RetinaFace used for blurring images of Figure Skating and CrossFit motions as a part of the joint project with Elancer Inc. Note that the codes in this github are gathered from various other sources on Github. (https://github.com/deepinsight/insightface and etc.) Paper: RetinaFace: Single-stage Dense Face Localisation in the Wild (https://paperswithcode.com/paper/190500641) The code is modified to be used as face blurring tool.

Project Description

This project aims to blur face of action models in every video. The steps are as follows:

  • Step 1: we split each video into frames(images)
  • Step 2: use RetinaFace to find face coordinates
  • Step 3: use OpenCV library to blur the facial area given from the second step
  • Step 4: Compress the image frames as tar file

Model

We provide two different pretrained models for RetinaFace in 'weights' directory. Both models are trained using the WiderFace dataset.

  • mobilenet0.25_Final.pth: a trained RetinaFace model using Mobilenet as its backbone
  • Resnet50_Final.pth: a trained retinaFace model using Resnet as its backbone (USED)

Code Information

Codes in this directory are implemented using Python 3.7. This repository contains the code for RetinaFace. The required Python packages are described in ./requirments.txt.

  • The major codes of RetinaFace is in this directory.
    • main.py: the code that takes in video folder path as input, creates a pkl file of total paths and activates make_images.py to perform blurring.
    • make_images.py: the code related to using RetinaFace model to find face coordinates and blur images
    • models/retinaface.py: the code that contains the implementation of RetinaFace model.
    • models/net.py: the code related to feature extraction of images.
    • utils/find_every_path.py: the code that finds and returns all file paths in a folder.
    • utils/box_utils.py: the code that contains bounding box related methods.

How to use the code to perform face blurring

Type the following command to blur videos:

    python main.py --func make_images --file (folder path of your videos) --gpu (gpu)

The script will create the following pkl file:

current directory
└── total_paths.pkl

the processed files are stored in the same directory as the input folder:

current directory
└── your video folder
    ├── video1.avi
    └── video1.tar (TAR FILE)

retinaface's People

Contributors

jminnnnn 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.