Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 2 additions & 0 deletions commonforms/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def extract_widgets(
conf=confidence,
augment=False,
imgsz=ONNX_IMAGE_SIZE,
verbose=False,
)
for p in pages
]
Expand All @@ -135,6 +136,7 @@ def extract_widgets(
augment=True,
imgsz=image_size,
device=self.device,
verbose=False,
)

widgets = {}
Expand Down