diff --git a/.jules/bolt.md b/.jules/bolt.md new file mode 100644 index 0000000..f686ed1 --- /dev/null +++ b/.jules/bolt.md @@ -0,0 +1,3 @@ +## 2026-04-18 - Ultralytics YOLO verbose Output Overhead +**Learning:** By default, Ultralytics YOLO models log predictions to stdout on every call. In a loop processing multiple pages, synchronous logging blocks the main thread, introducing significant unneeded performance overhead. +**Action:** Always pass `verbose=False` to `model.predict()` when running inference in loops or batch processes unless active debugging is needed. diff --git a/commonforms/inference.py b/commonforms/inference.py index 527925f..8d7b4ef 100644 --- a/commonforms/inference.py +++ b/commonforms/inference.py @@ -124,6 +124,7 @@ def extract_widgets( conf=confidence, augment=False, imgsz=ONNX_IMAGE_SIZE, + verbose=False, ) for p in pages ] @@ -135,6 +136,7 @@ def extract_widgets( augment=True, imgsz=image_size, device=self.device, + verbose=False, ) widgets = {}