GithubHelp home page GithubHelp logo

motorcitycobra / face_ripper_9000 Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 10.0 41 KB

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

License: MIT License

Python 49.27% Jupyter Notebook 50.73%

face_ripper_9000's People

Contributors

motorcitycobra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

face_ripper_9000's Issues

name 'random_string' is not defined

File "demo.py", line 161, in
os.rename(i, too_small + "/too small-" + str(counter) + random_string(15) + ".jpg")
NameError: name 'random_string' is not defined

What could be the problem here? What is -i?

Script stops after completing frame extraction of first video

This wasn't happening on my Mac, but it's happening on my Windows machine. For some reason, after the first video selected in my mp4 set has finished extracting, the script stops and prints this message:

Traceback (most recent call last):
  File "demo.py", line 146, in <module>
    os.rename(vid, scanned_vids + '/vid' + str(zz) + '_' + random_string(5) + '.mp4')
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '\\Path\\to\\input\\video\\a.mp4' -> '\\Path\\to\\output\\video/b.mp4'
PS \path\to\face\ripper\directory>
PS \path\to\face\ripper\directory>

The forward slash before b.mp4 and the double backwards slashes aren't typos, that's just how it's printing out.

Confirmation: --no DLIB_USE_CUDA for GPU support?

@MotorCityCobra You state in your readme the compile option -DDLIB_USE_CUDA=0 and when installing --no DLIB_USE_CUDA

Are you sure? Because when compiling with this argument and running the process my GPU isn't used at all. Extract process runs fine nevertheless but CPU is maxed out.

demo.py deletes itself

Windows 10
All deps working

When issuing
python demo.py -i D:\fakes\data\target.jpg -v D:\fakes\data\mp4dir\

I get this:

Target filename: D:\fakes\data\target.jpg.
Video input directory: D:\fakes\data\mp4dir.
Tolerance: 0.6.
Number of confirmed faces saved from each video: 1000.                          
Using OpenCL: True.
Output directory: D:\fakes\data\mp4dir_output.                                
Scanned videos will be moved to: D:\fakes\data\mp4dir_scanned_vids.
Moving demo.py to the too small folder
Moving LICENSE to the too small folder                                          
Moving README.md to the too small folder
Now double checking there is only one face in each photo

And all files are moved to the too small folder and renamed into jpgs and nothing else is extracted.
too small-0cIqXbWehwKRcTtt.jpg

EDIT
on the second try with the exact same command (after I unpcked the py again) everything worked. Seems still like a logic mistake.

PermissionError: [Errno 13] Permission denied: 'C:\\faces'

Running in either a CMD or Powershell as an admin I get the error in the title, I've tried moving the target folder to multiple different locations (downloads, desktop etc) and get the same error.

This is what gets output: http://prntscr.com/ii3obg

Ignore me, I completely forgot to actually specify the image in the face folder each time, I just specified the folder the image was in.

OS Error [Win Error 17] The system cannot move the file to a different disk drive

I'm running Anaconda python 3.5 on Win 10 x64, and the dependencies are installed. I've recompiled OpenCV and Dlib to use CUDA. I'm a python beginner. I'm trying to extract pics from a video, both are on the same drive and in the same directory. There are no spaces or special characters in the target directory or filename.
The error message points to line 159 of demo.py, "in (module) (os.rename + /too small+str(counter) +random string(15) + "*.jpg")
and then OS Error [Win Error 17] The system cannot move the file to a different disk drive.
Unfortunately, I don't know enough python to troubleshoot. How to resolve the error?

Need help with a more in-depth tutorial?

Wasn't sure where to put this, but I guess technically it could be considered an 'issue' so I think posting it here isn't entirely wrong.

To make your code more accessible to general users, I wrote out a (Mac) tutorial for /v/facesets, including how to install all the dependencies correctly, that's aimed at people who've never used a command line before. I'm working on creating another one aimed at PC users, but in the meantime, you can take what I wrote and put it in the README if you'd like. You might think it's a bit too dumbed-down though, so it's up to you.

CV2 installed, but demo.py unable to import it?

When I try to run

python3 demo.py -i 'example/path/pic.jpg' -v 'example/path/videos'

I get an error message saying

Traceback (most recent call last):
  File "demo.py", line 3, in <module>
    import cv2
ImportError: No module named 'cv2'

But from the same directory, I can open up python and run

>>> import cv2
>>> cv2.__version__

And it'll spit out '3.4.0' so It's definitely installed?
Any idea what might be causing this? @MotorCityCobra
Do the directories have to be laid out in a specific way?

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.