BlurryFace is a Python-based tool for detecting and blurring faces in images using a YOLO (You Only Look Once) model. The application is designed for privacy protection, automatically identifying faces in an image and applying a Gaussian blur to each detected face.
Note
This project uses a YOLOv11 model trained on a dataset of 1,000 images. The model is optimized specifically for face detection, ensuring a high degree of accuracy in detecting faces for privacy-related applications.
Important
The model is currently in Beta version. While it performs well on most images, it may still have some limitations or inaccuracies in certain cases. Sometimes, you may need to play around with the parameters (conf
, iou
) to get the best results. I'm continuously working to improve its accuracy and robustness
(~ ̄▽ ̄)~.
- Face Detection: Detects faces in an image using a custom-trained YOLO model.
- Gaussian Blur: Blurs detected faces to ensure privacy.
- Customizable Parameters: Set confidence, IoU, and blur radius thresholds as needed.
- Python 3.11
- Poetry (for dependency management and virtual environment)
Important
This project uses Poetry for dependency management
-
Clone the repository:
git clone https://github.com/your-username/blurryface.git cd blurryface
-
Install dependencies
poetry install
Once installed, you can use BlurryFace to process an image by running the following command:
poetry run blurryface "path/to/your/image.jpg" --conf=0.4 --iou=0.7 --rad=20
image_path
: Path to the image you want to process.--conf
: Confidence threshold for face detection. Default is0.4
.--iou
: Intersection over Union (IoU) threshold for face detection. Default is0.45
.--rad
: Radius for the Gaussian blur applied to each detected face. Default is20
.
To blur faces in image.jpg
with custom settings, run:
poetry run blurryface "path/to/image.jpg" --conf=0.5 --iou=0.6 --rad=15