Skip to content

Fix/yolo getting started docs#1385

Open
LIKHITHA-NAGRAJ wants to merge 7 commits intodora-rs:mainfrom
LIKHITHA-NAGRAJ:fix/yolo-getting-started-docs
Open

Fix/yolo getting started docs#1385
LIKHITHA-NAGRAJ wants to merge 7 commits intodora-rs:mainfrom
LIKHITHA-NAGRAJ:fix/yolo-getting-started-docs

Conversation

@LIKHITHA-NAGRAJ
Copy link

@LIKHITHA-NAGRAJ LIKHITHA-NAGRAJ commented Mar 1, 2026

This PR improves the Getting Started Python operator dataflow example with better visualization, stability, and real-time performance observability.
Changes

  • Headless CI fix: Set QT_QPA_PLATFORM=offscreen before cv2 import so the example runs in GitHub Actions without a display
  • Dynamic reshape: Changed hardcoded (480, 640, 3) to (-1, CAMERA_WIDTH, 3) so it works on any camera resolution
    Empty bbox fix: Changed np.array([]) to np.zeros((0, 6)) to prevent crash when no objects are detected
  • Clean metadata: Passing {} instead of dora_event["metadata"] fixes the Arrow type conversion error
  • Performance overlay: Added real-time FPS and AI latency display
    Readable labels: Added filled background rectangle behind label text
  • Optimized inference: Using imgsz=320 reduces latency significantly

BEFORE
Screenshot (85)
AFTER
Screenshot (153)

@LIKHITHA-NAGRAJ
Copy link
Author

LIKHITHA-NAGRAJ commented Mar 1, 2026

I've implemented the headless display fix and dynamic image reshaping across plot.py, object_detection.py, and webcam.py.
26/27 checks are passing. The remaining failure in CI / CLI Test (ubuntu-latest) is an internal timeout in the receive_data_with_sleep node caused by telemetry connection failures to 127.0.0.1:4317 — this is unrelated to the YOLO example changes in this PR.
Local testing on Windows shows AI latency dropping from ~863ms to ~53–150ms after switching to imgsz=320. Screenshots attached.
Could a maintainer please review when available? Happy to make any requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant