Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 2.52 KB

README.md

File metadata and controls

72 lines (54 loc) · 2.52 KB

🕵️‍♀️ Blurry Faces

A tool to blur faces or other regions in photos and videos 🕵️‍

🙌 Available Codes

  1. auto_blur_image: Detects and blurs faces (or objects) in a given image automatically due to a Tensorflow model
  2. auto_blur_video: Detects and blurs faces (or objects) in a given video due to a Tensorflow model
  3. manual_blur_image: Blurs manually selected faces (or objects)

🔧🔩 Usage

  1. Clone or download this repo
  2. Open src folder in CMD
  3. Install required packages
    pip install -r requirements.txt

For auto_blur_image.py:

  1. 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>

For auto_blur_video.py:

  1. 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>

For manual_blur_image.py:

  1. 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
  2. To see running options run for all codes:

    python manual_blur_image.py --help
  3. TADAA 🎉 It's done 🤗

🤗 Examples

For auto_blur_image.py:

Threshold = 0.4

For auto_blur_video.py:

Threshold = 0.4

For manual_blur_image.py:

📍 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

💼 Contact

Find me on LinkedIn and feel free to mail me, Asmaa 🦋