Download the pretrained YOLOv7 weights or you can use your own custom trained weights, and paste it in the folder "YOLOv7-object-detect-count-blur-crop" after clone the repository.
git clone https://github.com/Zeeshann1/YOLOv7-object-detect-count-blur-crop.git # clone
cd YOLOv7-object-detect-count-blur-crop
pip install -r requirements.txt # install dependencies
python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" --blurratio 20
- Here we are blurrig class 0 that is person class.
python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" -classes 0 --blurratio 50
python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" -classes 0 --blurratio 50 --hidedetarea
python detect_and_crop.py --weights yolov7.pt --source "your video.mp4"
- Here we are cropping class 0 that is person class.
python detect_and_crop.py --weights yolov7.pt --source "your video.mp4" -classes 0
!python detect_and_count.py --weights /content/yolov7/yolov7.pt --conf 0.1 --source /content/yolov7/inference/images