forked from Github/frigate
Performance: multiprocessing improvement: step 2 (#6986)
* Refactored queues to use faster_fifo instead of mp.Queue * Refactored LimitedQueue to include a counter for the number of items in the queue and updated put and get methods to use the counter * Refactor app.py and util.py to use a custom Queue implementation called LQueue instead of the existing Queue * Refactor put and get methods in LimitedQueue to handle queue size and blocking behavior more efficiently * code format * remove code from other branch (merging fuckup)
This commit is contained in:
committed by
GitHub
parent
d0891e5183
commit
c38c981cd0
@@ -11,6 +11,7 @@ import time
|
||||
from collections import defaultdict
|
||||
|
||||
import cv2
|
||||
import faster_fifo as ff
|
||||
import numpy as np
|
||||
from setproctitle import setproctitle
|
||||
|
||||
@@ -727,7 +728,7 @@ def get_consolidated_object_detections(detected_object_groups):
|
||||
|
||||
def process_frames(
|
||||
camera_name: str,
|
||||
frame_queue: mp.Queue,
|
||||
frame_queue: ff.Queue,
|
||||
frame_shape,
|
||||
model_config: ModelConfig,
|
||||
detect_config: DetectConfig,
|
||||
@@ -735,7 +736,7 @@ def process_frames(
|
||||
motion_detector: MotionDetector,
|
||||
object_detector: RemoteObjectDetector,
|
||||
object_tracker: ObjectTracker,
|
||||
detected_objects_queue: mp.Queue,
|
||||
detected_objects_queue: ff.Queue,
|
||||
process_info: dict,
|
||||
objects_to_track: list[str],
|
||||
object_filters,
|
||||
|
||||
Reference in New Issue
Block a user