Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor engine v2 #206

Merged
merged 37 commits into from
Jun 17, 2024
Merged

Refactor engine v2 #206

merged 37 commits into from
Jun 17, 2024

Conversation

MateoLostanlen
Copy link
Member

Refactoring for PTZ Camera Integration

Overview

This PR proposes a refactor of the code to prepare for the use of PTZ cameras. It includes two main features:

  1. New ReolinkCamera Class: This class allows control of both PTZ cameras and static cameras.
  2. Optimized Processing: Implements multiprocessing for image capture while retaining normal execution for prediction and processing. This approach addresses the issues found with multiprocessing and onnxruntime running together.

Changes

  • ReolinkCamera Class: Integrated for both PTZ and static cameras.
  • Multiprocessing for Image Capture: Improved efficiency by using multiprocessing for capturing images.
  • Normal Execution for Prediction and Processing: Maintained normal execution to avoid performance issues observed with the previous approach.
  • Updated SystemController: Optimized the handling of capturing, analyzing, and processing camera streams.

Details

  • The previous PR (Refactor engine #194) introduced the initial changes for PTZ camera integration but was not merged due to performance issues with the multiprocessing approach. This refactor addresses those issues, ensuring smooth and efficient operation.
  • The new implementation has been tested thoroughly to ensure it works without any issues.

Additional Changes

  • README Update: Added an example for setting up the credentials.json file with dummy values, and made minor adjustments to improve clarity and accuracy.
  • Environment Configuration: Updated the required Python version to 3.8 and removed references to outdated dependencies.
  • Badge Fixes: Corrected CI and documentation badges to reflect the current status.

Sorry for the big PR, but these changes were essential to ensure everything works together smoothly.

RonanMorgan
RonanMorgan previously approved these changes Jun 17, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 86.12717% with 24 lines in your changes missing coverage. Please review.

Project coverage is 92.38%. Comparing base (d8d6082) to head (b1d9221).
Report is 1 commits behind head on develop.

Files Patch % Lines
pyroengine/core.py 80.48% 16 Missing ⚠️
pyroengine/sensors.py 89.18% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #206      +/-   ##
===========================================
+ Coverage    88.69%   92.38%   +3.69%     
===========================================
  Files            6        6              
  Lines          398      486      +88     
===========================================
+ Hits           353      449      +96     
+ Misses          45       37       -8     
Flag Coverage Δ
unittests 92.38% <86.12%> (+3.69%) ⬆️

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.

@MateoLostanlen MateoLostanlen merged commit 16fa010 into develop Jun 17, 2024
13 of 14 checks passed
@MateoLostanlen MateoLostanlen deleted the refactor_engine_v2 branch June 17, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants