Code Monkey home page Code Monkey logo

yolov7-object-counter-v1.2's Introduction

Yolov7-Close-People-CounterV1.2

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

yolov7-object-counter-v1.2's People

Contributors

dogank01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yolov7-object-counter-v1.2's Issues

detect.py

On the arg classes if I am just after people only, would it make my platform run faster? Its a bit lagy but it works really well just curious if it would speed things up at all?

image

weapons on detect.py

Is it possible to add in weapons to the model? Or would one of the models do weapons? I downloaded 4 images from a Google search:

py detect.py --weights /content/Yolov7-Close-People-Counter/weights/yolov7x.pt --source C:\Users\Administrator\Desktop\YOLOV7-OBJECT-COUNTER-V1.2\inference\images\gun1.PNG --no-trace

image

image

image

image

detect.py inference

when you run inference on detect.py what information is returned on the model output?

I know its just an array of data but what all is contained in that array? Hopefully that makes sense.....am trying to connect the dots on how the bounding boxes are drawn around multiple images in one picture.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.