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

Update boundary detection in FSD feature extraction #1143

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

FattanePourakpour
Copy link
Collaborator

np.argwhere does not trace boundaries accurately; instead, trace_object_boundaries is used.

@cooperlab
Copy link
Contributor

@FattanePourakpour please address the complex curvature problem also mentioned in Issue #1139 and then let's look at getting the tests to pass.

Most tests compare to stored values so we would need to generate new values since the new algorithm is fundamentally changed.

@manthey
Copy link
Contributor

manthey commented Nov 1, 2024

@FattanePourakpour I see you have some commits why say "black". The codebase predates the existence of black and uses flake8 and autopep8. tox -e format will apply the autopep8 rules. They differ from black (for instance, preferring single quotes), and linting will fail with black's rules.

@FattanePourakpour
Copy link
Collaborator Author

@manthey thank you for the clarification. I will do tox -e format and commit again.

@manthey
Copy link
Contributor

manthey commented Dec 4, 2024

@FattanePourakpour The CI is failing because the test_compute_fsd_features no longer matches the stored ground truth file. We can update the ground truth to match the new values if they are what we expect.

@FattanePourakpour
Copy link
Collaborator Author

@manthey Yes, since the new algorithm has fundamentally changed, the ground truth needs to be updated to match the new values for the tests to pass.
Please let me know if there’s anything I can assist with.

Fix an issue where the fsd feature boundaries could vary because of a
failure to check or guard bounds.
@manthey
Copy link
Contributor

manthey commented Dec 9, 2024

@FattanePourakpour I merged master and updated ground truth values. One thing that took me a while was that the trace_object_boundaries expects the edges to be false so that it can avoid checking bounds in the cython code. I added some code to ensure this, as otherwise we were accessing arbitrary memory (and the tests were flaky, though that seems like a success at the detecting it).

If you are content with my changes and have the authority to do so, go ahead and merge.

@cooperlab
Copy link
Contributor

@manthey thank you. We will look at this to see how we can update testing in the future.

This is a fundamental change in the feature extraction so we need to note that the values will be very different in the release (different but correct and likely better).

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.

3 participants