Classifying colours with machine learning

Shi Cheng has studied neural networks-based biocolor and artificial color classification using reflectance spectra in his Master’s thesis, carried out in the University of Eastern Finland and within BioColour-project.

Traditionally colours are classified to belong to biologically or synthetically originated groups with physical and chemical methods. As I study in the field of computer science, I wanted to test some new methods for classifying colours. The KNN and SVM models are common classification algorithms used in the field of machine learning to distinguish between target objects. The BP-network also serves the same purpose. In my research I conducted experiments with each of the above three approaches and tried to find the best method.

This research work aimed to find an accurate method for classifying between biocolor and artificial color using spectral data, by comparing Backpropagation network (BP-network) with K-nearest neighbors (KNN) model and Support Vector Machine (SVM) model. First, a dataset of reflection spectrum, which contains 219 biocolors and 803 artificial colors, was collected and preprocessed. The wavelength interval was from 400nm to 700nm and the wavelength resolution was 10nm. Then the dataset was trained by BP-network, KNN model and SVM model separately. I applied different parameters and used PCA (Principal Components Analysis) in every method to find the best method with highest accuracy.

Comparing the results I got from the three experiments, the conclusion is that all of the tested methods can achieve a high accuracy after optimized. The accuracy of BP-network wass 98.35%, KNN model was 95.43% and SVM model was 92.22%. Therefore, the BP-network had the best performance in analyzing this dataset and distinguishing biocolours from artificial colours.

The classification results achieved in this MSc thesis belong to the larger research topic in which we study colour, especially biocolour, classification and clustering. There are several thesis workers whose topics are linked to each other and are supervised by the Professor of Data Science, Xiao-Shi Gao. “BioColour project gives us very nice application area, in which we learn a lot from the whole consortium”, says Professor Markku Hauta-Kasari, responsible leader of the computational spectral imaging research group in BioColour, at UEF.

Writer: Shi Cheng, Master of Science, University of Eastern Finland