mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 18:09:29 +07:00
repo updates
This commit is contained in:
parent
9278234a57
commit
5c15d749cb
|
@ -59,14 +59,16 @@ url = ''
|
|||
```
|
||||
python run.py --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel
|
||||
```
|
||||
> Set url = 0 for webcam.
|
||||
|
||||
## Features
|
||||
The following are the added features. Note: You can easily on/off them in the config. options (mylib/config.py):
|
||||
The following is an example of the added features. Note: You can easily on/off them in the config. options (mylib/config.py):
|
||||
|
||||
<img src="https://imgur.com/Lr8mdUW.png" width=500>
|
||||
|
||||
***1. Real-Time alert:***
|
||||
- If selected, we send an email alert in real-time. Use case: If the total number of people (say 30) exceeded in a store/building, we simply alert the staff.
|
||||
- If selected, we send an email alert in real-time. Use case: If the total number of people (say 10 or 30) exceeded in a store/building, we simply alert the staff.
|
||||
- You can set the max. people limit in config. (``` Threshold = 10 ```).
|
||||
- This is pretty useful considering the COVID-19 scenario.
|
||||
<img src="https://imgur.com/35Yf1SR.png" width=350>
|
||||
|
||||
|
|
8
Run.py
8
Run.py
|
@ -239,10 +239,10 @@ def run():
|
|||
# compute the sum of total people inside
|
||||
x.append(len(empty1)-len(empty))
|
||||
#print("Total people inside:", x)
|
||||
# Optimise number below: 10, 50, 100, etc., indicate the max. people inside limit
|
||||
# if the limit exceeds, send an email alert
|
||||
people_limit = 10
|
||||
if sum(x) == people_limit:
|
||||
# if the people limit exceeds over threshold, send an email alert
|
||||
if sum(x) >= config.Threshold:
|
||||
cv2.putText(frame, "-ALERT: People limit exceeded-", (10, frame.shape[0] - 80),
|
||||
cv2.FONT_HERSHEY_COMPLEX, 0.5, (0, 0, 255), 2)
|
||||
if config.ALERT:
|
||||
print("[INFO] Sending email alert..")
|
||||
Mailer().send(config.MAIL)
|
||||
|
|
BIN
mylib/__pycache__/centroidtracker.cpython-37.pyc
Normal file
BIN
mylib/__pycache__/centroidtracker.cpython-37.pyc
Normal file
Binary file not shown.
BIN
mylib/__pycache__/config.cpython-37.pyc
Normal file
BIN
mylib/__pycache__/config.cpython-37.pyc
Normal file
Binary file not shown.
BIN
mylib/__pycache__/mailer.cpython-37.pyc
Normal file
BIN
mylib/__pycache__/mailer.cpython-37.pyc
Normal file
Binary file not shown.
BIN
mylib/__pycache__/thread.cpython-37.pyc
Normal file
BIN
mylib/__pycache__/thread.cpython-37.pyc
Normal file
Binary file not shown.
BIN
mylib/__pycache__/trackableobject.cpython-37.pyc
Normal file
BIN
mylib/__pycache__/trackableobject.cpython-37.pyc
Normal file
Binary file not shown.
|
@ -9,9 +9,10 @@ url = ''
|
|||
|
||||
# ON/OFF for mail feature. Enter True to turn on the email alert feature.
|
||||
ALERT = False
|
||||
# Set max. people inside limit. Optimise number below: 10, 50, 100, etc.
|
||||
Threshold = 10
|
||||
# Threading ON/OFF
|
||||
Thread = False
|
||||
|
||||
# Simple log to log the counting data
|
||||
Log = False
|
||||
# Auto run/Schedule the software to run at your desired time
|
||||
|
|
Loading…
Reference in New Issue
Block a user