-
Notifications
You must be signed in to change notification settings - Fork 6
/
vgconf.py
52 lines (42 loc) · 1.66 KB
/
vgconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"""Configuration parameters and constants for Vigilancia."""
import os
# Base path where trained classifiers stored.
VIGILANCIA_PATH = os.path.abspath('.')
CLASSIFIER_DATA_PATH = os.path.join(VIGILANCIA_PATH, 'data', 'classifiers')
EXTRAS_PATH = os.path.join(VIGILANCIA_PATH, 'extras')
# Extra module names.
DARKFLOW_MODULE_NAME = 'darkflow'
# Default values.
DEFAULT_YOLO_SAMPLE_RATE = 5
DEFAULT_FIREARM_SAMPLE_RATE = 5
DEFAULT_INCEPTION_SAMPLE_RATE = 15
ACTIVITY_DETECTOR_LENGTH = 4
# Set default YOLO classifier. It can be either 'tiny-yolo-coco' or
# 'yolo-coco'.
DEFAULT_YOLO_CLASSIFIER = 'tiny-yolo-coco'
# Set default Firearm classifier. It can be either 'FirearmDetectorTiny' or
# 'FirearmDetector'.
DEFAULT_FIREARM_DETECTOR = 'FirearmDetector'
# Set default Event classifier. It can be either 'EventDetectorTiny' or
# 'EventDetector'.
DEFAULT_EVENT_DETECTOR = 'EventDetector'
# Classifier constants.
ACTIVITY_DETECTION_THRESHOLD = 0.95
EVENT_DETECTION_TOP_COUNT = 3
YOLO_THRESHOLD = 0.25
FIREARM_DETECTION_THRESHOLD = 0.45
# Normal and Abnormal Activity prediction strings.
ABNORMAL_ACTIVITY = 'Abnormal Activity'
NORMAL_ACTIVITY = 'Normal Activity'
# Flash the screen for given number of times when suspicious objects or events
# are detected.
DEFAULT_ALERT_FLASH_COUNT = 8
# Suspicious objects.
SUSPICIOUS_OBJECTS_LIST = ['pistol', 'knife']
SUSPICIOUS_EVENTS_LIST = [
'Parade' ,'People_Marching' ,'Riot' ,'Raid',' Traffic' ,'Car_Racin' ,
'Car_Accident' ,'Soldier_Firing' ,'Soldier_Patrol' ,'Soldier_Drilling' ,
'Street_Battle']
SUSPICIOUS_ACTIVITY = ABNORMAL_ACTIVITY
# Audio alert file.
ALERT_BEEP_FILE = os.path.join(VIGILANCIA_PATH, 'data', 'sounds', 'beep.wav')