Add object detection, tracking, mobile notifications, and search to any security camera.
clean yolo again..
roryclearf56539e8f4a9
diff --git a/yolov8.py b/yolov8.pyindex af1a4b5..bb9edca 100644--- a/yolov8.py+++ b/yolov8.py@@ -357,29 +357,6 @@ def get_weights_location(yolo_variant: str) -> Path:if not f32_weights.exists(): convert_f16_safetensor_to_f32(weights_location, f32_weights)return f32_weights-from http.server import BaseHTTPRequestHandler, HTTPServer-import struct-class YOLORequestHandler(BaseHTTPRequestHandler):- def do_POST(self):- if self.path != "/yolo":- self.send_response(404)- self.end_headers()- self.wfile.write(b"Not Found")- return-- content_length = int(self.headers.get('Content-Length', 0))- img = self.rfile.read(content_length) # Read and ignore input data- im = Tensor(img,dtype=dtypes.int8)- pred = do_inf(im).numpy()- response_data = struct.pack('<1800f', *pred)-- self.send_response(200)- self.send_header('Content-Type', 'application/octet-stream')- self.send_header('Content-Length', str(len(response_data)))- self.end_headers()- self.wfile.write(response_data)--@TinyJitdef do_inf(image):image = image.reshape(1, 640, 640, 3)