Conversation
ashwanirathee
commented
Sep 19, 2021
- covers mean shift image segmentation algorithm
timholy
left a comment
There was a problem hiding this comment.
I hadn't noticed these (they arrived back when I wasn't paying attention), thanks for adding this!
| # - We have specify a prior on the number of clusters(Number of K which is no of | ||
| # segments). |
There was a problem hiding this comment.
| # - We have specify a prior on the number of clusters(Number of K which is no of | |
| # segments). | |
| # - We have specify a prior on the number `K` of clusters (segments). |
| # but has two main issues: | ||
| # - We have specify a prior on the number of clusters(Number of K which is no of | ||
| # segments). | ||
| # - It can be sensitive to value of k-means parameter. |
There was a problem hiding this comment.
This seems not entirely surprising. Is it really worth making as a separate point?
It could also be stated that K-means tends to return clusters of approximately equal radius, which may not be how a human would do it.
| # - Each hill represents a cluster | ||
| # - Peak(mode) of hill represents "center" of the cluster | ||
| # - Each pixel climbs the steepest hill within its neighborhood | ||
| # - Pixel assigned to the hill(cluster) it climbs. That's the idea behind meanshift. |
There was a problem hiding this comment.
| # - Pixel assigned to the hill(cluster) it climbs. That's the idea behind meanshift. | |
| # - A pixel is assigned to the hill(cluster) it climbs. |
I think the "idea behind meanshift" encompasses all of these points.
| # The Manhattan Distance is another useful choice sometimes. | ||
| # - A radius. All pixels within this radius (measured according the above distance) | ||
| # will be accounted for the calculation. | ||
| # - A value difference. From all pixels inside radius r, we will take only those |
There was a problem hiding this comment.
Would "intensity" be clearer than "value"?
| # - Set $m_i = f_i$ as initial mean fro each pixel idea | ||
| # - Repeat the following for each mean mi: | ||
| # - place window of size $w$ around $m_i$. | ||
| # - compute centroid m within the window set $mi = main$ |
| # Task: Find modes(clusters) of distribution. | ||
|
|
||
| # Clustering: | ||
| # - Set $m_i = f_i$ as initial mean fro each pixel idea |
There was a problem hiding this comment.
| # - Set $m_i = f_i$ as initial mean fro each pixel idea | |
| # - Set $m_i = f_i$ as initial mean for each pixel |
|
|
||
| # Clustering: | ||
| # - Set $m_i = f_i$ as initial mean fro each pixel idea | ||
| # - Repeat the following for each mean mi: |
There was a problem hiding this comment.
Use the same notation. Is mi the same as $m_i$?
| # - stop if shift in mean $m_i$ is less than a threshoold $\epsilon$, $m_i$ is the mode | ||
|
|
||
| # It's a very simple but computationally expensive method which doesn't require input of | ||
| # the number of clusters. Very robust to outliers and clustering depends on window size w. |
There was a problem hiding this comment.
Technically, one could say that it replaces specification of # of clusters with the size of the radius.