webknossos
webknossos copied to clipboard
First version of SAM skeleton prediction
URL of deployed dev instance (used for testing):
- https://___.webknossos.xyz
Steps to test:
- Create an annotation and trace some part of some cell with a skeleton. A node or multiple nodes should be present for each few slices. Multiple nodes represent multiple positive input points for SAM.
- Hover one of the nodes and open the context menu. In the menu select the "Annotate Nodes with SAM" option.
- From there follow the instructions. The instructions should be sufficient to guide the user through the rest of the feature. If anything seems unclear, please include this in the feedback to improve the UX as good as possible.
- Please review the text of the modal & tooltip :)
Bugs:
- [x] Trying an undo action after a skeleton sam prediction results in an error
TODOs:
- [x] Support for all OrthoViewports
- [x] Make the whole prediction a single volume undo step
- [x] Make the interpolation a single volume undo step
- [x] Add a progress bar to the modal
- [x] Add a loading indication during the interpolation step
- [x] Ensure that the UI blocking animation is shown before the first interpolation block the UI
Bugs:
- [x] Interpolation is executed regardless of whether the user closes the toast or clicks its button
Concerns:
- [ ] After the prediction when the user corrects the prediction, this creates further annotation manipulation actions that are pushed onto the undo stack. As the stack has a max of 20 undo steps and navigating the prediction via "jump to next node" creates a new annotation action and therefore an undo stack entry, the undo step for the prediction might be pushed out of the stack pretty fast. Therefore, undoing a bad prediction might be a hassle once a few node navigations are done by the user. -> Not the best UX in my opinion...
- Consider this in a follow up PR
Issues:
- fixes #7541
(Please delete unneeded items, merge only when none are left open)
- [ ] Updated changelog
- [ ] Updated documentation if applicable
- [ ] Removed dev-only changes like prints and application.conf edits
- [ ] Considered common edge cases