feat: media API (video/bbox/thumbnail), UUID unification, dot matrix text, portal fixes, API dictionary V1.3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user