mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Rename to detect_api
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
parent
2c6e96d9f7
commit
dc0b2d62ae
@ -41,12 +41,12 @@ class LocalObjectDetector(ObjectDetector):
|
|||||||
self.labels = load_labels(labels)
|
self.labels = load_labels(labels)
|
||||||
|
|
||||||
if det_type == DetectorTypeEnum.edgetpu:
|
if det_type == DetectorTypeEnum.edgetpu:
|
||||||
self.detectApi = EdgeTpuTfl(det_device=det_device, model_path=model_path)
|
self.detect_api = EdgeTpuTfl(det_device=det_device, model_path=model_path)
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"CPU detectors are not recommended and should only be used for testing or for trial purposes."
|
"CPU detectors are not recommended and should only be used for testing or for trial purposes."
|
||||||
)
|
)
|
||||||
self.detectApi = CpuTfl(model_path=model_path, num_threads=num_threads)
|
self.detect_api = CpuTfl(model_path=model_path, num_threads=num_threads)
|
||||||
|
|
||||||
def detect(self, tensor_input, threshold=0.4):
|
def detect(self, tensor_input, threshold=0.4):
|
||||||
detections = []
|
detections = []
|
||||||
@ -63,7 +63,7 @@ class LocalObjectDetector(ObjectDetector):
|
|||||||
return detections
|
return detections
|
||||||
|
|
||||||
def detect_raw(self, tensor_input):
|
def detect_raw(self, tensor_input):
|
||||||
return self.detectApi.detect_raw(tensor_input=tensor_input)
|
return self.detect_api.detect_raw(tensor_input=tensor_input)
|
||||||
|
|
||||||
|
|
||||||
def run_detector(
|
def run_detector(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user