mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 06:55:28 +03:00
fix: fix mypy
This commit is contained in:
parent
36a08a9af5
commit
0c40b4b1ac
@ -430,7 +430,11 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
|
|||||||
"""Run inference in a separate thread to avoid blocking."""
|
"""Run inference in a separate thread to avoid blocking."""
|
||||||
try:
|
try:
|
||||||
with self.interpreter_lock:
|
with self.interpreter_lock:
|
||||||
if self.interpreter is None:
|
if (
|
||||||
|
self.interpreter is None
|
||||||
|
or not self.tensor_input_details
|
||||||
|
or not self.tensor_output_details
|
||||||
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
input = np.expand_dims(crop, axis=0)
|
input = np.expand_dims(crop, axis=0)
|
||||||
@ -513,6 +517,9 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
|
|||||||
f"{self.model_config.name}: Publishing sub_label={consensus_label} for object {object_id} on {camera}"
|
f"{self.model_config.name}: Publishing sub_label={consensus_label} for object {object_id} on {camera}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not self.model_config.object_config:
|
||||||
|
return
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self.model_config.object_config.classification_type
|
self.model_config.object_config.classification_type
|
||||||
== ObjectClassificationType.sub_label
|
== ObjectClassificationType.sub_label
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user