Rename to detect_api

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
Nate Meyer 2022-08-15 21:27:45 -04:00 committed by Nate Meyer
parent 2c6e96d9f7
commit dc0b2d62ae

View File

@ -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(