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

Support images multiple segments #46

Open
ungi opened this issue May 11, 2023 · 1 comment
Open

Support images multiple segments #46

ungi opened this issue May 11, 2023 · 1 comment

Comments

@ungi
Copy link
Member

ungi commented May 11, 2023

We need to start supporting multiple segments by one-hot encoding, multi-channel model outputs, and softmax instead of sigmoid final activation. Robert tried this on his dataset by modifying our code, and he says it was quite simple to do.

I think Single Slice Segmentation exports different segments as different values, so that may need to be converted to one-hot encoding later by one of the scripts. The safest place to do this would be in the training script. But we may need to modify the prepare_data script too. Multi-value segmentation arrays should only be resized using nearest neighbor interpolation. Standard image resize functions can interpolate between values (if a new pixel position falls between two old pixel positions). But interpolated non-integer values cannot be later converted using one-hot encoding.

@lassoan
Copy link
Collaborator

lassoan commented May 12, 2023

FYI, Slicer supports segmentarion data with one-hot encoding (one volume for each segment) and softmax activation ("provability" value encoded at 8 bits per voxel). You can import, visualize, export segmentation in this representation (@Sunderlandkyl even implemented interactive editing of segmentations in this representation.

The representation is called "Fractional labelmap".

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

No branches or pull requests

2 participants