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

Segmentation #4

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Segmentation #4

merged 4 commits into from
Aug 26, 2024

Conversation

stefanv
Copy link
Member

@stefanv stefanv commented Aug 25, 2024

No description provided.

@stefanv stefanv marked this pull request as ready for review August 26, 2024 04:59
@stefanv stefanv merged commit 13cf4f5 into scikit-image:main Aug 26, 2024
1 check passed

Think of Michaelangelo, carving the statue of David. The block of marble is *segmented* into foreground and background. In this case, the background is discarded, and only the work of art remains.

To be useful, segmentation has to be followed by *measurement* and *interpretation*. We measure attributes of the segments, and then interpret those measurements to ask some question. Ultimately, we want to know: are the cells healthy, or is the part manufactured correctly, or is the land flooded.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
To be useful, segmentation has to be followed by *measurement* and *interpretation*. We measure attributes of the segments, and then interpret those measurements to ask some question. Ultimately, we want to know: are the cells healthy, or is the part manufactured correctly, or is the land flooded.
To be useful, segmentation has to be followed by *measurement* and *interpretation*. We measure attributes of the segments, and then interpret those measurements to answer some question. Ultimately, we want to know: are the cells healthy, or is the part manufactured correctly, or is the land flooded.

or 'try and answer'


Let's consider that second block, the segmentation algorithm, for a moment.

Scikit-image implements several *heuristic* algorithms for segmentation. I.e., these are typically *unsupervised*, based on rules around properties of the image / pixels, rather than on labeling examples of objects and non-objects. Neural network approaches, such as U-Net, DeepLab, and Mask R-CNN have proved very effective for segmenting images, given enough training data. These are likely what would be used in practice, unless sufficient labeled data is unavailable.
Copy link
Member

Choose a reason for hiding this comment

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

The double negative is twisting my brains... "unless not enough labeled data are available?"


How shall we go about representing segmentations? We already know how to use `numpy` to represent images. Can we use the same concept here?

Yes, we can create a *label* image, of the same size as the segmented image, with each value getting a different value.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Yes, we can create a *label* image, of the same size as the segmented image, with each value getting a different value.
Yes, we can create a *label* image, of the same shape as the segmented image, with each segment getting a different value.

Maybe a "labels" image/array? E.g., see
from typing import Annotated

ImageData = Annotated[np.ndarray, 'image']
LabelsData = Annotated[np.ndarray, 'labels']
CoordsData = Annotated[np.ndarray, 'coordinates']

from https://github.com/scikit-image/skimage-archive/blob/main/grants/2022_CZI_EOSS5/full_application.md

ax[2].set_title('labels');
```

Notice that "labels" is just a NumPy array with integer values. We have to be careful to interpret it as labels and not as an image.
Copy link
Member

Choose a reason for hiding this comment

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

See, "labels."

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

Successfully merging this pull request may close these issues.

2 participants