Exploring the Application of K-means Machine Learning Algorithm in Fruit Classification - Chen, Weidan (Transactions on Computer Science and Intelligent Systems Research, 2024)
Fruits are very popular in people’s lives because they contain vitamins and dietary fiber, making them an important source of human diet. According to fruit production statistics, global fruit production reaches millions of metric tons, so it is necessary for people to establish an advanced fruit recognition system. However, traditional methods, including physical inspect, are inefficient, labor-intensive, and have a high probability of errors. Based on these facts, developing more efficient classification algorithms is worth exploring, as they can help people classify fruits quickly and effectively. This paper describes an experiment using K-means machine learning algorithm in Python, aiming to classify different types of fruits using image datasets containing various types of fruit images. The K-means algorithm will cluster the fruit image data input from three apple images and three banana images samples as an efficient clustering algorithm. The conclusion that the success rate for apple is 33.3% and the same rate for banana is 66.7% can get from the experiment. Nevertheless, this does not mean K-means will classify banana better than apple absolutely, since many other factors like the fruit color ,image pixel, the unique feature of randomly assigning labels to clusters in the k-means algorithm can also lead to the success or failure of the experiments.