Skip to content
/ YOLOV7 Public

Developed an optimal solution for distance detection which includes functionalities such as object identification and classification, annotating images, computing distances between specific class objects, verifying and notifying about calculated distances, optimizing the model from 32-bit to 8-bit for efficiency, and deploying the optimized model.

License

Notifications You must be signed in to change notification settings

VIVPM/YOLOV7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yolov7

Track Counter:

YOLOV7_Object_Counter_Trim21_Trim.mp4

Social Distance with Yolov7

  • Count all objetcs by classes and works perfetcly on every image or on a video
  • Code can run on Both (CPU & GPU)
  • Video/WebCam/External Camera/IP Stream Supported

Sample Videos:

https://www.youtube.com/watch?v=nB8L54-ejgQ

https://www.youtube.com/watch?v=vANr6aC7QOY

Ready-To-Use Google Colab:

https://colab.research.google.com/drive/1URG1BruRkVQawZGqCJ1ibV_SeYhEBdKd?usp=sharing

How to run Code:

  • clone the repository:
  • !git clone https://github.com/DoganK01/YOLOV7-OBJECT-COUNTER-V1.2.git
  • cd /content/YOLOV7-OBJECT-COUNTER-V1.2

Upgrade pip with the mentioned command below.

  • pip install --upgrade pip

Install requirements

  • !pip install -r requirements.txt

Weights get

  • %%bash
  • wget -P /content/YOLOV7-OBJECT-COUNTER-V1.2/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt
  • wget -P /content/YOLOV7-OBJECT-COUNTER-V1.2/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x.pt
  • wget -P /content/YOLOV7-OBJECT-COUNTER-V1.2/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-w6.pt
  • wget -P /content/YOLOV7-OBJECT-COUNTER-V1.2/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt
  • wget -P /content/YOLOV7-OBJECT-COUNTER-V1.2/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-d6.pt
  • wget -P /content/YOLOV7-OBJECT-COUNTER-V1.2/weights https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6e.pt
  • NOTE: You can use any of these. If one doesn't work, try the other.

Upgrade pyyaml

  • !pip install --upgrade pyyaml==5.3.1

Using Codes:

  • For Close People with Red Lines:
  • !python detect.py --weights /content/Yolov7-Close-People-Counter/weights/yolov7x.pt --source /content/Yolov7-Close-People-Counter/inference/images/bus.jpg --no-trace
  • For Close People "Counter":
  • !python counter.py --weights /content/Yolov7-Close-People-Counter/weights/yolov7x.pt --source /content/Yolov7-Close-People-Counter/inference/images/bus.jpg --no-trace
  • For Object Counter:
  • !python detect_and_count.py --weights /content/Yolov7-Close-People-Counter/weights/yolov7x.pt --source /content/Yolov7-Close-People-Counter/inference/images/bus.jpg --no-trace

Results

bus (1)

Test.23._Trim.mp4
Test.21._Trim2.mp4

Real-ESRGAN

Saving people who break the social distance by increasing the resolution from real-video: (Real-ESRGAN):

Rec.0005.mp4

References

About

Developed an optimal solution for distance detection which includes functionalities such as object identification and classification, annotating images, computing distances between specific class objects, verifying and notifying about calculated distances, optimizing the model from 32-bit to 8-bit for efficiency, and deploying the optimized model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published