Monday, May 1, 2023
HomeProgrammingLearn how to Blur Faces in a Video from Command Line

Learn how to Blur Faces in a Video from Command Line


Privateness is all the time extremely vital, particularly with visible media the place it’s possible you’ll not have the permission of people within the video. In case you’re filming one thing in public, it is possible you may catch somebody’s face who merely would not need or should be recognized. This not too long ago obtained me to pondering: what is the best method to blur faces in a video by way of command line?

The perfect open supply utility I discovered for blurring faces in a video was deface. Let’s take a look at how you should utilize 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 powerful 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 transferring topics. You possibly can 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 had been recognized at a dependable stage even at default threshold!

  • Responsive Images: The Ultimate Guide

    Chances are high that any Internet designers utilizing our Ghostlab browser testing app, which permits seamless testing throughout all units concurrently, may have labored with responsive design in some form or type. And as as we speak’s web sites and units turn out to be ever extra diverse, a plethora of responsive pictures…

  • CSS @supports

    Function detection by way of JavaScript is a shopper aspect greatest follow and for all the fitting causes, however sadly that very same performance hasn’t been out there 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…

  • Style Textarea Resizers
  • Introducing MooTools ScrollSide

    This submit is a proof of idea submit — the performance is but to be perfected. Image this: you have discovered your self on an internet site that makes use of horizontal scrolling as an alternative of vertical scrolling. It is a creative website so that you settle for that the location scrolls left to proper.


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments