GithubHelp home page GithubHelp logo

cagkanciloglu / face_ripper_9000 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from motorcitycobra/face_ripper_9000

1.0 2.0 0.0 100 KB

Creates 256 cropped, high quality facesets from a batch of mp4 videos end to end

License: MIT License

Python 100.00%

face_ripper_9000's Introduction

face_ripper_9000

Creates 256 cropped, high quality facesets from a batch of mp4 videos end to end. Modified code from https://github.com/Tyrannosaurus1234/GetFaces by Tyrannosaurus1234 adjusted for batch converting and extra quality scanning of the final faceset by removing photos below a minimum size and double checking there is only one face in the photo

Usage

$python3 demo.py -i '/PATH/TO/PASSPORT/STYLE/PHOTO/OF/TARGET/FACE.jpg' -v '/PATH/TO/DIR/OF/MP4s'

-t = Tolerance of face detection, lower is stricter (0.1-1.0) Default = 0.6
-f = Amount of frames per second to scan. Default = 25
-n = Number photos of the face from each video. Default = 1000 (Set higher if you have less vids)
-s = Minimum KB size of images to keep in the faceset. Default = 32

Running the script creates three files in your directory. One for the faceset. One for the scanned mp4s. One for the small faces.

The batch processing of the faceset can be stopped or started anytime without a problem, aside from maybe it creating duplicates if it stops in the middle of a video. Just go in your faceset folder and remove photos from the half processed video when you start it again.

The script can read videos other than mp4s. Just do a find and replace in the script to your extension, like mp4 to mkv.
Best to use mp4s ripped from YouTube. Use YouTube video downloader sites or apps to grab dozen(s) of 1080p videos starring the target face.

Dependancies

numpy

opencv-python >= 3.31

face_recognition

face_recognition requires a package called dlib. If you have a GPU you must install dlib in a specific way in order to get it to use your GPU ...Which doesn't seem to be listed in the documentation but doing so is as follows,

git clone https://github.com/davisking/dlib.git

cd dlib

mkdir build; cd build; cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1; cmake --build .

cd ..

python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA

Donations Accepted and Appreciated

If you'd like me to make more tools for you in the future then share some of your crypto gains with me.

BTC: 18vFPf3mKBEk8m2xvR21Vw3B8GNUrmYsoe

face_ripper_9000's People

Contributors

motorcitycobra avatar

Stargazers

 avatar

Watchers

James Cloos avatar Cagkan Ciloglu 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.