项目作者: rojinnew

项目描述 :
This tool divides an image to a number of segments. The segmentation is based on color.
高级语言: Python
项目地址: git://github.com/rojinnew/image_segmentation.git
创建时间: 2021-03-20T14:00:20Z
项目社区:https://github.com/rojinnew/image_segmentation

开源协议:

下载


Image Segmentation Tool


Image segmentation tool is a web-based application that divides an image into a given number of components and simplifies the image.




Kmeans

In this work, all similar points were clustered together and their values were substituted with the mean values which were calculated based on Kmeans clustering.


The objective function for Kmeans clustering could be written as:






xij are rgb values.


rij in {0, 1} assigned as 1 ,if only sample i assigned to cluster j. Otherwise, it is 0. At each iteration, in the first step, we keep the cluster centers fixed and assign each data point to the closest cluster center. This assignment could be written as:



We can form clusters S1 ,…, Sk using the value assigned to rij.
In the second step, we keep rij fixed and we minimize the objective function with respect to μk.




As long as the algorithm does not converge (algorithm converges when the assignments are not changed or maximum iteration reached), in both steps, we minimized the J.

#### Accessing the Tool


You can access the image segmentation tool using the following link:



https://colorclustering.herokuapp.com/

Running

You can install the required libraries listed in requirements.txt and start up the server in that src directory using the following command:

python app.py

http://localhost:5000/