-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add video inference #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left some comments
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## dev #84 +/- ##
======================================
Coverage ? 96.04%
======================================
Files ? 143
Lines ? 6341
Branches ? 0
======================================
Hits ? 6090
Misses ? 251
Partials ? 0 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request includes several changes to enhance the inference capabilities of the
luxonis_train
module, particularly by adding support for video files and improving the handling of image and video sources. The most important changes include renaming variables for clarity, adding support for video processing, and updating the inference logic to accommodate these improvements.Enhancements to Inference Capabilities:
luxonis_train/__main__.py
: RenamedImgPathType
toSourcePathType
and updated the help text to include video files. Updated theinfer
function to usesource_path
instead ofimg_path
.luxonis_train/core/core.py
: Addedprocess_video
to the imports. DefinedIMAGE_FORMATS
andVIDEO_FORMATS
sets for supported file types. Updated theinfer
method to handle video files and directories containing images.Improvements in Utility Functions:
luxonis_train/core/utils/infer_utils.py
: Addedprocess_video
function to handle video file inference. Refactoredprocess_images
and introducedprepare_and_infer_image
for better code reuse. Updatedrender_visualizations
to optionally return visualizations instead of displaying them.Possible improvements: