mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-07 22:05:44 +03:00
ruff format
This commit is contained in:
parent
4570808030
commit
14f7d27274
@ -372,10 +372,7 @@ class MemryXDetector(DetectionApi):
|
|||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
# Wait for a frame from the queue with timeout to check stop_event periodically
|
# Wait for a frame from the queue with timeout to check stop_event periodically
|
||||||
frame = self.capture_queue.get(
|
frame = self.capture_queue.get(block=True, timeout=0.5)
|
||||||
block=True,
|
|
||||||
timeout=0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
return frame
|
return frame
|
||||||
|
|
||||||
@ -390,11 +387,8 @@ class MemryXDetector(DetectionApi):
|
|||||||
"""Retrieve processed results from MemryX output queue + a copy of the original frame"""
|
"""Retrieve processed results from MemryX output queue + a copy of the original frame"""
|
||||||
try:
|
try:
|
||||||
# Get connection ID with timeout
|
# Get connection ID with timeout
|
||||||
connection_id = (
|
connection_id = self.capture_id_queue.get(
|
||||||
self.capture_id_queue.get(
|
block=True, timeout=1.0
|
||||||
block=True,
|
|
||||||
timeout=1.0
|
|
||||||
)
|
|
||||||
) # Get the corresponding connection ID
|
) # Get the corresponding connection ID
|
||||||
detections = self.output_queue.get() # Get detections from MemryX
|
detections = self.output_queue.get() # Get detections from MemryX
|
||||||
|
|
||||||
@ -410,7 +404,6 @@ class MemryXDetector(DetectionApi):
|
|||||||
|
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
|
||||||
def post_process_yolonas(self, output):
|
def post_process_yolonas(self, output):
|
||||||
predictions = output[0]
|
predictions = output[0]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user