Giter VIP home page Giter VIP logo

prasadshiva27 / store-occupancy-measure-application-of-deep-sort Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 100.31 MB

We measure the occupancy of a Store using its entrance Surveillance camera by applying YOLOv3 and Deep SORT.

Python 4.11% CMake 2.44% C++ 82.54% Cuda 0.79% Shell 0.06% HTML 0.67% CSS 0.01% JavaScript 0.65% TeX 0.13% Java 2.85% Swift 0.73% C 3.70% Objective-C 0.26% Objective-C++ 0.96% Perl 0.04% Batchfile 0.03% Prolog 0.01% Dockerfile 0.01% PowerShell 0.04% Makefile 0.01%

store-occupancy-measure-application-of-deep-sort's Introduction

Store-Occupancy-Measure. Application-of-Deep-SORT

This repository implements YOLOv3 and Deep SORT in order to measure Store Occupancy using Store entrance Surveillance camera with real-time object tracking. Yolov3 is an algorithm that uses deep convolutional neural networks to perform object detection. We can feed these object detections into Deep SORT (Simple Online and Realtime Tracking with a Deep Association Metric) in order for a real-time object tracker to be created.

Demo of Object Tracker

Description

In our collective fight against the coronavirus (COVID-19), we can all contribute โ€” especially by keeping a safe physical distance from each other. This application is one of few that helps in making ourselves maintaining a physical distance in Stores.

Store Occupancy can monitor shopper entrance and exits from the entry door surveillance camera without requiring manual counts and displays the total number of people in the store in real-time.

This functionality can be tied into an I/O device to control red/green status lights or an audio alert to ensure prompt guidance to customers. For example, a green light at the doorway indicating guests can enter the premise and flashing red light if the store is at full capacity. An audio message can warn a guest attempting to enter while the store is above capacity. The above gif shows an alert when store reaches the occupancy of 100.

Implementation

Conda Requirements

You can install Conda for python which resolves all the dependencies for machine learning.

pip install requirements.txt

Downloading official pretrained weights

For Windows: You can download the yolov3 weights by clicking here and yolov3-tiny here then save them to the weights folder.

Using Custom trained weights

Add your custom weights file to weights folder and your custom .names file into data/labels folder.

Saving your yolov3 weights as a TensorFlow model.

Load the weights using load_weights.py script. This will convert the yolov3 weights into TensorFlow .tf model files!

# yolov3
python load_weights.py

# yolov3-tiny
python load_weights.py --weights ./weights/yolov3-tiny.weights --output ./weights/yolov3-tiny.tf --tiny

After executing one of the above lines, you should see proper .tf files in your weights folder. You are now ready to run object tracker.

Running the Object Tracker

Now you can run the object tracker for the model you have created by changing the path of the video file in code and the output result video will be saved in the video folder.

There is a test video uploaded in the data/video folder called Mall_entry.mpg. If you followed all the steps properly with the pretrained coco yolov3.weights model then when your run the object tracker you should see the above video(gif).

vid = cv2.VideoCapture('./data/video/Mall_entry.mpg')

python track.py

Acknowledgments

store-occupancy-measure-application-of-deep-sort's People

Contributors

prasadshiva27 avatar

Watchers

 avatar

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.