Skip to content

Commit

Permalink
readme.md changed
Browse files Browse the repository at this point in the history
  • Loading branch information
metinmertakcay committed Feb 2, 2020
1 parent 2e64942 commit 9a89952
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
Binary file added Images_Readme/Distance Function.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images_Readme/Experimental Result.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images_Readme/PRI.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images_Readme/RI.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Superpixel number K is given as input parameter before SLIC algorithm is execute

The distance between cluster center and pixels are different from the Euclidean distance. Firstly, the color distance value was found. The distance was calculated by finding the square root of the difference between the pixel value in the cluster center and the pixel value examined. Secondly, the pixel coordinate distance was calculated. The distance was calculated by finding the square root of the difference between the pixel coordinates of the cluster center and the pixel coordinate value examined. In addition, there is a coefficient indicating the compactness value of the superpixel (m). This coefficient is multiplied by the coordinate distance. After this process, the pixel value distance and pixel coordinate distance were added and the distance value was obtained.

<p align="center">
<img src="/Images_Readme/Distance Function.JPG" alt="Distance Function" width="400" height="120">
</p>

## Region Merge
Region merge is an algorithm which is used to merge fields with similar properties. The small and homogeneous areas generated by the SLIC algorithm are combined using region merge algorithm. In the process of region merge, how to merge regions and where to start merging them is an important problem.

Expand All @@ -30,20 +34,33 @@ The Rand Index (RI) was used for clustering evaluation. It shows similarity betw
- a, The number of pixel pairs in S1 and S2 from the same object
- b, The number of pixel pairs in S1 and S2 on different object

<p align="center">
<img src="/Images_Readme/RI.JPG" alt="RI" width="120" height="120">
</p>

The probabilistic rand index (PRI) is the average of all RI values of an image segmented by different people.

<p align="center">
<img src="/Images_Readme/PRI.JPG" alt="PRI" width="400" height="120">
</p>

## Hyperparameters
Various hyperparameters were used during superpixels seperation and merge processes. Hyperparameters were determined according to the success achieved in a small set selected in test set. The number of superpixels to be generated by the SLIC algorithm was selected as 9000. The superpixel count was kept as large as possible. As the superpixel size increases, the number of pixels in the superpixel decreases. In this way, the representation of small areas in the image is provided.

In the SLIC algorithm, each pixel is assigned to a cluster. The decisive criteria for the assignment to the cluster is the distance function. The distance is the sum of the pixel color and the pixel coordinate distances. Multiplied by a certain coefficient (m / initial superpixel area) to reduce the effect of color coordinate distance when calculate total distance. When m is large, spatial proximity is more important and the resulting superpixels are more compact. When m is small, the resulting superpixels adhere more tightly to image boundaries, but have less regular size and shape. The m value is chosen as 10 which is widely used.

Two different methods were used for region merge process. In the first method, histogram was extracted for each superpixel region. The calculated superpixel histograms were compared with neighboring superpixels. If the similarity between two histograms are less than 0.5, the superpixel regions were combined. RGB was used as color space. Each channel can have a value between 0 and 256. During histogram extraction, the number of bin-size 256 can be selected, but the superpixel area will be small and therefore some areas within the histogram will remain blank so the number of bin-size was chosen as 8. In the second method, the average grayscale value of pixels in the superpixel were calculated. If the mean grayscale value of two superpixels are less than 20, the regions are combined.

## Results
<p align="center">
<img src="/Images_Readme/Experimental Result.JPG" alt="Experimental Result" width="400" height="120">
</p>

## Conclusion
i worked over image segmentation with SLIC and region merge. Images are divided into superpixels using SLIC algorithm. The number of superpixels which are determined at the beginning affect the area of the superpixels to be created. Large number of superpixels mean oversegmentation. With region merge algorithm, superpixels with similar properties are merged and by this method, unnecessary separated superpixels are removed and oversegmentation is eliminated.
I worked over image segmentation with SLIC and region merge. Images are divided into superpixels using SLIC algorithm. The number of superpixels which are determined at the beginning affect the area of the superpixels to be created. Large number of superpixels mean oversegmentation. With region merge algorithm, superpixels with similar properties are merged and by this method, unnecessary separated superpixels are removed and oversegmentation is eliminated.

In order to improve performance of segmentation method used, in the future, different color spaces will be tried and new combining criteria will be established to determine whether superpixels will be merged. In addition, a global optimum result will be sought by hyperparameter-tuning. Furthermore, success comparisons will be made using different evaluation criteria like variation of information and segmentation covering.

## OUTPUT
[Click to see input images.](/Images)
## OUTPUTS
[Click to see input images.](/Images) <br/>
[Click to see results.](/Output)

0 comments on commit 9a89952

Please sign in to comment.