-
Notifications
You must be signed in to change notification settings - Fork 33
/
capture_conf.py
95 lines (93 loc) · 2.72 KB
/
capture_conf.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
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
from easydict import EasyDict
env = {
'dev': EasyDict({
# have little influence
'track_max_cosine_distance': 0.6,
'track_nn_budget': 100,
'nms_max_overlap': 1.0,
# important param for deep sort
'track_max_iou_distance': 0.7,
'track_n_init': 3,
'track_max_age': 30,
'min_width': 64,
'min_height': 128,
'frame_save_interval': 2,
# params for lffd
'score_threshold': 0.1,
'top_k': 100, # total boxes in an image
'NMS_threshold': 0.5,
# params for main.py
'max_queue_size': 10,
'pool_size': 20,
'video_on': True,
'track_on': True,
'is_async': False,
'save': True,
'source_paths': ['./save/ETH-Jelmoli.mp4,device_2,640,480'] # ['rtsp://admin:[email protected]:554,device_2,1920,1080']
}),
'prd': EasyDict({
# have little influence
'track_max_cosine_distance': 0.6,
'track_nn_budget': 100,
'nms_max_overlap': 1.0,
# important param for deep sort
'track_max_iou_distance': 0.7,
'track_n_init': 3,
'track_max_age': 30,
'min_width': 64,
'min_height': 128,
'frame_save_interval': 2,
# params for lffd
'score_threshold': 0.1,
'top_k': 100, # total boxes in an image
'NMS_threshold': 0.5,
# params for main.py
'max_queue_size': 20,
'pool_size': 40,
'video_on': False,
'track_on': False,
'is_async': True,
'save': True,
'source_paths': ['rtsp://admin:[email protected]:554,device_2,1920,1080']
})
}
from logging.config import dictConfig
dictConfig({
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '[%(thread)d][%(levelname)s %(asctime)s %(filename)s %(funcName)s %(lineno)s] %(message)s'
}
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
'file': {
'level': 'INFO',
'class': 'cloghandler.ConcurrentRotatingFileHandler',
'maxBytes': 1024 * 1024 * 10,
'backupCount': 50,
# If delay is true,
# then file opening is deferred until the first call to emit().
'delay': True,
'filename': 'logs/logs.log',
'formatter': 'verbose',
}
},
'loggers': {
'app': {
'handlers': ['console', 'file'],
'level': 'DEBUG',
'propagate': False
}
},
'root': {
'handlers': ['console', 'file'],
'level': 'DEBUG',
}
}
)