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

Min-Cut on Agglomerate Graph #6361

Merged
merged 27 commits into from
Sep 8, 2022
Merged

Min-Cut on Agglomerate Graph #6361

merged 27 commits into from
Sep 8, 2022

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Jul 29, 2022

Min-cut on agglomerate graph.

URL of deployed dev instance (used for testing):

Steps to test:

  • activate the Proofreading tool on an annotation with agglomerate mapping
  • select a source node, right-click on a target node and "Perform Min-Cut between these Nodes"

Backend

  • new route POST /volume/:tracingId/agglomerateGraphMinCut expects positions of two nodes between which to calculate the min-cut.
  • sample request on an editable mapping on the test-agglomerate-file dataset:
POST http://localhost:9000/tracings/volume/827b9540-a45c-4c9a-965a-dafd193ab21a/agglomerateGraphMinCut?token=secretSampleUserToken
Body: {"segmentPosition1":[77, 77, 39],"segmentPosition2":[77, 73, 80],"mag":[1,1,1],"agglomerateId":1,"editableMappingId":"1a2ed917-39f1-4d52-8ece-b6e98fb3ec49"}
  • returned [{"segmentId1":1,"segmentId2":3,"position1":[77,77,39],"position2":[77,73,80]},{"segmentId1":1,"segmentId2":49,"position1":[77,77,39],"position2":[87,100,70]},{"segmentId1":1,"segmentId2":56,"position1":[77,77,39],"position2":[80,149,94]},{"segmentId1":1,"segmentId2":58,"position1":[77,77,39],"position2":[91,107,76]},{"segmentId1":1,"segmentId2":63,"position1":[77,77,39],"position2":[83,64,59]},{"segmentId1":1,"segmentId2":76,"position1":[77,77,39],"position2":[105,101,62]},{"segmentId1":1,"segmentId2":82,"position1":[77,77,39],"position2":[96,89,66]},{"segmentId1":1,"segmentId2":88,"position1":[77,77,39],"position2":[104,53,51]},{"segmentId1":3,"segmentId2":34,"position1":[77,73,80],"position2":[62,122,87]}]

Issues:


@fm3 fm3 self-assigned this Jul 29, 2022
@fm3 fm3 marked this pull request as ready for review September 1, 2022 13:45
@fm3 fm3 changed the title [WIP] min-cut on agglomerate graph Min-Cut on Agglomerate Graph Sep 1, 2022
@fm3 fm3 requested a review from jstriebel September 1, 2022 13:59
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

awesome! didn't test, yet, but the code itself already looks very good. still, I've left some feedback :)

frontend/javascripts/oxalis/view/context_menu.tsx Outdated Show resolved Hide resolved
frontend/javascripts/oxalis/view/context_menu.tsx Outdated Show resolved Hide resolved
frontend/javascripts/oxalis/model/sagas/proofread_saga.ts Outdated Show resolved Hide resolved
frontend/javascripts/oxalis/model/sagas/proofread_saga.ts Outdated Show resolved Hide resolved
frontend/javascripts/oxalis/model/sagas/proofread_saga.ts Outdated Show resolved Hide resolved
@philippotto
Copy link
Member

testing went really well 👍 unfortunately, i could only test it on https://agglomerategraphmincut.webknossos.xyz/datasets/sample_organization/test-agglomerate-file/view and not on a big segmentation, but splitting was really fun 👍

Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

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

Nice, backend mostly LGTM, just left one comment 👍

@@ -545,7 +560,6 @@ class VolumeTracingController @Inject()(
_ <- bool2Fox(request.body.length == 1) ?~> "Editable mapping update group must contain exactly one update group"
updateGroup <- request.body.headOption.toFox
_ <- bool2Fox(updateGroup.version == currentVersion + 1) ?~> "version mismatch"
_ <- bool2Fox(updateGroup.actions.length == 1) ?~> "Editable mapping update group must contain exactly one update action"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there anything else we should be aware of? E.g. are the actions applied in the order intended? Can the frontend now also send multiple actions in one group?

Copy link
Member Author

Choose a reason for hiding this comment

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

I’d say this should work as is. For this particular update group, the order should actually not matter, as it deletes all the edges of the cut.
Multiple actions in one group is exactly what is now possible. It still has to be one group.

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

great, frontend looks good 👍

@philippotto philippotto merged commit 4f32e6f into master Sep 8, 2022
@philippotto philippotto deleted the agglomerate-graph-min-cut branch September 8, 2022 14:56
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.

Min-cut for super voxel graphs
4 participants