Skip to content

Conversation

@Sycritz
Copy link
Owner

@Sycritz Sycritz commented Dec 2, 2025

Summary

This draft PR introduces the initial work for upgrading the camera subsystem and preparing the inference pipeline for multimodel support.
The PR is not ready for merge and is being opened early to track progress, surface the diff, and avoid losing work.


Completed Work

1. Multithreading Fixes

  • Refactored camera access logic to improve thread safety.
  • Introduced proper locking around frame reads to avoid race conditions.
  • Initial validations done; further testing is required.

2. Logging Infrastructure

  • Added structured logging inside the Camera and CameraCenter classes.
  • Integrated parent/child logger pattern for per-camera logging.
  • Logs now capture camera ID, status, and retry events.
  • Core logging logic implemented; polishing and formatting still pending.

Partially Completed / In Progress

3. Healthy Frame Retrieval

  • Added code path for returning only healthy frames.
  • Logic incomplete: still need to finish camera-side get_healthy_frame() or refine CameraCenter.get_healthy_frames().
  • Current version falls back to older behavior until completed and tested.

4. Multimodel Inference Refactor

  • Early prep for transitioning from single-model inference to supporting multiple models.
  • No functional refactor yet — only minor scaffolding added.
  • Full implementation planned after completing camera pipeline stabilization.

Known Issues

  • Some parts of the new logging or multithreading logic may be untested or incomplete due to wrapping up late.
  • Healthy-frame flow is not integrated end-to-end yet.
  • Certain branches still use legacy code paths to avoid breaking the pipeline.

Next Steps Before Marking Ready for Review

  • Finalize healthy frame retrieval implementation.
  • Validate multithreading logic under load.
  • (Major) Refactor inference class for multimodel support.
  • Add missing tests for retry logic, camera health checks, and logger propagation.
  • Clean up temporary fallbacks and legacy handling.

Notes

This PR is intentionally left as a draft until:

  • all components are implemented,
  • tested,
  • and verified to not break the current RTSP → pipeline flow.

Further commits will be pushed incrementally as the work continues.

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.

2 participants