Find out how to Blur Faces in a Video from Command Line


Privateness is at all times extremely necessary, particularly with visible media the place it’s possible you’ll 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 must be recognized. This not too long ago obtained me to considering: what is the best approach to blur faces in a video through command line?

The very best 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 through 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 nicely, even on transferring 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 nicely deface did on a wide range of visible environments. Faces had been recognized at a dependable stage even at default threshold!

  • Create Snook-Style Navigation Using MooTools
  • MooTools Documentation Search Favelet

    I will share one thing with you that can blow your thoughts: I haven’t got the MooTools documentation memorized. I simply do not. I go to the MooTools docs continuously to determine the order of parameters of Extra courses and the way finest to make use of…


Leave a Reply

Your email address will not be published. Required fields are marked *