Skip to content

DoganK01/YOLOV7-OBJECT-COUNTER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

YOLOV7-OBJECT-COUNTER

How to run Code

  • clone the repository:
  • git clone https://github.com/DoganK01/YOLOV7-OBJECT-COUNTER
  • %cd content/YOLOV7-OBJECT-COUNTER/yolov7-main
  • %%bash
  • wget https://raw.githubusercontent.com/WongKinYiu/yolov7/u5/requirements.txt
  • pip install -r requirements.txt
  • wget -P /content/YOLOV7-OBJECT-COUNTER/yolov7-main/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x.pt

Upgrade pip

  • pip install --upgrade pip

Using counter example:

  • For Object Counter 1:

  • !python detect.py --weights /content/YOLOV7-OBJECT-COUNTER/yolov7-main/weights/yolov7x.pt --conf 0.5 --img-size 640 --source YOLOSample.mp4 --no-trace

  • For Object Counter 2:

  • !python detect_and_count.py --weights /content/YOLOV7-OBJECT-COUNTER/yolov7-main/weights/yolov7x.pt --conf 0.5 --img-size 640 --source YOLOSample.mp4 --no-trace

Result:

detect.py (Object Counter 1)

image

detect_and_count.py (Object Counter 2) (This code is without red lines and "Close People in Pairs" text.)

You can find the mentiond project here: https://github.com/DoganK01/YOLOV7-OBJECT-COUNTER-V1.2

203449682-0fe883a2-d7eb-4398-95e5-96be797b0f5f.1.mp4

Sample Videos

Sample 1 : https://www.youtube.com/watch?v=d2_-UikpuLc

Sample 2 : https://www.youtube.com/watch?v=dhr5JtKD774