reysajju / donatefaces Goto Github PK
View Code? Open in Web Editor NEWThis project forked from turian/donatefaces
Extract faces from video clips; generate training data for pose-invariant face features
This project forked from turian/donatefaces
Extract faces from video clips; generate training data for pose-invariant face features
by Joseph Turian Extract faces from video clips; generate training data for pose-invariant face features. USAGE: youtube-dl 'http://www.youtube.com/watch?v=2QlGj_GPPi4' ./detect_faces.py 2QlGj_GPPi4.flv > 2QlGj_GPPi4.flv.faces ./draw_faces.py 2QlGj_GPPi4.flv 2QlGj_GPPi4.flv.faces 2QlGj_GPPi4.faces.mp4 ./smooth_faces.py 2QlGj_GPPi4.flv.faces > 2QlGj_GPPi4.flv.facechains ./draw_facechains.py 2QlGj_GPPi4.flv 2QlGj_GPPi4.flv.facechains 2QlGj_GPPi4.facechains.mp4 youtube-dl 'http://www.youtube.com/watch?v=Hde4s-xBhqE' ./detect_faces.py Hde4s-xBhqE.flv > Hde4s-xBhqE.flv.faces ./draw_faces.py Hde4s-xBhqE.flv Hde4s-xBhqE.flv.faces Hde4s-xBhqE.faces.mp4 ./smooth_faces.py Hde4s-xBhqE.flv.faces > Hde4s-xBhqE.flv.facechains ./draw_facechains.py Hde4s-xBhqE.flv Hde4s-xBhqE.flv.facechains Hde4s-xBhqE.facechains.mp4 If you want to crawl youtube video URLs, check out crawl/ REQUIREMENTS: * OpenCV (>=2?) with *old* style (Swig) Python bindings * If you are under Ubuntu, this is easy to install: sudo apt-get install python-opencv libcv-dev Note: /usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml is contained in libcv-dev so you actually need to install that too for the code to run * If you are compiling the code from scratch, make sure you use option: -D BUILD_SWIG_PYTHON_SUPPORT=ON when running 'cmake' to get the old style bindings. * Note: The new style Python bindings are incomplete, unfortunately: http://stackoverflow.com/questions/2195441/opencv-2-0-and-python (See comment by ezod) * My Python common library: http://github.com/turian/commono * youtube-dl: http://bitbucket.org/rg3/youtube-dl/ Always use the latest version of youtube-dl (the HG current version). * numpy TODO: * Compute sha1sum after downloading a video IMPLICIT REQUIREMENTS (things required by REQUIREMENTS): * ffmpeg * simplejson CREDITS: * Python OpenCV face detection code originally based upon code from Robert Martin “Marty” McGuire: http://creatingwithcode.com/howto/face-detection-in-static-images-with-python/ --------------------- DEPRECATED * pyffmpeg http://code.google.com/p/pyffmpeg/issues/detail?id=9#c5 sudo pip install -e git://github.com/tranx/pyffmpeg.git#egg=pyffmpeg * PyMedia For converting a video into images. I use version 1.3.7.3. <http://securfox.wordpress.com/2009/05/15/pymedia-on-debian-lenny/> Edit the audio/acodec/acodec.c file and on line 31 insert the following : #define HAVE_LRINTF So you should have: #include <libavcodec/avcodec.h> #define HAVE_LRINTF #include “libavcodec/dsputil.h” #include “version.h” TODO: Just use OpenCV cvCaptureFromFile method? PyMedia is old and unsupported. * Video to image dumping is from PyMedia example code: http://pymedia.org/tut/src/dump_video.py.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.