YOLOv7 Object Blurring Using PyTorch and OpenCV
GPL-3.0 License
git clone https://github.com/RizwanMunawar/yolov7-object-blurring.git
cd yolov7-object-blurring
### For Linux Users
python3 -m venv yolov7objblurring
source yolov7objblurring/bin/activate
### For Window Users
python3 -m venv yolov7objblurring
cd yolov7objblurring
cd Scripts
activate
cd ..
cd ..
pip install --upgrade pip
pip install -r requirements.txt
#if you want to change source file
python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" --blurratio 20
#for specific class (person or 0 classes)
python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" -classes 0 --blurratio 50
#hide-detected-bounding-boxes
python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" -classes 0 --blurratio 50 --hidedetarea
For more details, you can reach out to me on Medium or can connect with me on LinkedIn