-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Segmentation #4
Conversation
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See, "labels."
No description provided.