Conversation
LiveReview Pre-Commit Check: ran (iter:3, coverage:82%)
LiveReview Pre-Commit Check: ran (iter:2, coverage:100%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
PR Summary by QodoFix optional onnxruntime import, IMX500 dummy results, and model resolution
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
In src/vision/yolo_cpu.py:
import cv2
+import numpy as np
+import onnxruntime as ort
src/vision/yolo_cpu.py now imports onnxruntime at module import time, so importing vision
modules can crash with ModuleNotFoundError in environments where onnxruntime is intentionally
optional. This can also indirectly affect IMX500 code paths because yolo_imx500.py imports
Detection from yolo_cpu.py.
In src/vision/yolo_imx500.py:
Action required
Imx500Detector.infer() now returns DummyResults even when metadata/IMX500 is unavailable, but
DummyResults.boxes is a DummyBoxes without len. VideoCapture calls
len(self.latest_results.boxes) and len(results.boxes) unconditionally in overlay/photo-capture
paths, which will raise TypeError at runtime.