This is an open access article under the CC BY license: Al-Khwarizmi Engineering Journal Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, December, (2023) P. P. 67- 77 Development of an ANN Model for RGB Color Classification using the Dataset Extracted from a Fabricated Colorimeter Shahad A. Mnati* Furat I. Hussein** Ahmed Issa*** *, **Department of Mechatronics Engineering/ Al-Khwarizmi College of Engineering/ University of Baghdad, Baghdad/ Iraq *** Department, Faculty of Engineering and Information Technology/Mechatronics and Medical Devices Engineering Al- Azhar University โ€“ Gaza/ Gaza 1277/ Palestine Corresponding Author: *Email: shahed.ali1202a@kecbu.uobaghdad.edu.iq **Email: furatnejjar@uobaghdad.edu.iq ***Email: a.issa@alazhar.edu.ps (Received 21 May 2023; accepted 11 September 2023) https://doi.org/10.22153/kej.2023.09.003 Abstract Codes of red, green, and blue data (RGB) extracted from a lab-fabricated colorimeter device were used to build a proposed classifier with the objective of classifying colors of objects based on defined categories of fundamental colors. Primary, secondary, and tertiary colors namely red, green, orange, yellow, pink, purple, blue, brown, grey, white, and black, were employed in machine learning (ML) by applying an artificial neural network (ANN) algorithm using Python. The classifier, which was based on the ANN algorithm, required a definition of the mentioned eleven colors in the form of RGB codes in order to acquire the capability of classification. The software's capacity to forecast the color of the code that belongs to an object under detection is one of the results of the proposed classifier. The work demanded the collection of about 5000 color codes which in turn were subjected to algorithms for training and testing. The open-source platform TensorFlow for ML and the open-source neural network library Keras were used to construct the algorithm for the study. The results showed an acceptable efficiency of the built classifier represented by an accuracy of 90% which can be considered applicable, especially after some improvements in the future to makes it more effective as a trusted colorimeter. Keywords: Colorimeter, RGB classifier, ANN, TensorFlow, ML. 1. Introduction Advanced methods like ML algorithms can be employed to address the color classification issue. Neural network methods are replacing older statistical methods and algorithms in the field of machine vision. Due to weak planning, the latter encounters numerous challenges that raise obstacles when developing an ML model for the computer vision system. Executives frequently set challenging goals for the data science team during the planning process. Neural network techniques, as opposed to conventional algorithms, are typically quite beneficial for certain challenges [1]. One of the simplest non-parametric methods of color recognition is color categorization, utilizing the K-Nearest Neighbors (KNN) algorithm with feature extraction. Most real-world datasets do not conform to mathematical theoretical assumptions and this will be very useful in practice. Classification is widely regarded as one of the most extensively studied problems within the domains of ML and data mining. Despite its well- established status in the field of ML, classification encounters challenges such as effectively managing missing data [2]. The K-mean algorithm mailto:shahed.ali1202a@kecbu.uobaghdad.edu.iq mailto:furatnejjar@uobaghdad.edu.iq mailto:a.issa@alazhar.edu.ps https://doi.org/10.22153/kej.2023.09.003 Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 68 is another well-known ML approach that can be used to extract colors from photographs and categorize each image from a collection of images based on color space values. Any color space can be utilized such as RGB, CYMK, HSV, etc. [3]. Kusumo B.S. et al. [4] used RGB image processing properties in classifying corn diseases, which are one of Indonesia's most significant crops. Oriented FAST and rotated BRIEF (ORB), scale-invariant feature transform (SIFT), and speeded-up robust features were used to extract the features (SURF). The categorization was performed using Decision Tree (DT), Naive Bayes (NB), Support Vector Machines (SVM), and Random Forest (RF). Behera S.K. et al. [5] have classified disease and the severity of disease in oranges using the SVM algorithm with the assistance of the K-mean clustering approach and fuzzy logic. The suggested framework demonstrated an accuracy of 90% in illness categorization and severity assessments. Kumari, R. S. S. et al. [6] attempted a traditional method of classifying fruit that relies on manual operations and visual acuity. The SVM classifiers classify based on statistical and co-occurrence features derived from the wavelet transform. The accuracy of classification for the proposed system is 95.3%. Panigrahi, K.P. et al. [7] proposed machine learning methods such as Decision Tree (DT), Random Forest (RF), Support Vector Machine (SVM), Naive Bayes (NB), and K-Nearest Neighbor (KNN) to be used to diagnose crop diseases using plant images. When compared to other classification algorithms, the RF algorithm obtains the highest accuracy of 79.23%. Hameed, N. et al. [8] followed a method of intelligent digital diagnosis that improved the classification precision of multiple diseases. The diagnostic accuracy is 96.47% using a Multi-Class Multi-Level (MCML) classification algorithm evaluated on 3672 classified images collected from various sources. Nagata, T. et al. [9] classified skin tears using a machine learning method to identify the skin layers using digital RGB color and subsequently treat the wound. The determination of the wound layer showed an accuracy of 74% and 71% for the SVM and RF respectively. The aim of the current study is to employ the ANN algorithm in order to build an ML model that acts as a classifier and has a good opportunity to predict the colors of different objects based on datasets extracted from a lab-fabricated colorimeter. 2. Materials and Methods 2.1 Dataset Collection The dataset employed in the study was extracted from an RGB colorimeter device (figure 1) implemented in the lab using a number of low-cost electronics, electrical parts, and other complementary components. In this process, the fabricated colorimeter was designed with specific consideration and high precision to measure the RGB values of a number of colored samples in order to use these values as input for the proposed ANN model. The number of tested samples is about 5000 cards of colored paper stamped with standard names for wallpaper and paint companies in Iraq, namely Jotun, Al-Marjan, Al-Yaqut, and Jazeera. The colorimeter was used to record the code of each inspected colored card as RGB code and save it as a comma-separated values (csv) file. Fig. 1. The fabricated colorimeter and standard colored cards 2.2 RGB and Color Spaces In essence, a color space is a collection of colors that assist in reproducing analog and digital representations of color along with physical device profiling. Another way to think of color spaces is as an abstract mathematical model that enables the representation of colors as numbers [10]. The RGB system-dependent color space is represented by 24- bit, with 8 bits allotted to each single channel of R, G, and B. As a result, the range of values for each channel is 0 to 255. All colors can be represented Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 69 using various red, green, and blue hues, according to this color space paradigm. 2.3 ANN Technology ANN is essentially a mathematical representation of a process that was created empirically rather than by employing mass and energy balances surrounding the process. A neural network is made up of a network of partially interconnected processing units, or nodes, structured in layers, much like the neurons in the brain. They also feature connections between the nodes of subsequent layers. The fundamental structure of a single neuron or node is within a neural network model with inputs, activation functions, and a single output. Weights are calculated values that represent the relationships between nodes [11, 12]. Figure 2 shows a schematic diagram of a fundamental neural network where ๐‘Œ๐‘– is the output, and W are the weights that represent the "strength" of the connections between the neurons. Each neuron in the hidden layer receives weighted inputs plus bias from each neuron in the preceding layer [13]: Fig. 2. Schematic diagram of fundamental neural network [12] ๐‘๐‘– = โˆ‘ ๐‘‹๐‘˜ ๐‘—โˆ’1๐‘Š๐‘˜,๐‘– โˆ’ ๐‘๐‘˜ ๐‘๐‘—โˆ’1 ๐‘˜=1 โ€ฆ (1) where ๐‘Š๐‘˜,๐‘–is the weight of the link between ๐‘›๐‘œ๐‘‘๐‘’ and all the nodes in the preceding layers, ๐‘๐‘˜ is the bias to the node, ๐‘๐‘—โˆ’1 is the number of nodes in layer ๐‘— โˆ’ 1, and ๐‘‹๐‘˜ ๐‘—โˆ’1 signifies the input which in this case is the (RGB) values from the ๐‘˜ โˆ’ ๐‘กโ„Ž node in the ๐‘— โˆ’ ๐‘กโ„Ž layer. The summation of equation 1 is fed to the activation function, which generates the node's output, which is calculated as ๐‘Œ๐‘– = ๐‘“(๐‘๐‘–) which is one of the eleven fundamental color categories (red, green, orange, yellow, pink, purple, blue, brown, grey, white, or black). The activation function for each layer in the neural network (NN) model is a rectified linear unit (ReLU) which has been applied in the current work. The activation functions are used to introduce non-linearity in order to assist the NN in learning complex data patterns. 2.4 Performance Metrics Various metrics are employed for the estimation of an ANN performance and quality. Performance metrics were considered in this study for evaluating the performance of the ML model. Different metrics are used in evaluating the performance of the model such as accuracy, precision, recall, and F1score [14, 15]: 2.4.1 Accuracy (Acc): The accuracy of a model determines how well it classifies the target variable. The accuracy of the selected model is given as follows [16]: ๐ด๐‘๐‘ = ๐‘‡๐‘ƒ + ๐‘‡๐‘ ๐‘‡๐‘ƒ + ๐‘‡๐‘ + ๐น๐‘ƒ + ๐น๐‘ โ€ฆ (2) where TP is the total positive which refers to the number of accurately labeled positive samples, TN is total negative which refers to the number of negative samples that have been accurately classified, FP is the false positive which refers to the misclassification of negative samples as positive, and FN is the false negative which refers to the misclassification of positive samples as negative. 2.4.2 Precision (Prec) is the proportion of correctly predicted positives to the total number of positive observations predicted. A low rate of false positives is correlated with precision [16]: ๐‘ƒ๐‘Ÿ๐‘’๐‘ = ๐‘‡๐‘ƒ ๐‘‡๐‘ƒ + ๐น๐‘ƒ โ€ฆ (3) 2.4.3 Recall (Rec): is the proportion of positively predicted observations to the total number of observations in the actual class. In general, recall values above 0.5 are considered acceptable [16]: ๐‘…๐‘’๐‘ = ๐‘‡๐‘ƒ ๐‘‡๐‘ƒ + ๐น๐‘ โ€ฆ (4) 2.4.4 F1 Score (F1S): is the harmonic mean of precision and recall, it is a more accurate measurement than precision [16]: ๐น1S = 2 ร— ๐‘ƒ๐‘Ÿ๐‘’๐‘ โˆ’ ๐‘…๐‘’๐‘ ๐‘ƒ๐‘Ÿ๐‘’๐‘ + ๐‘…๐‘’๐‘ โ€ฆ (5) where F1-Score is the most effective measurement when the target's classification is imbalanced. Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 70 2.4.5 Confusion matrix: is used to summarize the performance of the ANN algorithm. To discriminate between the RGB classes (black, white, โ€ฆ, etc.), the actual colors are assigned to positive and negative. However, the prediction colors are assigned to true for and false for no damage [17] as shown in Figure 3. The primary goal of the model is to optimize the true positives and true negatives, while minimizing the false positives and false negatives to achieve optimal performance. The total number of predictions is equal to the summation of TP, TN, FP and FN. Fig. 3. confusion matrix for a binary classifier. 2.5 Methodology Development for ANN In short, an ANN model consists of five layers stacked sequentially. Each layer is composed of a number of neurons. Each neuron of the first layer takes the input feature (the red, green, and blue values), multiplies it by its initial weight, calculates the total number of each neuron together with the bias, and then passes it through the activation function to the next layer of neurons, giving the result again as an input to the next layer. Figure 4 shows the segments of the proposed ANN as follows: ๏‚ท The initial layer consists of three neurons, which collectively possess a total of 12 parameters. These parameters include 9 weights and three biases. The second layer, consisting of 24 neurons, contains a total of 96 parameters. These parameters are comprised of 72 weights and 24 biases. 2.6 Analytical Framework Python v2.13.0 was used to build, train, and validate the model using TensorFlow v2.13.0 and Keras libraries. TensorFlow uses a single data flow diagram to represent all machine learning computations and states. The experimental data collected from the colorimeter device is employed as an input for the ML algorithm. The ANN model has five layers. It is a densely connected neural network in the dense layer, also known as a fully connected layer, and is a fundamental component of neural networks. It is characterized by a deep interconnection structure, wherein each neuron within the dense layer receives input from every neuron in the preceding layer. The dense layer is employed in this model, making it a widely utilized component. The dense layer conducts matrix-vector multiplication in the underlying process. The values employed within the matrix are, in fact, parameters that possess the capability to be trained and adjusted through the utilization of backpropagation. Fig. 4. The proposed ANN configuration. Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 71 Fig. 5. The methodology of the proposed ANN. Fig. 6. Confusion matrix correlation before training. Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 72 3. Results and Discussion Results are obtained through a number of sequential steps in order to achieve and present the color classification. In the first step, the dataset is obtained from the measurement of the colored cards using the fabricated colorimeter and by recording the RGB codes manually. After that, preprocessing is applied in order to label and modify the null data. The training and validation phase is the subsequent step which is started by adjusting the classification settings of the algorithm. The prediction phase comes in order to confirm the accuracy of the trained model. Eventually, the performance metrics for the algorithm are applied with a view to evaluate results. Figure 6 shows the manner of data correlation before the training phase. The graphical correlation of the RGB data is presented in this section. It is important to mention that the dataset was split into training data, testing data, and the setup of the ANN layers which requires the use of proper neural network settings to get better results. The confusion matrix is used to evaluate the performance of a classifier using Python software. Actual labels are represented by rows, while the predicted labels are represented by columns. To get better classification results, the ANN algorithm was adjusted at certain settings such as the number of epochs = 5001, verbose=0, batch_size = 2048, and validation_split = 0.2. The relationship between training and validation versus the no. epochs are shown in figure 6. Here, the โ€˜Epochsโ€™ means the number of times at which the model iterates over the entire x and y data while training. Batch size is the number of samples after which the parameters are updated while training. Verbose is used for displaying the training progress. Fig. 7. The accuracy of the training process of the ANN model. Moreover, the loss of the ANN model is shown in figure 6 which indicates that the accuracy is improving during the training phase. Also, it can be seen that both training and validation accuracies are matched at 90% which means that the classification algorithm is efficient. Fig. 8. The loss of the training process of the ANN model. In addition to the training and validation of the data, the built and saved ANN model was used in the prediction phase. Figure 9a shows the visualization of the actual values and the predicted values based on the ANN model training data. The visualization of the actual values and predicted values of the tested data after using the ANN model showed an acceptable match as seen in figure 9b. (a) (b) Fig. 9. The prediction of the trained model and b) tested model. Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 73 Figure 10 shows the confusion matrix of the trained data for the labeled color. Looking at the first value (158) gives a piece of information that the model predicts the presence of 158 unique shades of red. As seen in the figure, the first pink value in the sixth row is 16, which means there are 16 instances of pink incorrectly identified as red. Table 1 tabulates the values of performance measures for the trained data. It can be seen that the ML model correctly predicts the color green 96% of the time, as well as other colors with different percentages, with an accuracy of 89% for all eleven classes. Table 1, The performance measures the trained model. Fig. 10. Confusion matrix correlation after training. Figure 11 shows the confusion matrix of the tested data for labeled colors. It is well known that this model predicts the existence of thirty-six unique shades represented by the first value of red (36). The first pink value in the sixth row is six, which means that there were 6 instances in which pink was incorrectly identified as red. Table 2 tabulates the values of the performance measures of the tested data. It can be seen that the ML model correctly predicts the color green 94% of the time, as well as other colors with different percentages, and has an accuracy of 90% for all eleven classes. Precision Recall F1score Support Red 0.79 0.83 0.81 190 Green 0.96 0.95 0.95 1168 Blue 0.94 0.93 0.93 885 Yellow 0.87 0.80 0.83 225 Orange 0.81 0.83 0.82 167 Pink 0.89 0.83 0.86 451 Purple 0.82 0.86 0.84 450 Brown 0.84 0.91 0.87 311 Grey 0.73 0.80 0.76 144 Black 0.88 0.88 0.88 16 White 0.70 0.58 0.64 24 Accuracy 0.89 4004 Macro avg 0.84 0.84 0.84 4004 Weighted avg 0.89 0.89 0.89 4004 Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 74 The general evaluation of the trained model is good with acceptable performance represented by an accuracy of 89% which may be improved by working with more epochs. The tested data showed an accuracy of 90% and better performance metrics in the colors green, blue, black, white, and purple. Fig. 11. Confusion matrix correlation after testing. Table 2, The performance measures the tested model. 4. Conclusion In this work, a proposed ANN model offers a non-parametric, user-friendly, comprehensive alternative to traditional statistical methods used in classifying RGB colors. About 5000 samples of RGB colors were utilized to create the dataset by applying measurements to a number of standard colored cards through a lab-designed and implemented colorimeter. The dataset has been preprocessed to eliminate some unidentified samples that are considered null data. The established neural network has been well set to provide a better classification of ANN settings. The whole amount of data was split into 80% trained data and 20% tested data. The data has been trained and validated with a high level of accuracy and performance. The results exhibit that the classification of unknown color grades can be applied with an accuracy of 90% which can be Precision Recall F1score Support Red 0.70 0.95 0.81 22 Green 0.94 0.96 0.95 150 Blue 0.96 0.93 0.94 109 Yellow 0.83 0.68 0.75 28 Orange 0.81 0.72 0.76 18 Pink 0.85 0.87 0.86 47 Purple 0.90 0.89 0.90 64 Brown 0.90 0.79 0.84 34 Grey 0.80 0.91 0.85 22 Black 1.00 1.00 1.00 7 White 1.00 1.00 1.00 4 Accuracy 0.90 505 Macro avg 0.88 0.88 0.88 505 Weighted avg 0.90 0.90 0.90 505 Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 75 extended to more than 11 classes of colors and different datasets. The proposed model can be utilized as a reference in choosing and identifying the proper color in many applications such as car painting, by linking the colorimeter with the color mixers in order to mix the three primary RGB colors into any grade of the eleven previously mentioned colors. References [1] J. Sainui and P. Pattanasatean, โ€œColor Classification based on Pixel Intensity Values,โ€ 2018 19th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), Jun. 2018, doi: 10.1109/snpd.2018.8441141. [2] A. A. Soofi and A. M. Awan, โ€œClassification techniques in Machine Learning: Applications and issues,โ€ Journal of Basic and Applied Sciences, vol. 13, pp. 459โ€“465, Jan. 2017, doi: 10.6000/1927-5129.2017.13.76. [3] S. Lassri, E. H. Benlahmar, and A. Tragha, โ€œA review of Machine Learning Algorithms for web page Classification,โ€ 2018 IEEE 5th International Congress on Information Science and Technology (CiSt), Oct. 2018, doi: 10.1109/cist.2018.8596420. [4] B. S. Kusumo, A. Heryana, O. Mahendra, and H. F. Pardede, โ€œMachine Learning-based for Automatic Detection of Corn-Plant Diseases Using Image Processing,โ€ 2018 International Conference on Computer, Control, Informatics and Its Applications (IC3INA), Nov. 2018, doi: 10.1109/ic3ina.2018.8629507. [5] S. K. Behera, L. Jena, A. K. Rath, and P. K. Sethy, โ€œDisease Classification and Grading of Orange Using Machine Learning and Fuzzy Logic,โ€ 2018 International Conference on Communication and Signal Processing (ICCSP), Apr. 2018, doi: 10.1109/iccsp.2018.8524415. [6] R. S. S. Kumari and V. Gomathy, โ€œFruit Classification using Statistical Features in SVM Classifier,โ€ International Conference on Electrical Energy Systems (ICEES), Feb. 2018, doi: 10.1109/icees.2018.8442331. [7] K. P. Panigrahi, H. Das, A. K. Sahoo, and S. C. Moharana, โ€œMaize leaf disease detection and classification using machine learning algorithms,โ€ in Advances in intelligent systems and computing, 2020, pp. 659โ€“669. doi: 10.1007/978-981-15-2414-1_66. [8] N. Hameed, A. M. Shabut, M. Ghosh, and M. A. Hossain, โ€œMulti-class multi-level classification algorithm for skin lesions classification using machine learning techniques,โ€ Expert Systems With Applications, vol. 141, p. 112961, Mar. 2020, doi: 10.1016/j.eswa.2019.112961. [9] T. Nagata, S. Noyori, H. Noguchi, G. Nakagami, A. Kitamura, and H. Sanada, โ€œSkin tear classification using machine learning from digital RGB image,โ€ Journal of Tissue Viability, vol. 30, no. 4, pp. 588โ€“593, Nov. 2021, doi: 10.1016/j.jtv.2021.01.004. [10] A. Mary, Z. Bilal, and Z. Saad, โ€œFace Recognition and Emotion Recognition from Facial Expression Using Deep Learning Neural Network,โ€ ResearchGate, Nov. 2020, [Online]. Available: https://www.researchgate.net/publication/346 007138_Face_Recognition_and_Emotion_Re cognition_from_Facial_Expression_Using_D eep_Learning_Neural_Network [11] A. H. Mary, A. H. Miry, T. Kara, and M. H. Miry, โ€œNonlinear state feedback controller combined with RBF for nonlinear underactuated overhead crane system,โ€ Journal of Engineering Research 9.3A (2021). https://doi.org/10.36909/jer.v9i3A.9159 [12] E. Arce-Medina and J. I. Paz-Paredes, โ€œArtificial neural network modeling techniques applied to the hydrodesulfurization process,โ€ Mathematical and Computer Modelling, vol. 49, no. 1โ€“2, pp. 207โ€“214, Jan. 2009, doi: 10.1016/j.mcm.2008.05.010. [13] J. Maitre, K. Bouchard, and L. P. Bรฉdard, โ€œMineral grains recognition using computer vision and machine learning,โ€ Computers & Geosciences, vol. 130, pp. 84โ€“93, Sep. 2019, doi: 10.1016/j.cageo.2019.05.009. [14] C. Kirankaya and L. G. Aykut, โ€œTraining of artificial neural networks with the multi- population based artifical bee colony algorithm,โ€ Network: Computation in Neural Systems, vol. 33, no. 1โ€“2, pp. 124โ€“142, Apr. 2022, doi: 10.1080/0954898x.2022.2062472. [15] D. Hemavathi and H. Srimathi, โ€œRetraction Note to: Effective feature selection technique in an integrated environment using enhanced principal component analysis,โ€ Journal of https://www.researchgate.net/publication/346007138_Face_Recognition_and_Emotion_Recognition_from_Facial_Expression_Using_Deep_Learning_Neural_Network https://www.researchgate.net/publication/346007138_Face_Recognition_and_Emotion_Recognition_from_Facial_Expression_Using_Deep_Learning_Neural_Network https://www.researchgate.net/publication/346007138_Face_Recognition_and_Emotion_Recognition_from_Facial_Expression_Using_Deep_Learning_Neural_Network https://www.researchgate.net/publication/346007138_Face_Recognition_and_Emotion_Recognition_from_Facial_Expression_Using_Deep_Learning_Neural_Network Shahad A. Mnati Al-Khwarizmi Engineering Journal, Vol. 19, No. 4, P.P. 67- 77 (2023) 76 Ambient Intelligence and Humanized Computing, vol. 14, no. S1, p. 535, Jun. 2022, doi: 10.1007/s12652-022-04239-4. [16] P. V. Chandrika and K. Srinivasan, โ€œPredicting stock market movements using artificial neural networks,โ€ Universal Journal of Accounting and Finance, vol. 9, no. 3, pp. 405โ€“410, Jun. 2021, doi: 10.13189/ujaf.2021.090315. [17] J. Meiyazhagan, S. Sudharsan, A. Venkatasen, and M. Senthilvelan, โ€œPrediction of occurrence of extreme events using machine learning,โ€ European Physical Journal Plus, vol. 137, no. 1, Dec. 2021, doi: 10.1140/epjp/s13360-021-02249-3. (2023) 67-77ุŒ ุตูุญุฉ 4ุŒ ุงู„ุนุฏุฏ19ุงู„ู…ุฌู„ุฏ ุงู„ุฎูˆุงุฑุฒู…ูŠ ุงู„ู‡ู†ุฏุณูŠุฉุฌู„ุฉ ู…ุดู‡ุฏ ุนู„ูŠ ู…ู†ุงุชูŠ 77 RGBู„ูˆุงู† ุงู„ู„ุชุตู†ูŠู ุฃ (ANN)ุงู„ุดุจูƒุฉ ุงู„ุนุตุจูˆู†ูŠุฉ ุงุงู„ุตุทู†ุงุนูŠุฉ ุชุทูˆูŠุฑ ู†ู…ูˆุฐุฌ ู…ุตู†ุนู…ุฌู…ูˆุนุฉ ุงู„ุจูŠุงู†ุงุช ุงู„ู…ุณุชุฎุฑุฌุฉ ู…ู† ู…ู‚ูŠุงุณ ุฃู„ูˆุงู† ุจุงุณุชุฎุฏุงู… **ูุฑุงุช ุงุจุฑุงู‡ูŠู… ุญุณูŠู† *ุดู‡ุฏ ุนู„ูŠ ู…ู†ุงุชูŠ ***ุญู…ุฏ ุนูŠุณู‰ุฃ ุงู„ู…ูŠูƒุงุชุฑูˆู†ูƒุณ/ ูƒู„ูŠุฉ ู‡ู†ุฏุณุฉ ุงู„ุฎูˆุงุฑุฒู…ูŠ/ ุฌุงู…ุนุฉ ุจุบุฏุงุฏ/ ุจุบุฏุงุฏ/ ุงู„ุนุฑุงู‚*,** ู‚ุณู… ู‡ู†ุฏุณุฉ ***ู‚ุณู… ู‡ู†ุฏุณุฉ ุงู„ู…ูŠูƒุงุชุฑูˆู†ูƒุณ ูˆุงุงู„ุฌู‡ุฒุฉ ุงู„ุทุจูŠุฉ/ ู…ุคุณุณุฉ ุงู„ู‡ู†ุฏุณุฉ ูˆุชูƒู†ูˆู„ูˆุฌูŠุง ุงู„ู…ุนู„ูˆู…ุงุช/ ุฌุงู…ุนุฉ ุงุงู„ุฒู‡ุฑ/ ุบุฒุฉ/ ูู„ุณุทูŠู† shahed.ali1202a@kecbu.uobaghdad.edu.iq :ุงู„ุจุฑูŠุฏ ุงุงู„ู„ูƒุชุฑูˆู†ูŠ* furatnejjar@uobaghdad.edu.iq :ุงู„ุจุฑูŠุฏ ุงุงู„ู„ูƒุชุฑูˆู†ูŠ** a.issa@alazhar.edu.ps :ุงู„ุจุฑูŠุฏ ุงุงู„ู„ูƒุชุฑูˆู†ูŠ*** ุงู„ุฎุงู„ุตุฉ ู…ู† ุฌู‡ุงุฒ ู‚ูŠุงุณ ุงุฃู„ู„ูˆุงู† ุงู„ูู…ุตู†ุน ููŠ ุงู„ู…ุฎุชุจุฑ ู„ุจู†ุงุก ูู…ุตู†ู ู…ู‚ุชุฑุญ ู„ุชุตู†ูŠู ุฃุฎูˆุฐุฉ( ุงู„ู…RGBุฒุฑู‚ )ุฎุถุฑ ูˆุงุงู„ุญู…ุฑ ูˆุงุงู„ุงุงู„ู„ูˆุงู† ุงุงู„ ุชู… ุงุณุชุฎุฏุงู… ู‚ูŠู… ุจูŠุงู†ุงุช ุงู„ุฏุฑุงุณุฉ ูˆู‡ูŠ ุงุฃู„ุญู…ุฑ ูˆุงุฃู„ุฎุถุฑ ุฏ ุงุฌุฑุงุกุนู†ุจู†ุงู‹ุก ุนู„ู‰ ูุฆุงุช ู…ุญุฏุฏุฉ ู…ู† ุงุฃู„ู„ูˆุงู† ุงุฃู„ุณุงุณูŠุฉ. ุชู… ุฃุฎุฐ ุงุฃู„ู„ูˆุงู† ุงุฃู„ุณุงุณูŠุฉ ูˆุงู„ุซุงู†ูˆูŠุฉ ูˆุงู„ุซุงู„ุซูŠุฉ ููŠ ุงุงู„ุนุชุจุงุฑ ุฌุณุงู…ุฃู„ูˆุงู† ุงุงู„ ( ู…ู† ุฎุงู„ู„ ุชุทุจูŠู‚ ุฎูˆุงุฑุฒู…ูŠุฉ ุงู„ุดุจูƒุฉ ุงู„ุนุตุจูˆู†ูŠุฉ MLูˆุงู„ุจุฑุชู‚ุงู„ูŠ ูˆุงุฃู„ุตูุฑ ูˆุงู„ูˆุฑุฏูŠ ูˆุงุฃู„ุฑุฌูˆุงู†ูŠ ูˆุงุฃู„ุฒุฑู‚ ูˆุงู„ุจู†ูŠ ูˆุงู„ุฑู…ุงุฏูŠ ูˆุงุฃู„ุจูŠุถ ูˆุงุฃู„ุณูˆุฏ ููŠ ุงู„ุชุนู„ู… ุงุขู„ู„ูŠ ) ูƒุชุณุงุจู…ู† ุฃุฌู„ ุง RGBุดูƒู„ ุฃูƒูˆุงุฏ ุนู„ู‰ุงู„ู…ุฐูƒูˆุฑุฉ ุชุนุฑูŠู ุงุฃู„ู„ูˆุงู† ุงุฃู„ุญุฏ ุนุดุฑ ANN(. ุชุทู„ุจ ุงู„ู…ุตู†ู ุงู„ุฐูŠ ุงุนุชู…ุฏ ุนู„ู‰ ุฎูˆุงุฑุฒู…ูŠุฉ ANNุงุงู„ุตุทู†ุงุนูŠุฉ ) . ุชุทู„ุจ ูุญุต ูˆุงู„ุชุญู‚ู‚ุงู„ุจุฑู†ุงู…ุฌ ุงู„ุฐูŠ ูŠุนุชู…ุฏ ุนู„ู‰ ุงู„ู…ุตู†ู ุงู„ู…ู‚ุชุฑุญ ุงู„ู‚ุฏุฑุฉ ุนู„ู‰ ุงู„ุชู†ุจุค ุจู„ูˆู† ุงู„ูƒูˆุฏ ุงู„ุฐูŠ ูŠู†ุชู…ูŠ ุฅู„ู‰ ูƒุงุฆู† ู‚ูŠุฏ ุงู„ ู…ุฎุฑุฌุงุชุงู„ู‚ุฏุฑุฉ ุนู„ู‰ ุงู„ุชุตู†ูŠู. ูˆู…ูƒุชุจุฉ MLู„ู€ TensorFlowู‚ูŠู…ุฉ ู„ูˆู†ูŠุฉ ุชู… ุฅุฎุถุงุนู‡ุง ุจุฏูˆุฑู‡ุง ู„ุฎูˆุงุฑุฒู…ูŠุงุช ุงู„ุชุฏุฑูŠุจ ูˆุงุงู„ุฎุชุจุงุฑ. ุชู… ุงุณุชุฎุฏุงู… ุงู„ู…ู†ุตุฉ ู…ูุชูˆุญุฉ ุงู„ู…ุตุฏุฑ 5000ุงู„ุนู…ู„ ุฌู…ุน ุญูˆุงู„ูŠ ูช ูˆุงู„ุชูŠ ูŠู…ูƒู† ุงุนุชุจุงุฑู‡ุง90ู‚ุฏุฑู‡ุง ุฅู„ู†ุดุงุก ุฎูˆุงุฑุฒู…ูŠุฉ ุงู„ุฏุฑุงุณุฉ. ุฃุธู‡ุฑุช ุงู„ู†ุชุงุฆุฌ ูƒูุงุกุฉ ู…ู‚ุจูˆู„ุฉ ู„ู„ู…ุตู†ู ุงู„ู…ุจู†ูŠ ู…ู…ุซู„ุฉ ุจุฏู‚ุฉ Kerasุงู„ุดุจูƒุฉ ุงู„ุนุตุจูŠุฉ ู…ูุชูˆุญุฉ ุงู„ู…ุตุฏุฑ ู‚ุงุจู„ุฉ ู„ู„ุชุทุจูŠู‚ ุฎุงุตุฉ ุจุนุฏ ุจุนุถ ุงู„ุชุญุณูŠู†ุงุช ููŠ ุงุฃู„ุนู…ุงู„ ุงู„ู…ุณุชู‚ุจู„ูŠุฉ ู„ุชูƒูˆู† ุฃูƒุซุฑ ูุงุนู„ูŠุฉ ูƒู…ู‚ูŠุงุณ ุฃู„ูˆุงู† ู…ูˆุซูˆู‚ ุจู‡. mailto:shahed.ali1202a@kecbu.uobaghdad.edu.iq*ุงู„ุจุฑูŠุฏ mailto:shahed.ali1202a@kecbu.uobaghdad.edu.iq*ุงู„ุจุฑูŠุฏ mailto:furatnejjar@uobaghdad.edu.iq**ุงู„ุจุฑูŠุฏ mailto:furatnejjar@uobaghdad.edu.iq**ุงู„ุจุฑูŠุฏ mailto:a.issa@alazhar.edu.ps***ุงู„ุจุฑูŠุฏ mailto:a.issa@alazhar.edu.ps***ุงู„ุจุฑูŠุฏ 2. Materials and Methods Fig. 1. The fabricated colorimeter and standard colored cards 2.2 RGB and Color Spaces 2.3 ANN Technology ANN is essentially a mathematical representation of a process that was created empirically rather than by employing mass and energy balances surrounding the process. A neural network is made up of a network of partially interconnected processing units... where ,๐‘Š-๐‘˜,๐‘–.is the weight of the link between ๐‘›๐‘œ๐‘‘๐‘’ and all the nodes in the preceding layers, ,๐‘-๐‘˜. is the bias to the node, ,๐‘-๐‘—โˆ’1. is the number of nodes in layer ๐‘—โˆ’1, and ,๐‘‹-๐‘˜-๐‘—โˆ’1. signifies the input which in this case is the (RGB)... 2.4 Performance Metrics Various metrics are employed for the estimation of an ANN performance and quality. Performance metrics were considered in this study for evaluating the performance of the ML model. Different metrics are used in evaluating the performance of the model ... The second layer, consisting of 24 neurons, contains a total of 96 parameters. These parameters are comprised of 72 weights and 24 biases. The experimental data collected from the colorimeter device is employed as an input for the ML algorithm. The ANN model has five layers. It is a densely connected neural network in the dense layer, also known as a fully connected layer, and is a funda... Fig. 6. Confusion matrix correlation before training. 3. Results and Discussion Fig. 9. The prediction of the trained model and b) tested model. Fig. 10. Confusion matrix correlation after training. 4. Conclusion In this work, a proposed ANN model offers a non-parametric, user-friendly, comprehensive alternative to traditional statistical methods used in classifying RGB colors. About 5000 samples of RGB colors were utilized to create the dataset by applying me... References [1] J. Sainui and P. Pattanasatean, โ€œColor Classification based on Pixel Intensity Values,โ€ 2018 19th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), Jun. 2018,... [2] A. A. Soofi and A. M. Awan, โ€œClassification techniques in Machine Learning: Applications and issues,โ€ Journal of Basic and Applied Sciences, vol. 13, pp. 459โ€“465, Jan. 2017, doi: 10.6000/1927-5129.2017.13.76.