Friday, September 1, 2023
HomeSoftware DevelopmentThe best way to Blur Faces in a Video from Command Line

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


Privateness is all the time extremely vital, particularly with visible media the place you might not have the permission of people within the video. For those who’re filming one thing in public, it is seemingly you may catch somebody’s face who merely would not need or should be recognized. This just lately obtained me to pondering: what is the best option to blur faces in a video by way of command line?

The most effective open supply utility I discovered for blurring faces in a video was deface. Let’s take a look at how you need to 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 title 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 powerful job of blurring out faces of individuals strolling by within the authentic recording:

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

The default threshold for face recognition works very effectively, even on transferring topics. You may 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 effectively deface did on quite a lot of visible environments. Faces have been recognized at a dependable degree even at default threshold!

  • Designing for Simplicity

    Earlier than we get began, it is value me spending a short second introducing myself to you. My title is Mark (or @integralist if Twitter occurs to be your communication instrument of selection) and I at the moment work for BBC Information in London England as a principal engineer/tech…

  • CSS @supports

    Characteristic detection by way of JavaScript is a consumer facet greatest observe and for all the correct causes, however sadly that very same performance hasn’t been accessible inside CSS.  What we find yourself doing is repeating the identical properties a number of occasions with every browser prefix.  Yuck.  One other factor we…

  • Detect Vendor Prefix with JavaScript

    No matter our place on vendor prefixes, now we have to stay with them and sometimes use them to make issues work.  These prefixes can be utilized in two codecs:  the CSS format (-moz-, as in -moz-element) and the JS format (navigator.mozApps).  The superior X-Tag undertaking has…

  • MooTools Typewriter Effect Plugin Upgrade

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments