You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functionalities currently available in supervision.utils.video should be reimplemented and consolidated within a new Video class. Importantly, all features supported by the old video API must remain available in the new implementation.
get video info (works for files, RTSP, webcams)
importsupervisionassv# static videosv.Video("source.mp4").info# video streamsv.Video("rtsp://...").info# webcamsv.Video(0).info
Please share a Google Colab with minimal code to test the new feature. We know it's additional work, but it will speed up the review process. The reviewer must test each change. Setting up a local environment to do this is time-consuming. Please ensure that Google Colab can be accessed without any issues (make it public). Thank you! 🙏🏻
Mark all methods from the old video API as deprecated. Find examples of already deprecated methods or classes in the current codebase and use the same approach to mark the old video API methods. A deprecation period of at least 5 releases is required.
Reimplement the internals of the old video API using the new video API.
Provide full unit-test coverage matching existing test style.
Update the library docs (docstrings, mkdocs) to reflect the new API.
Description
The functionalities currently available in
supervision.utils.videoshould be reimplemented and consolidated within a newVideoclass. Importantly, all features supported by the old video API must remain available in the new implementation.get video info (works for files, RTSP, webcams)
simple frame iteration (object is iterable)
advanced frame iteration (stride, sub-clip, on-the-fly resize)
process the video
overwrite target video parameters
complete manual control with explicit
VideoInfomulti-backend support decode/encode; implement PyAV and OpenCV
suggested minimal protocol
Additional