Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

uint8, not int8, working now

Rory Clear1f014779e522
diff --git a/yolov8.py b/yolov8.py
index bb9edca..c30bb79 100644
--- a/yolov8.py
+++ b/yolov8.py
@@ -385,7 +385,7 @@ class YOLORequestHandler(BaseHTTPRequestHandler):
content_length = int(self.headers.get('Content-Length', 0))
img = self.rfile.read(content_length)
- im = Tensor(img, dtype=dtypes.int8)
+ im = Tensor(img, dtype=dtypes.uint8)
pred = do_inf(im).numpy()
response_data = struct.pack('<1800f', *pred)
diff --git a/yolov8_uvicorn.py b/yolov8_uvicorn.py
index e3803cb..3106671 100644
--- a/yolov8_uvicorn.py
+++ b/yolov8_uvicorn.py
@@ -403,7 +403,7 @@ class ASGIApp:
more_body = message.get("more_body", False)
# Inference
- im = Tensor(body, dtype=dtypes.int8)
+ im = Tensor(body, dtype=dtypes.uint8)
pred = do_inf(im).numpy()
response_data = struct.pack('<1800f', *pred)