mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
make debug a env var
This commit is contained in:
parent
b4e5c812ce
commit
bf6d6c3796
@ -37,6 +37,8 @@ REGIONS = os.getenv('REGIONS')
|
|||||||
|
|
||||||
DETECTED_OBJECTS = []
|
DETECTED_OBJECTS = []
|
||||||
|
|
||||||
|
DEBUG = (os.getenv('DEBUG') == '1')
|
||||||
|
|
||||||
# Loading label map
|
# Loading label map
|
||||||
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
|
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
|
||||||
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES,
|
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES,
|
||||||
@ -102,7 +104,6 @@ class ObjectParser(threading.Thread):
|
|||||||
global DETECTED_OBJECTS
|
global DETECTED_OBJECTS
|
||||||
while True:
|
while True:
|
||||||
obj = self._object_queue.get()
|
obj = self._object_queue.get()
|
||||||
print(obj)
|
|
||||||
DETECTED_OBJECTS.append(obj)
|
DETECTED_OBJECTS.append(obj)
|
||||||
|
|
||||||
# notify that objects were parsed
|
# notify that objects were parsed
|
||||||
@ -259,7 +260,7 @@ def main():
|
|||||||
region['motion_detected'],
|
region['motion_detected'],
|
||||||
frame_shape,
|
frame_shape,
|
||||||
region['size'], region['x_offset'], region['y_offset'],
|
region['size'], region['x_offset'], region['y_offset'],
|
||||||
False))
|
DEBUG))
|
||||||
detection_process.daemon = True
|
detection_process.daemon = True
|
||||||
detection_processes.append(detection_process)
|
detection_processes.append(detection_process)
|
||||||
|
|
||||||
@ -271,7 +272,7 @@ def main():
|
|||||||
frame_shape,
|
frame_shape,
|
||||||
region['size'], region['x_offset'], region['y_offset'],
|
region['size'], region['x_offset'], region['y_offset'],
|
||||||
region['min_object_size'], region['mask'],
|
region['min_object_size'], region['mask'],
|
||||||
True))
|
DEBUG))
|
||||||
motion_process.daemon = True
|
motion_process.daemon = True
|
||||||
motion_processes.append(motion_process)
|
motion_processes.append(motion_process)
|
||||||
|
|
||||||
@ -405,7 +406,6 @@ def fetch_frames(shared_arr, shared_frame_time, frame_lock, frame_ready, frame_s
|
|||||||
def process_frames(shared_arr, object_queue, shared_frame_time, frame_lock, frame_ready,
|
def process_frames(shared_arr, object_queue, shared_frame_time, frame_lock, frame_ready,
|
||||||
motion_detected, frame_shape, region_size, region_x_offset, region_y_offset,
|
motion_detected, frame_shape, region_size, region_x_offset, region_y_offset,
|
||||||
debug):
|
debug):
|
||||||
debug = True
|
|
||||||
# shape shared input array into frame for processing
|
# shape shared input array into frame for processing
|
||||||
arr = tonumpyarray(shared_arr).reshape(frame_shape)
|
arr = tonumpyarray(shared_arr).reshape(frame_shape)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user