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

Add a path deviation analytics block to workflows #682

Merged
merged 37 commits into from
Sep 27, 2024

Conversation

shantanubala
Copy link
Contributor

Description

This PR includes an analytics block that can be useful for analyzing the path or trajectory of detected objects in an image. It implements an algorithm for computing the Fréchet distance between the path of a detected object and an optimal path.

Imagine a person traversing a finite curved path while walking their dog on a leash, with the dog traversing a separate finite curved path. Each can vary their speed to keep slack in the leash, but neither can move backwards. The Fréchet distance between the two curves is the length of the shortest leash sufficient for both to traverse their separate paths from start to finish.

This can be useful for tasks like counting the number of cars taking a left turn, measuring the precision of a baseball pitch, or any other task where you want to measure the extent to which an object deviates from a desired path.

Type of change

Please delete options that are not relevant.

  • 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?

TBD.

Any specific deployment considerations

No specific deployment considerations - it is a workflow block that builds on top of the existing structure.

Docs

  • Docs updated? What were the changes:

@CLAassistant
Copy link

CLAassistant commented Sep 25, 2024

CLA assistant check
All committers have signed the CLA.

def euclidean_distance(point1, point2):
return np.sqrt(np.sum((point1 - point2) ** 2))

def compute_distance(dist_matrix, i, j, path1, path2):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not Familiar with Frechet distance - as part of knowledge sharing, could u run a short session describing details

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would be happy to do that - who would be most helpful to invite to the session?

Copy link
Collaborator

Choose a reason for hiding this comment

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

just fine if you record loom I would watch and ask follow up questions if I have one, I would be fine if you explain the concept of algorithm and some basic details regarding implementation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds good I will record a Loom to share tomorrow 👍

@shantanubala shantanubala dismissed PawelPeczek-Roboflow’s stale review September 26, 2024 15:53

I just had a chance to address your comments - can you take another look? Thank you!

@shantanubala shantanubala changed the title Add a line following analytics block to workflows Add a path deviation analytics block to workflows Sep 26, 2024
@shantanubala shantanubala marked this pull request as ready for review September 26, 2024 18:12
@grzegorz-roboflow grzegorz-roboflow merged commit a74f740 into main Sep 27, 2024
57 checks passed
@grzegorz-roboflow grzegorz-roboflow deleted the sb/add-line-follow branch September 27, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants