repo updates

This commit is contained in:
Sai Subhakar T 2020-10-21 13:10:12 +02:00
parent 9278234a57
commit 5c15d749cb
8 changed files with 10 additions and 7 deletions

View File

@ -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
View File

@ -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)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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