-
Notifications
You must be signed in to change notification settings - Fork 126
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
Velocity block (w/ Byte Tracker) #754
base: main
Are you sure you want to change the base?
Conversation
} | ||
) | ||
type: Literal["roboflow_core/velocity@v1"] | ||
metadata: WorkflowVideoMetadataSelector |
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.
) | ||
pixels_per_meter: Union[float, WorkflowParameterSelector(kind=[FLOAT_KIND])] = Field( # type: ignore | ||
default=1.0, | ||
description="Conversion from pixels to meters. Velocity will be converted to meters per second using this value.", |
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.
I'd add disclaimer, that this might not apply to all scenes and/or all movement directions (due to perspective and camera distortions; i.e. for some field of view 5px far away will result in different speed than 5px near the camera)
description="Predictions", | ||
examples=["$steps.object_detection_model.predictions"], | ||
) | ||
smoothing_alpha: Union[float, WorkflowParameterSelector(kind=[FLOAT_KIND])] = Field( # type: ignore |
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.
We have StabilizeTrackedDetectionsBlock which might be already delivering some functionality that is being achieved here
Also - you can use FLOAT_ZERO_TO_ONE_KIND if this parameter is expected to only store values between (0, 1) - that way the value of parameter will be checked during compilation
Description
Implemented VelocityBlockV1:
Key Features:
List any dependencies that are required for this change.
This requires the input of Byte Track detections and appends the velocity / speed to the detections metadata for use downstream:
Example:
'velocity': {4: [-9.669, 14.509]}, 'speed': {4: 17.432}, 'smoothed_velocity': {4: [-6.033, 9.555]}, 'smoothed_speed': {4: 11.300}}
Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
Unit Tests: