Skip to content

This repository is created on top of two repositories i.e., yolov7 face detection and yolov7 blurring object

Notifications You must be signed in to change notification settings

FareedKhan-dev/yolov7-face-blur

Repository files navigation

yolov7-face-blur

This repository is created on top of two repository

  1. Object Blurring by RizwanMunawar
  2. Face detction by derronqi

How to install

  1. Create Virutal Environment of Python, Recommended python version 3.9.0, incase you dont have 3.9.0, see pyenv guide.
  2. Activate the Environment using python -m venv your_env_name/Scripts/activate
  3. install required libraries using pip install -r requirements
  4. (Optional) If you want to use GPU, you have to install additional requirements i.e, pip install -r requirements_gpu.txt

Models:

Models Test Size Easy Medium Hard FLOPs (B) @640 Google Baidu
yolov7-lite-t 640 88.7 85.2 71.5 0.8 google gsmn
yolov7-lite-s 640 92.7 89.9 78.5 3.0 google 3sp4
yolov7-tiny 640 94.7 92.6 82.1 13.2 google aujs
yolov7s 640 94.8 93.1 85.2 16.8 google w72z
yolov7 640 96.9 95.5 88.0 103.4 google jrj6
yolov7+TTA 640 97.2 95.8 87.7 103.4 google jrj6
yolov7-w6 960 96.4 95.0 88.3 89.0 google -
yolov7-w6+TTA 1280 96.9 95.8 90.4 89.0 google -

Required Arguments to run

  1. --weights contains your downloaded model from the above table
  2. --bluurratio to determine the strength of blurring, default value is 20
  3. --device either cpu or 0 in case of gpu.
  4. --source containes your images (png, jpg etc) or video (mp4 etc)

Examples

# Example with detected accuracy (usng CPU)
python detect.py --weights yolov7-tiny.pt --blurratio 50 --device cpu --source myimage.jpg

# Example with hiding detected area, only blur (usng CPU)
python detect.py --weights yolov7-tiny.pt --blurratio 50 --hidedetarea --device cpu --source myimage.jpg

# Example on video (usng CPU)
python detect.py --weights yolov7-tiny.pt --blurratio 50 --hidedetarea --device cpu --source myvideo.mp4

About

This repository is created on top of two repositories i.e., yolov7 face detection and yolov7 blurring object

Topics

Resources

Stars

Watchers

Forks