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

Video metadata in workflows #590

Merged
merged 7 commits into from
Aug 22, 2024

Conversation

PawelPeczek-Roboflow
Copy link
Collaborator

Description

In this PR I try to add video metadata to workflows to make it possible for stateful stream- / video- processing blocks to operate.

We have two options basically:

  • add optional fields for WorkflowImage input
  • create additional type of batch-oriented input with metadata

The latter is more elegant imo, does not break bckw compatibility and is also a proof that adding new types of inputs (batch of text data to process by LMM model) will be easily possible.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

YOUR_ANSWER

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

@@ -1083,7 +1092,8 @@ def decode_video_frame_to_buffer(
buffer: Queue,
decoding_pace_monitor: sv.FPSMonitor,
source_id: Optional[int],
fps: float = 0,
fps: Optional[float] = 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should make it None as default since it`s marked as optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

inference/core/workflows/execution_engine/entities/base.py Outdated Show resolved Hide resolved
@@ -140,6 +161,65 @@ def _assembly_input_image(
)


def assembly_video_metadata(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assembly is noun, are we preferring verbs for method names? (i.e. assemble instead of assembly)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return result


def _assembly_video_metadata(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably prefer assemble instead of assembly in method name

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit 8ae7652 into main Aug 22, 2024
58 checks passed
@PawelPeczek-Roboflow PawelPeczek-Roboflow deleted the feature/stream_metadata_in_workflows branch August 22, 2024 10:44
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