mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-30 18:47:40 +03:00
Update benchmark.py
This commit is contained in:
parent
6154e15596
commit
d3dde23d7e
@ -1,4 +1,4 @@
|
|||||||
#Importing the required libraries
|
#Importing necessary libraries
|
||||||
import datetime
|
import datetime
|
||||||
import multiprocessing as mp
|
import multiprocessing as mp
|
||||||
from statistics import mean
|
from statistics import mean
|
||||||
@ -16,9 +16,8 @@ from frigate.util.process import FrigateProcess
|
|||||||
my_frame = np.expand_dims(np.full((300, 300, 3), 1, np.uint8), axis=0)
|
my_frame = np.expand_dims(np.full((300, 300, 3), 1, np.uint8), axis=0)
|
||||||
labels = load_labels("/labelmap.txt")
|
labels = load_labels("/labelmap.txt")
|
||||||
|
|
||||||
######
|
|
||||||
# Minimal same process runner
|
# Minimal same process runner
|
||||||
######
|
|
||||||
# object_detector = LocalObjectDetector()
|
# object_detector = LocalObjectDetector()
|
||||||
# tensor_input = np.expand_dims(np.full((300,300,3), 0, np.uint8), axis=0)
|
# tensor_input = np.expand_dims(np.full((300,300,3), 0, np.uint8), axis=0)
|
||||||
|
|
||||||
@ -65,9 +64,9 @@ def start(id, num_detections, detection_queue, event):
|
|||||||
print(f"{id} - Average frame processing time: {mean(frame_times) * 1000:.2f}ms")
|
print(f"{id} - Average frame processing time: {mean(frame_times) * 1000:.2f}ms")
|
||||||
|
|
||||||
|
|
||||||
######
|
|
||||||
# Separate process runner
|
# Separate process runner
|
||||||
######
|
|
||||||
# event = mp.Event()
|
# event = mp.Event()
|
||||||
# detection_queue = mp.Queue()
|
# detection_queue = mp.Queue()
|
||||||
# edgetpu_process = EdgeTPUProcess(detection_queue, {'1': event}, 'usb:0')
|
# edgetpu_process = EdgeTPUProcess(detection_queue, {'1': event}, 'usb:0')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user