Added time to predict
This commit is contained in:
parent
c152c709fd
commit
279bbc59d3
@ -232,6 +232,7 @@ class PreciseRunner(object):
|
|||||||
def _handle_predictions(self):
|
def _handle_predictions(self):
|
||||||
"""Continuously check Precise process output"""
|
"""Continuously check Precise process output"""
|
||||||
while self.running:
|
while self.running:
|
||||||
|
t0 = time.time()
|
||||||
chunk = self.stream.read(self.chunk_size)
|
chunk = self.stream.read(self.chunk_size)
|
||||||
|
|
||||||
if self.is_paused:
|
if self.is_paused:
|
||||||
@ -241,3 +242,5 @@ class PreciseRunner(object):
|
|||||||
self.on_prediction(prob)
|
self.on_prediction(prob)
|
||||||
if self.detector.update(prob):
|
if self.detector.update(prob):
|
||||||
self.on_activation()
|
self.on_activation()
|
||||||
|
t1 = time.time()
|
||||||
|
print("Prediction time: %.4f" % ((t1-t0)))
|
||||||
|
Loading…
Reference in New Issue
Block a user