π΅οΈββοΈ Blurry Faces
A tool to blur faces or other regions in photos and videos π΅οΈβ
π Available Codes
- auto_blur_image: Detects and blurs faces (or objects) in a given image automatically due to a Tensorflow model
- auto_blur_video: Detects and blurs faces (or objects) in a given video due to a Tensorflow model
- manual_blur_image: Blurs manually selected faces (or objects)
π§π© Usage
- Clone or download this repo
- Open src folder in CMD
- Install required packages
pip install -r requirements.txt
auto_blur_image.py
:
For - Run:
python auto_blur_image.py --input_image <PATH_TO_INPUT_JPG_FILE> --output_image <PATH_TO_OUTPUT_JPG_FILE> --model_path <PATH_TO_INPUT_PB_FILE> --threshold <THRESHOLD>
auto_blur_video.py
:
For - Run:
python auto_blur_video.py --input_video <PATH_TO_INPUT_MP4_FILE> --output_video <PATH_TO_OUTPUT_MP4_FILE> --model_path <PATH_TO_INPUT_PB_FILE> --threshold <THRESHOLD>
manual_blur_image.py
:
For -
Run:
python manual_blur_image.py --input_image <PATH_TO_INPUT_JPG_FILE> --output_image <PATH_TO_OUTPUT_JPG_FILE>
- Select your ROI (Region of Interest)
- Press Enter
- Press Q to finish or any key to select another ROI
-
To see running options run for all codes:
python manual_blur_image.py --help
-
TADAA π It's done π€
π€ Examples
auto_blur_image.py
:
For
Threshold = 0.4
auto_blur_video.py
:
For
Threshold = 0.4
manual_blur_image.py
:
For
π Note
I am using face detection model in face_model folder that can detects faces but codes are valid for any .pb
object detection model.
π References
π¦ΈββοΈ Project's Core Codes
- π TensorFlow Object Detection: check out this repo in case that you want to use the core code for other purpose
πΌ Contact
Find me on LinkedIn and feel free to mail me, Asmaa π¦