Repository navigation
Conversation
Replace the label-name list with one row per class: id, a radio button that selects the class for painting, a color swatch, a remove button and an optional name. "Add Class" adds the next free id. A label id that is painted, restored for a revisited image or selected in the napari layer controls gets a row. The color applies to the annotations and the prediction. The remove button erases the class in the current image and refuses when other images of a batch still use it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fix two comments that did not match the code: the order of the row widgets and the class that is selected after a removal. Rewrite the other comments as complete sentences with clear references. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
|
Nice, thanks @titusgriebel. Lemme come back to you later today! (I'll give it a closer review in some) |
constantinpape
self-requested a review
October 16, 2026 15:39
Contributor
|
fyi: I think the idea is good but I will probably have some feedback. Will also review it later. |
constantinpape
left a comment
Contributor
There was a problem hiding this comment.
The functionality is amazing! This makes both object classification and pixel classification much more user-friendly.
There's a few minor points claude found that could or should still be addressed:
- The class colors replace napari's colormap. The layers now always use a DirectLabelColormap, so napari's "shuffle colors" and colormap controls stop doing anything on these layers. This is ok, but would be good to explicitly state in the docs or tooltip.
- Cleanups: The TODO at https://github.com/computational-cell-analytics/micro-sam/blob/dev/micro_sam/sam_annotator/object_classifier.py#L86-L87 can be removed.
- Now redundant function call, see in-line comment.
anwai98
approved these changes
Oct 19, 2026
anwai98
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the great addition @titusgriebel (looks great to me).
I took care of the suggestions from CP and pushed them directly to the PR.
Gonna merge this once the CIs pass!
anwai98
merged commit Oct 19, 2026
207fcdd
into
computational-cell-analytics:dev
3 of 4 checks passed
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.
@anwai98
Replace the label-name list with one row per class: id, a button that selects the class for painting, a color swatch, a remove button and an optional name. "Add Class" adds the next free id. A label id that is painted, restored for a revisited image or selected in the napari layer controls gets a row. The color applies to the annotations layer. The remove button erases the class in the current image and refuses when other images of a batch still use it.
I have been experimenting with this function for some weeks and from my experience, it significantly improves annotation efficiency without adding unnecessary complexity to the GUI.