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

Sv detections in core blocks #392

Conversation

grzegorz-roboflow
Copy link
Contributor

Description

Migrate blocks to use sv.Detections for storing results of inference.
Non-standard fields (i.e. key-points, parent_id, etc.) are stored in data

supervision added to list of dependencies.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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

Workflows created to test each block

Any specific deployment considerations

N/A

Docs

Docs need to be updated

@grzegorz-roboflow grzegorz-roboflow marked this pull request as draft May 13, 2024 18:52
@@ -93,10 +129,11 @@ def anchor_prediction_detections_in_parent_coordinates(

def anchor_detections_in_parent_coordinates(
Copy link
Collaborator

Choose a reason for hiding this comment

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

[loud thinking] what happens with parent detection when we want to modify a detection? is not that expected that when we shift or filter - the exact same thing happens for parent?
could we even address this with sv.Detections? at first, I thought about having it nested somehow, but that seems to be hacky and unclear as the idea. Getting into conclusion that maybe we should just keep shift_x, shift_y as metadata of each detection and only execute this op when needed (basically the only need is while output construction) - then the processing gets more light-weight, as we do not need to perform laborious ops each step

Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Choose a reason for hiding this comment

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

We need to get rid of outputs like parent_id, image, prediction_type from blocks:

  • YoloWorld
  • RoboflowInstanceSegmentationModelBlock
  • RoboflowKeypointDetectionModelBlock
  • RoboflowObjectDetectionModelBlock
  • BarcodeDetectorBlock
  • QRCodeDetectorBlock

as those can be hidden within sv.Detections

the same applies for detections consensus - but not sure of that one was changed

@grzegorz-roboflow grzegorz-roboflow marked this pull request as ready for review May 20, 2024 12:06
Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Choose a reason for hiding this comment

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

LGTM, but please make changes to explicitly require keys that are not optional to avoid silent contract break

@grzegorz-roboflow grzegorz-roboflow merged commit e32e349 into feature/sv_detections_in_workflows May 20, 2024
1 check passed
@grzegorz-roboflow grzegorz-roboflow deleted the sv-detections-in-core-blocks branch May 20, 2024 12:43
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