-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.env
177 lines (135 loc) · 7.74 KB
/
env.env
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#########################################################
##########################INPUT##########################
#########################################################
#-------------------------Video-------------------------#
# Absolute/relative path to video
# E.g "./data/videos/main_lib.mp4"
VIDEO="./data/videos/in_out_lib.mp4"
#---------------------Live Camera-----------------------#
# Specify if video capture is from a live camera
IS_CAM=False
#--------------------Live Connection--------------------#
#Specify what is the camera live connection, for example
CONNECTION= "rtsp://**"
#########################################################
#################COUNTING CONFIGURATION##################
#########################################################
#-------------------Counting By Region------------------#
# Specify a counting Region of Interest (ROI)
# i.e a set of vertices that represent the area (polygon) where you want counting to be made.
# [()-left up point ,()- left down point,()- right down point,()- right up point,()]
# example for counting roi for mechanical camera-
# [(418, 7), (730, 567), (1112, 542), (1279, 1), (1060, 4)]
COUNTING_ROI = [(418, 7), (730, 567), (1112, 542), (1279, 1), (1060, 4)]
MECHANICAL_COUNTING_ROI=[(418, 0), (730, 567), (1112, 542), (1279, 0), (1060, 0)]
MEDICAL_COUNTING_ROI = [(1,0), (160, 87), (160, 214), (965, 214), (1279,0)]
# flag for enable counting by roi and not line, if it False ,we will count by line
USE_COUNT_ROI = False
# Display/overlay the counting ROI on the video
SHOW_COUNT_ROI = False
# orientation of counting region (options: True - the region is the out area , False - the region is inside area)
COUNTING_ROI_OUTSIDE = True
#-------------------Counting By Line-------------------#
# Orientation of counting line (options: top, bottom, left, right)
COUNTING_LINE_ORIENTATION="right"
# Position of counting line - need to be float number between 0 to 1 (example: 0.25)
# medical line position = 0.3
COUNTING_LINE_POSITION = 0.61
#------------------- Objects liveness Roi-------------------#
# set of vertices that represent the area of the counted objects, if person is out of this area and was counted, we will delete him.
# ELECTRICAL_ROI_OBJECT_LIVENESS = [(50,0),(20,1277),(680,1277),(680,0)]
# MEDICAL_ROI_OBJECT_LIVENESS = [(173, 42), (48, 204), (36, 676), (1174, 676), (1207, 42)]
# MEDICAL_ROI_OBJECT_LIVENESS = [(173, 5), (48, 204), (36, 676), (1174, 676), (1207, 5)]
OBJECT_LIVENESS_ROI = [(479, 56), (101, 382), (101, 1010), (1629, 1010), (1466, 56)]
ENABLE_OBJECT_LIVENESS = False
SHOW_OBJECT_LIVENESS = False
#########################################################
#################DETECTION CONFIGURATION#################
#########################################################
#--------------------Detection Region--------------------#
# Specify a detection Region of Interest (ROI)
# i.e a set of vertices that represent the area (polygon) where you want detections to be made
# E.g [(750, 400), (1150, 400), (1850, 700), (1850, 1050), (500, 1050)]
# Default: [(0, 0), (frame_width, 0), (frame_width, frame_height), (0, frame_height)] (i.e the whole video frame)
# OR ROI
# [()-left up point ,()- left down point,()- right down point,()- right up point,()]
# DROI=[(418, 7), (730, 567), (1112, 542), (1279, 1), (1060, 4)]
# DROI=[(827, 2), (860, 716), (1279, 710), (1279, 1), (1060, 4)]
# DROI=[(750, 400), (1150, 400), (1850, 700), (1850, 1050), (500, 1050)]
# Enable/Disable detection by region
USE_DROI=False
DROI = [(2, 403), (4, 659), (253, 634), (277, 826), (78, 914), (4, 900), (11, 1022), (284, 1076), (1311, 1066), (1441, 950), (1647, 1060), (1609, 610), (1535, 266), (1331, 259), (1374, 2), (423, 4), (492, 310)]
#DROI = [(0,4), (11,1071), (1656,1078), (1604, 2), (1580, 603)]
DROI_MECHANICAL = [(2, 403), (4, 659), (253, 634), (277, 826), (78, 914), (4, 900), (11, 1022), (284, 1076), (1311, 1066), (1441, 950), (1647, 1060), (1609, 610), (1535, 266), (1331, 259), (1374, 2), (423, 4), (492, 310)]
DROI_MEDICAL = [(188, 4), (158,202), (0, 208), (0, 718), (1162, 718), (1208, 284), (948, 256), (940, 0)]
# Display/overlay the detection ROI on the video
SHOW_DROI=False
#--------------------Detection Interval--------------------#
# Detection interval i.e number of frames before detection is carried out again
# (in order to find new people and update the trackers of old ones)
DI=3
#--------------------Detection Failures--------------------#
# Maximum consecutive detection failures i.e number of detection failures
# before it's concluded that an object is no longer in the frame
MCDF=9
#--------------------IOU Threshold-------------------------#
# The threshold above which two boxes detected will be considered as the same object, and the one with the lower confidence be removed
IOU_THRESHOLD = 0.4
#--------------------Percentage of Frame Threshold-------------------------#
# The threshold of frame size (measured as a percentage of the frame's size) above which a detected box is removed.
# Recommended values depend on the camera's zoom, but a good initial value could be 0.3
PERCENTAGE_OF_FRAME_THRESHOLD = 0.3
#--------------------Maximum Width to Height Ratio Allowed-------------------------#
# The maximum ratio allowed between width and height of a box, ensuring only proportionate bounding boxes.
# Values must be larger than 1.
MAXIMUM_WIDTH_TO_HEIGHT_RATIO_ALLOWED = 2
#-----Decrease the DI (detection interval) to 1 when there is a person in the frame, and use SENSITIVE_CONFIDENCE_THRESHOLD when there aren't people in the frame yet-----#
DETECTION_SLOWDOWN = True
#==========++++++++++==========START MARKED FOR DELETION==============+++++++++++==============
#------------------- Yolo Configuration---------------------#
# Configs for YOLO (You Only Look Once) detector on GPU
YOLO_MODEL_PATH="./model_data/yolov3.h5"
CONFIDENCE_THRESHOLD = 0.1
# A more sensitive confidence threshold meant to be lower until the first detection occurs
SENSITIVE_CONFIDENCE_THRESHOLD = 0.05
#########################################################
##################TRACKER CONFIGURATION##################
#########################################################
#---------------------Tracker Model------------------------#
# Algorithm to use for people tracking (options: kcf, csrt, medianflow,mosse ,tld, goturn)
TRACKER="csrt"
#--------------------Tracker Failures--------------------#
# Maximum consecutive tracking failures i.e number of tracking failures
# before the tracker concludes the tracked object has left the frame
MCTF=5
#------------------Tracker Object Overlap-----------------#
# minimum overlap objects for remove object.
OVERLAP_THRESHOLD= 0.1
#########################################################
#######################OUTPUT############################
#########################################################
#------------------Recording Video----------------------#
# Record people counting as video
RECORD= False
#--------------------Output Path------------------------#
# Set path where recorded video will be stored
OUTPUT_VIDEO_PATH="./data/videos/"
#--------------------Display UI-------------------------#
# Run with UI display
UI= True
#--------------------Log Output-------------------------#
# Log destinations
ENABLE_CONSOLE_LOGGER=True
ENABLE_FILE_LOGGER=False
# Absolute/relative path to log files directory
LOG_FILES_DIRECTORY="./data/logs/"
#-----------------Debug Window Size---------------------#
# Size of window used to view the people counting process
DEBUG_WINDOW_SIZE=(858, 480)
#---number of frames in every color-changing interval---#
# number of frames that the counting line color will stay on the object that just counted.
COLOR_CHANGE_INTERVAL_FOR_COUNTING_LINE = 4
#----------Debug flag-------------#
DEBUG=True
#----------EVENT API URL-------------#
EVENT_API_URL="http://pastebin.com/api/api_post.php"