Product

How to Blur Detected Objects Using YOLOv7?

In this article, we will guide you on how to find and blur detected objects with Yolov7.
Muhammad Rizwan Munawar
3 min

Pre-Requisites

  • Git needs to be installed on your Linux/Windows System.
  • Python3 is installed on your Linux/Windows System.

Introduction

Blur, as the name suggests, is "to partially or completely hide some object or show it in such a way that it cannot be understandable." In object Detection, most of the time, we need to blur objects due to sensitive information or privacy concerns. So here, the idea of "blur detected objects" comes to mind, which aims to "blur objects that have been detected by computer vision model, it can be based on class category detected or completed detected objects.

So, let's start; the steps this article covers are mentioned below;

  • Clone YOLOv7 object blurring code from GitHub.
  • Install the packages that need to run YOLOv7 object blurring.
  • Download YOLOv7 weights for detection before blurring.
  • Blur Objects on Any Video.

Clone YOLOv7 object blurring code from GitHub

Create a folder named "YOLOv7-object-blurring". Open the terminal/ (Command Prompt) in that folder. Clone the YOLOv7 object-blurring repository with the command mentioned below.

git-clone

Moved to the cloned folder and upgraded pip using the command mentioned below.

yolov7-object-blurring

Install the packages that need to run YOLOv7 object blurring

Now, it's time to install python packages that will help you to blur detected objects easily on your system. Use the command mentioned below to install packages.

pip-install

Download YOLOv7 weights for detection before blurring

It's time to download YOLOv7 weights, which will help you to detect objects in the video stream.

Weights Download Link: HERE

Blur Objects on Any Video

Now, all your requirements are met. It's your time to blur detected objects. You can use any video on which you want to apply the blur module. You can run the mentioned command below to blur detected objects on your own videos. You can even percentage on blur with the "—blurratio" value.

Blur Object on Any Video

Output Video

Creative AI Assistant

It's never been easy before!
Starts at $24.90/mo.
Free hands-on onboarding & support!
No limitation on generation!