feat: media API (video/bbox/thumbnail), UUID unification, dot matrix text, portal fixes, API dictionary V1.3

This commit is contained in:
Warren
2026-05-06 13:34:49 +08:00
parent e75c4d6f07
commit 74b6182eba
197 changed files with 17511 additions and 8759 deletions

View File

@@ -268,8 +268,21 @@ def process_yolo(
if publisher:
publisher.info("yolo", "YOLO_LOADING_MODEL")
# Load YOLOv8 model
model = YOLO("yolov8n.pt")
# Load YOLO model (prefer CoreML for ANE acceleration, fallback to PyTorch)
model_path_mlpackage = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "..", "yolov5nu.mlpackage"
)
model_path_pt = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "..", "yolov5nu.pt"
)
if os.path.exists(model_path_mlpackage):
model = YOLO(model_path_mlpackage)
print("YOLO: CoreML model loaded (4.5x ANE acceleration)")
elif os.path.exists(model_path_pt):
model = YOLO(model_path_pt)
print("YOLO: PyTorch model loaded")
else:
model = YOLO("yolov5nu.pt") # will auto-download
# Get video info
import cv2