Skip to content

This project perform following tasks based on YOLOv7: Object detection, blurring, cropping, counting, saving bounding box images and image resizing.

Notifications You must be signed in to change notification settings

Zeeshann1/YOLOv7-object-detect-count-blur-crop

Repository files navigation

YOLOv7 object detection counting blurring and croppring

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.

image

Installation

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

Detect & Blur Objects

python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" --blurratio 20

Detect & Blur Specific Class object

  • 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

Hide Detected Bounding Boxes

python detect_and_blur.py --weights yolov7.pt --source "your video.mp4" -classes 0 --blurratio 50 --hidedetarea

Detect & Crop Objects

python detect_and_crop.py --weights yolov7.pt --source "your video.mp4"

Detect & Crop Specific Class Object

  • Here we are cropping class 0 that is person class.
python detect_and_crop.py --weights yolov7.pt --source "your video.mp4" -classes 0

Detect & Count Objects

!python detect_and_count.py --weights /content/yolov7/yolov7.pt --conf 0.1 --source /content/yolov7/inference/images

Reference

About

This project perform following tasks based on YOLOv7: Object detection, blurring, cropping, counting, saving bounding box images and image resizing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages