Skip to content

Extract standalone pyro_predictor package#331

Open
MateoLostanlen wants to merge 8 commits intodevelopfrom
extranal_predictor
Open

Extract standalone pyro_predictor package#331
MateoLostanlen wants to merge 8 commits intodevelopfrom
extranal_predictor

Conversation

@MateoLostanlen
Copy link
Copy Markdown
Member

The detection core (YOLO inference + temporal sliding-window state) was tightly coupled inside pyroengine, which depends on pyroclient, requests, and other
API-related libraries. This made it impossible to use the predictor in external code (evaluation scripts, custom pipelines, CI benchmarks) without pulling
in the full engine stack.

Changes

New package: pyro-predictor/

A self-contained Python package with minimal dependencies (numpy, pillow, onnxruntime, ncnn, opencv, tqdm — no pyroclient, no requests):

  • pyro_predictor/predictor.py — Predictor class: YOLO inference + per-camera sliding-window state management (_update_states)
  • pyro_predictor/vision.py — Classifier class: NCNN/ONNX model loading and inference
  • pyro_predictor/utils.py — box_iou, nms, letterbox and helpers

Both Predictor and Classifier accept a verbose=False parameter to suppress all log output (the package uses a named logger pyro_predictor.* instead of
configuring the root logger, following library best practice).

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 63.63636% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.59%. Comparing base (d0a36cd) to head (9b96e87).

Files with missing lines Patch % Lines
pyroengine/__init__.py 21.42% 11 Missing ⚠️
pyroengine/engine.py 83.33% 4 Missing ⚠️
pyroengine/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #331      +/-   ##
===========================================
- Coverage    80.19%   72.59%   -7.61%     
===========================================
  Files            7        7              
  Lines          828      602     -226     
===========================================
- Hits           664      437     -227     
- Misses         164      165       +1     
Flag Coverage Δ
unittests 72.59% <63.63%> (-7.61%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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