Open
Conversation
Collaborator
Author
|
Additional TODOs spotted:
EDIT: Naaaah, we are trying to bring single slice segmentation back! ;) |
Collaborator
Author
|
Another comment: I figured out the error for 3d annotator (finally) I'll debug it quickly and try to fix it! |
Collaborator
Author
|
It's fixed now! @constantinpape Can you give it a shot? (by pulling the latest state here and https://github.com/computational-cell-analytics/SAM2_Experiments/pull/43) |
Contributor
|
I gave it a try and it seems to work better now but is still not very stable. What I tried:
|
Contributor
|
I also tried with a box prompt first -- the result looked much better, but trying to add more prompts fails with a similar error as before. |
* Test claude code by implementing 'Segment Slice' for SAM2 in the 3D annotator (not yet checked) * Refactor per-slice segmentation into PromptableSegmentation3D class Move SAM2 single-slice segmentation logic from _widgets.py into the PromptableSegmentation3D class for better encapsulation and reusability. This consolidates all SAM2 segmentation functionality in the v2 module. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Refactor SAM2 inference state initialization to use volume directly Replace disk-based frame initialization with direct volume passing in AnnotatorState. This aligns with PromptableSegmentation3D implementation and removes unnecessary disk I/O overhead. Changes: - Remove _sam2_temp_dir attribute - Simplify _initialize_sam2_inference_state to pass volume directly - Remove temporary file cleanup from clear_inference_state Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Simplify and add notes * Clean up * Fix axis order --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
…cell-analytics/micro-sam into add-sam2-backbone
* Enable precomputing and loading image embeddings * Remove debugging artefacts * Ensure mandatory embeddings to video predictor * Make set_precomputed work with expected signature compatibility * Move volumetric promptable segmentation to state and flush prompts at commit or clear * Switch to running interactive_segmenter for segment_slice feature * Update micro_sam/sam_annotator/_widgets.py * Refactor sam model getter to state to support hvit in python function and CLI --------- Co-authored-by: Constantin Pape <constantin.pape@informatik.uni-goettingen.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds preliminary (and super dirty) integration of SAM2 to our annotator.
As the current status:
Also, keeping @constantinpape and @caroteu in loop!