This commit is contained in:
John Vandenberg
2024-02-18 06:01:50 +08:00
committed by GitHub
parent 617c728a88
commit 3cff3a086b
13 changed files with 23 additions and 24 deletions

View File

@@ -105,10 +105,10 @@ class Rknn(DetectionApi):
if (config.model.width != 320) or (config.model.height != 320):
logger.error(
"Make sure to set the model width and heigth to 320 in your config.yml."
"Make sure to set the model width and height to 320 in your config.yml."
)
raise Exception(
"Make sure to set the model width and heigth to 320 in your config.yml."
"Make sure to set the model width and height to 320 in your config.yml."
)
if config.model.input_pixel_format != "bgr":

View File

@@ -25,7 +25,7 @@ def detect_gfx_version():
def auto_override_gfx_version():
# If environment varialbe already in place, do not override
# If environment variable already in place, do not override
gfx_version = detect_gfx_version()
old_override = os.getenv("HSA_OVERRIDE_GFX_VERSION")
if old_override not in (None, ""):
@@ -116,7 +116,7 @@ class ROCmDetector(DetectionApi):
# untested
self.model = migraphx.parse_tf(path)
else:
raise Exception(f"AMD/ROCm: unkown model format {path}")
raise Exception(f"AMD/ROCm: unknown model format {path}")
logger.info("AMD/ROCm: compiling the model")
self.model.compile(
migraphx.get_target("gpu"), offload_copy=True, fast_math=True

View File

@@ -43,7 +43,7 @@ class TestUserPassMasking(unittest.TestCase):
self.rtsp_log_message = "Did you mean file:rtsp://user:password@192.168.1.3:554"
def test_rtsp_in_log_message(self):
"""Test that the rtsp url in a log message is espaced."""
"""Test that the rtsp url in a log message is escaped."""
escaped = clean_camera_user_pass(self.rtsp_log_message)
print(f"The escaped is {escaped}")
assert escaped == "Did you mean file:rtsp://*:*@192.168.1.3:554"

View File

@@ -347,7 +347,7 @@ def yuv_to_3_channel_yuv(yuv_frame):
# flatten the image into array
yuv_data = yuv_frame.ravel()
# create a numpy array to hold all the 3 chanel yuv data
# create a numpy array to hold all the 3 channel yuv data
all_yuv_data = np.empty((height, width, 3), dtype=np.uint8)
y_count = height * width
@@ -575,7 +575,7 @@ def intersection_over_union(box_a, box_b):
# compute the intersection over union by taking the intersection
# area and dividing it by the sum of prediction + ground-truth
# areas - the interesection area
# areas - the intersection area
iou = inter_area / float(box_a_area + box_b_area - inter_area)
# return the intersection over union value