Sunday, April 28, 2024
HomeJavaScriptThe right way to Blur Faces in a Video from Command Line

The right way to Blur Faces in a Video from Command Line


Privateness is at all times extremely vital, particularly with visible media the place chances are you’ll not have the permission of people within the video. Should you’re filming one thing in public, it is seemingly you will catch somebody’s face who merely would not need or must be recognized. This lately obtained me to considering: what is the best solution to blur faces in a video by way of command line?

One of the best open supply utility I discovered for blurring faces in a video was deface. Let’s take a look at how you should use deface to blur faces in movies!

Begin by downloading Python-based by way of pip:

python3 -m pip set up deface

With deface put in, merely present the video identify and get the output file with blurred faces:

sudo deface ./sample-4k-faces-video.mp4
Enter:  ./sample-4k-faces-video.mp4
Output: ./sample-4k-faces-video_anonymized.mp4
100%|█████████████████████████████

The ensuing video does a formidable job of blurring out faces of individuals strolling by within the unique recording:

View the ensuing video of individuals strolling down the streets of New York:

The default threshold for face recognition works very properly, even on shifting topics. You’ll be able to experiment with thresholds with the thresh argument, and even draw the thresholds out whereas debugging:

I downloaded a handful of YouTube movies utilizing my favourite YouTube downloading utility youtube-dl and I used to be amazed at how properly deface did on a wide range of visible environments. Faces have been recognized at a dependable degree even at default threshold!

  • Send Text Messages with PHP

    Children as of late, I inform ya.  All they care about is the expertise.  The video video games.  The bottled water.  Oh, and the texting, at all times the texting.  Again in my day, all we had was…OK, I had all of this stuff too.  However I nonetheless do not get…

  • 7 Essential JavaScript Functions

    I keep in mind the early days of JavaScript the place you wanted a easy perform for almost the whole lot as a result of the browser distributors carried out options in another way, and never simply edge options, primary options, like addEventListener and attachEvent.  Occasions have modified however there are nonetheless just a few capabilities every developer ought to…


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments