Next Article in Journal
Local Fiscal Pressure and Enterprise Environmental Protection Investment under COVID-19: Evidence from China
Previous Article in Journal
An Artificial-Intelligence-Based Renewable Energy Prediction Program for Demand-Side Management in Smart Grids
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Approach for Designing an Optimal CNN Model Based on Auto-Tuning GA with 2D Chromosome for Defect Detection and Classification

Division of Industrial Engineering and Management, The University of Danang—University of Science and Technology, Danang 550000, Vietnam
*
Author to whom correspondence should be addressed.
Sustainability 2023, 15(6), 5455; https://doi.org/10.3390/su15065455
Submission received: 2 February 2023 / Revised: 7 March 2023 / Accepted: 16 March 2023 / Published: 20 March 2023
(This article belongs to the Section Resources and Sustainable Utilization)

Abstract

:
Defect detection and classification on the final products are necessary for the manufacturers to ensure the quality of the final product before delivering it to the end customers. With rapid changes in manufacturing technologies, most of the companies have changed their operation methods toward industry 4.0. On this road, developing an automatic detection system based on the surface images can enhance the productivity and ensure the quality of the product. However, only a few studies have developed the models for solving this problem. Due to its complicated structure and parameters, designing an optimal convolution neural network (CNN) is still a challenge. Thus, this study aims to propose an autotuning genetic algorithm with two-dimension chromosomes for designing an optimal CNN model efficiently. In particular, a two-dimension chromosome is developed to represent a CNN’s structure and parameters. To enhance the searching process, the crossover rate and mutation rate are tuned automatically according to the generation. A two-dimension crossover method is proposed to create offspring for selecting the next population. In addition, a case of ceramic textile manufacturing is constructed to validate the proposed approach. The accuracy of the proposed approach is up to 95.5 percent on the testing dataset.

1. Introduction

Toward industry 4.0, most of the companies have changed their operation methods. Many frameworks have been proposed to support the companies in their transitions [1]. In terms of defect detection and classification, image processing is widely used in production. Karimi and Asemani [2] divided four main approaches of defect detection and classification including filtering methods, structural algorithms, model-based techniques, and statistical methods. Belonging to the filtering approach, neural networks are mostly used [3,4]. Chen et al. [5] designed a multi-spectral deep convolutional neural network for the defect detection of the solar cell surface. Fan et al. [6] developed a hybrid method which combines deep learning models and Bayesian probabilistic analysis for robust crack detection on raw images.
Convolutional Neural networks are widely used for image processing [6,7,8,9,10]. Constructing an optimal CNN model for a specific problem requires time and domain knowledge. There are two different categories of CNN design algorithms [11]. One is fixed architecture plus automatic parameter tuning. Another one is automatic architecture design.
The performance of a CNN model depends on its structure and hyper parameters such as the number of layers, the number of kernels, the activation functions, and so on, which are designed based on the specific problem and domain knowledge. However, designing CNN models is mainly based on human experiences and huge numbers of trials and error works [12]. This makes designing an optimal CNN model for a specific problem still a challenge.
Genetic algorithms (GAs) are population-based evolution algorithms which have been efficiently used for different optimization problems [13,14]. Several studies have applied GA to find the weights of neural networks. Combining genetic algorithms and neural networks has been used successfully for classification problem [15,16]. The evolution process of GA can help find the optimal set of CNN parameters and structure. In fact, the structure and parameters of a neural network are tuned by generations of the evolution. Zhi and Liu [17] applied genetic algorithm for an effective face recognition model. Xie and Yuille [18] proposed an approach based on genetic algorithm which automatically generates an optimal CNN model. However, in this approach, the parameters of layers are fixed in advance which may affect the searching space. Sun et al. [11] developed a method to design CNN structure automatically by using genetic algorithm. This method uses building blocks with predefined parameters and skip connection. This may limit generating the optimal model. Although the parameters of layers of CNN affect its performance significantly, no study has focused on this problem.
Furthermore, developing an optimal GA is still a problem due to its parameters specially crossover rate and mutation rate which support the algorithm in the ability of searching and converging during the evolution progress. In addition, with special characteristics of a CNN model, the traditional chromosome and crossover method can not be used properly for finding an optimal CNN model.
In practice, most ceramic tile manufacturers are under backward technologies, especially in developing countries. The quality inspection still relies on humans, which causes many problems. With rapid changes in the manufacturing technology and other areas, these companies need to improve their manufacturing processes. Hence, this study developed an auto-tuning genetic algorithm with two-dimensions chromosome for automatically generating an optimal convolutional neural network (2DATGA-CNN). In particular, the CNN structure and its parameters are determined such as the number of convolution layers, pooling layers, fully connected layers, number of kernels, activation functions, and so on. These parameters of each layer are optimized based on the evolution process. Two-dimension chromosome is designed so that it can efficiently represent all layers’ parameters of the CNN model. In addition, a special crossover procedure called 2D crossover is designed to enhance the evolution process. The crossover rate and mutation rate are auto tuned during the evolution progress. To validate the proposed algorithm, a database of surface images of ceramic tiles including defects and non-defects was constructed. The proposed algorithm was compared with the other well-known CNN algorithm. The results showed the efficiency of the proposed approach.
In this study, we focused on the inspection process in which an automatic system is developed to detect the defects on the products. To generate an optimal model requires domain knowledge and more. However, with the proposed 2DATGA-CNN, an optimal CNN model for the defect detection and classification efficiently without any other requirements is automatically generated.
The rest of this paper is organized as follows. Section 2 gives a brief review of the ceramic tile defect detection and classification problem. Section 3 describes more details of the proposed algorithm. Section 4 describes a case study of a ceramic tile factory. Section 5 constructs a model, results, and discussions to validate the proposed algorithm. Finally, Section 6 concludes the contributions and limitations of the study.

2. Ceramic Tile Surface Defects

Ceramic tile manufacturing plays an important role in many countries worldwide. With the rapid development of the manufacturing technologies and high standards of living, the quality of the ceramic tile products is required more strictly, especially for their surface [19,20]. In addition, these companies need to improve the product quality and productivity and simultaneously reduce the manufacturing cost.
During the manufacturing processes, including the raw material preparation, the mixing and grinding, the spray drying, the forming, the drying, the glazing, the firing, and the classifying and packaging, six common defects occur more frequently as shown in Table 1, including blob, crack, pinhole, edge, scratch, and eclipse. Each defect type is briefly described in Table 1. The blob defect looks like drops of water on the surface. Its diameter can vary in centimeters. The crack defect is a break line. This type is the most popular in ceramic tile manufacturing. The pinhole defect appears on the surface of the product as a small hole. The edge defect is a break on the edges of the product. This defect type can be small or even a large piece. The scratch defect appears on the product as a part of the product being extracted. The last one is the eclipse defect which is an accumulation of a part of glaze over a part or corner of the ceramic tile.
The defect appearing on the product will significantly affect the quality, price, and customer satisfaction. Defect detection is necessary to ensure the quality of the product before it is delivered to the end customers [21]. Due to the complicated characteristics of defects, developing an efficient model to detect all defects is still a challenge.

3. Materials and Methods

In this section, the proposed approach is explained in more detail. To have an overview of the approach, a general structure of the 2DATGA-CNN is described. Then, a two-dimension chromosome is introduced to represent a CNN model. An encoding procedure is designed to generate the initial chromosomes. To improve the ability of the proposed algorithm, auto-tuning crossover rate and mutation rate are developed. In addition, due to the CNN characteristics, a two-dimension crossover method and two-point mutation method are designed to generate the offspring for selecting the next population. Finally, the fitness value and selection method are determined.

3.1. General Structure of Auto-Tuning GA with 2D Chromosome

To generate an optimal CNN model, a 2DATGA-CNN is designed as in Figure 1. The initial parameters of GA are firstly determined such as the population size, termination condition, and so on. Due to the special characteristics of CNN parameters, an encoding procedure is designed to generate the initial population for the evolution progress. The encoding procedure will be terminated if the number of the chromosomes in the initial population reaches its size. The 2D crossover method and the 2-point mutation method are developed to generate the offspring for selecting the next population. The number of the offspring generated by the crossover method and mutation method are controlled by the crossover rate and the mutation rate, respectively, which are tuned automatically after each generation. The new offspring and the solutions of the previous population are contained in a temporary population. The fitness value of each solution in the temporary population is calculated as Equation (5). Then, a CNN selection method is designed to select the chromosomes for the next generation or new population. If the termination condition is met, the proposed algorithm will return an optimal CNN model. Otherwise, the crossover rate and mutation rate will be tuned and new offspring will be generated for the next generation.

3.2. Two Dimensions Chromosome

To represent a CNN model, a two-dimension chromosome is designed as an example shown in Figure 2. In this example, the CNN model consists of four segments in which each segment includes a convolution layer and a pooling layer and a dense layer added at the end of the model. The number of kernels, the size of the kernels, the stride number and padding number, the learning rate, and the activation function of segment 1 are denoted as k1, f1, s1, p1, r1, and a1, respectively. In the pooling layer of segment 1, the number of kernels, the kernel size, and the pooling type are denoted as fp1, sp1, and t1, respectively. As shown in Figure 2b, the first layer is a convolution layer with 16 kernels. The size of the kernel is 3 × 3. The stride number and padding number equal to 1 and 1, respectively. The learning rate is assigned by 0.1. Tanh function is used for activation functions. The next layer is a pooling layer with 11 2 × 2 kernels. The type of pooling layer is the maximum function. It is similar for convolution and pooling layers in segments 2, 3, and 4. At the end, there is a fully connected layer and a dense layer with 20 nodes using the Tanh activation function.

3.3. CNN Encoding Procedure

This proposed algorithm can generate different CNN models with different structure and parameters. Thus, a CNN encoding procedure is designed as follows.
Procedure 1. CNN Encoding
Begin
   Generate a random number Ns between (1 and S) of number of segments
   For i = 1 to Ns do
          Assign a random number within its predefined range
   End
   Assign a random number n within its range
   Assign a random number a within its range
End
S is a predefined value to limit the length of a CNN model. To generate a chromosome that represents a CNN model, the number of hidden layers is created randomly. For each hidden layer or segment, the genes are assigned random values within its range.

3.4. Auto Tuning Crossover Rate and Mutation Rate

To enhance the ability of the searching process, the diversity of solutions should be high at the beginning and then the solution should be converged at the end of evolution progress. To control this diversity and convergence, the crossover rate and mutation rate are created for every generation according to the Equations (1) and (2), respectively. These Equations were derived based on the experiment method with trials.
Crossover rate at generation t:
r c t = 0.9 0.001 t t < 20 0.9 0.001 t 0.14 e 0.1 t 20 < t < 40 0.4 t > 40
Mutation rate at generation t:
r m t = 1 r c t
Based on these Equations, the crossover rate is high at the beginning of the evolution process which can create more diversified offspring. This rate will decrease during the evolution process. In contrast, the mutation rate is low at the beginning of the process and high at the end process.

3.5. Two Dimensions Crossover Method and 2-Point Mutation Method

With a two-dimension chromosome, a new crossover method is developed for creating the offspring called a 2D crossover. Two offspring are created based on two random parents from the population which have different structure and parameters as in the following procedure.
Sustainability 15 05455 i007
To illustrate this 2D crossover method, an example is shown in Figure 3. From the two parents, the first offspring consists of a 2 × 6 matrix extracted from parent 1 (i.e., the first column to column 6th, and the first 2 rows), and the rest of the cells including the columns from the 7th to the 9th and the rows from the 3rd to the 4th inherit from the corresponding cells of parent 2. Similarly, the second offspring is generated which consists of a 2 × 6 matrix extracted from parent 2 (i.e., the first column to the 6th column and the first 2 rows), and the rest of the cells including the columns from the 7th to the 9th and the rows from the 3rd to the 5th inherit from the corresponding cells of parent 1.
This proposed crossover method can create offspring which inherit the features of their parents. The traditional crossover methods such as the one-point crossover or two-point crossover exchange only a part of their parents are not suitable for the CNN model. The offspring generated by the 2D crossover method can inherit multiple parts or segments of their parents. Thus, the proposed method can enhance the diversity of the population. The efficiency of this method will be illustrated in Section 5 in comparison with other crossover methods.
To create a new offspring, the two-point mutation method is applied. An example is described in Figure 4. Two random numbers are generated to determine two segments which will be mutated as segment 2nd and segment 4th. Then, two other random numbers are generated to identify the genes which are mutated as gen 3rd and 8th. After the mutation genes are determined, the random values within their ranges are generated, and the current values are replaced by these random values.

3.6. Fitness Value and Selection Method

To generate a population for the next generation, a special CNN selection method is designed. Before the solutions are evaluated, every CNN model is trained based on the training dataset. The accuracy of each solution is calculated as in Equation (3). In addition, the difference rate between the accuracy rate on the training dataset and on the validating dataset is calculated as in Equation (4). The fitness value is then derived as Equation (5).
A c c u r a c y   r a t e   ( r a ) =   n u m b e r   o f   c o r r e c t   r e s u l t s t o t a l   v a l i d a t i o n   n u m b e r
D i f f e r e n c e   r a t e   ( r d ) =   a c c u r a c y   r a t e   o n   t h e   v a l i d a t i o n   d a t a s e t a c c u r a c y   r a t e   o n   t h e   t r a i n i n g   d a t a s e t
F i t n e s s   v a l u e   F = r a + r d
To keep the best solutions for the next generation, elitist strategy is employed with a rate of re. For the rest of the chromosomes, each two random parents are selected and the solution with the highest fitness value will be chosen for the next generation. Based on the fitness value in Equation (5), a CNN model is not only evaluated on its accuracy rate on the training dataset but also on its overfitting problem.

4. A Case of Ceramic Tile Manufacturing

In this case, the managers would like to construct a decision support system that can reduce the defect products being delivered to the customers. The model should simultaneously detect all six defect types and non-defect products.
A set of ceramic tile surface images are collected from the ceramic tile factory including 1000 images for each defect type as described in Section 2 and 4000 images without any defect. The set of raw images is then preprocessed to adjust the same size. Then, these images are labeled manually based on a supported software. The labeled images are stored in a database called CTD which is used for training, validating, and testing the proposed algorithm. The next section will develop a model based on the proposed approach to solve the problem. The model is validated based on the CDT.
This CDT is divided into three subsets. The first one consists of 6000 images which are used for the training phase. The second one consists of 2000 images which are used for the validation phase. Lastly, the third one consists of 2000 images which are used for the testing phase.

5. Model, Results and Discussions

To build up an optimal model for ceramic tile defect detection and classification based on the proposed 2DATGA-CNN, firstly the initial parameters are determined according to some trials as in Table 2. The population size is set as 100. The elitism rate is set as 0.1. The crossover rate and mutation rate are adjusted automatically during the evolution progress as in Equations (1) and (2), respectively. The terminal condition is set as 50 generations or the best solution unchanged for 10 consecutive generations. With the initial setting, an optimal CNN model is generated as shown in Figure 5. The optimal model consists of seven segments or convolution and pooling layers. The output consists of seven nodes that represent six types of defects and non-defect products.
The accuracy rate of the optimal model on the training dataset and testing dataset are shown in Table 3. In addition, to evaluate the efficiency of the proposed approach, two other well-known automatic algorithms including the GCNN developed by Xie and Yuille [18] and the CNNGA developed by Sun et al. [11] were compared with the 2DATGA-CNN.
As can be seen in Table 3, the accuracy of the 2DATGA-CNN is much higher than the others in both of the training and testing datasets with up to 98.2 percent and 95.5 percent, respectively. The CNNGA is the worst with both accuracies under 90 percent. For GCNN, the accuracy on the training dataset is 90.1 percent, but on the testing dataset, the accuracy is only 82.4 percent. Moreover, to evaluate the overfitting issue, the difference of accuracy between the training phase and testing phase is calculated. As in the last column, the 2DATGA-CNN has the smallest difference with only 2.7 percent, which means that the trained model can perform efficiently in real data. The difference of the CNNGA is highest with 8.1 percent. Furthermore, the difference between the training and testing phases of the GCNN is 7.7 percent.
In addition, this case study also measured the two error types of the proposed algorithm with these two others. The results are shown in Table 4. The error type I is that the model identifies a defect, but the real image is without defect. The error type II is that the model identifies the product without defect but the real image consists of the defect. These error rates are calculated as Equations (6) and (7).
T y p e   I   e r r o r   r a t e   =   t o t a l   n u m b e r   o f   e r r o r s   t y p e   I   t o t a l   n u m b e r   o f   d e c i s i o n s   w i t h   d e f e c t
T y p e   I I   e r r o r   r a t e   =   t o t a l   n u m b e r   o f   e r r o r s   t y p e   I I   t o t a l   n u m b e r   o f   d e c i s i o n s   w i t h o u t   d e f e c t
As can be seen in Table 4, the ratio of the error type I and type II of the 2DATGA-CNN is much lower than those of the GCNN and CNNGA with only 9.6 percent for type I and 0.4 percent for type II. For the GCNN, the error type I and error type II are 30.2 percent and 69.8 percent, respectively. The error type I and error type II of the CNNGA are 42.6 percent and 57.4 percent, respectively. Compared with the GCNN and the CNNGA, the type II error rate of the proposed model 2DATGA-CNN is smallest with only 0.4 percent. This may decrease the probability of the defect products delivered to the customers and enhance the customers’ satisfaction which achieves the objective of the company.
To understand in more detail how the 2DATGA-CNN works, the diversity of the proposed algorithm with the 2D crossover method and auto-tuning rates is measured and compared with other traditional crossover methods including one-point and two-point methods with fixed crossover and mutation rates as shown in Figure 6. As can be seen in Figure 6, the diversities of the 2D crossover method over 10 generations are significant differences compared with the one-point and two-point crossover methods. In Figure 6a,b, the accuracies of all solutions in the populations of the first 10 generations vary a little bit from 34 percent to 48 percent, approximately, which means that the crossover methods would not generate more diversified chromosomes for the next generations. With the 2D crossover method in Figure 6c, the diversity of the solutions in the populations is much higher than the others, which is up to 76 percent.
With the proposed fitness function, the algorithm performed efficiently. This function supports selecting the chromosomes for the next generation considering both the accuracy and overfitting issue. The convergence of the proposed 2DATGA-CNN is shown in Figure 7. As can be seen, from generation 1st to generation 10th, the accuracy of the best solution increases sharply. Due to the auto-tuning method of the crossover rate and mutation rate, the algorithm converges at the end of the evolution progress.

6. Conclusions

This study proposed an auto tuning genetic algorithm with two-dimension chromosomes for generating an optimal CNN model. Based on the experiments, the crossover rate was derived to enhance the diversity and the quality of the searching process. Due to the special characteristics of the CNN model, a two-dimension chromosome is designed to represent the CNN model efficiently. In addition, the study also developed a 2D crossover method to create offspring for the next generation. To evaluate the solution, a fitness function is developed that can evaluate the CNN model not only in terms of its accuracy but also in terms of overfitting issue. A selection method is designed to select chromosomes for the next generation efficiently.
A case of the ceramic tile manufacturing factory was conducted. The 2DATGA-CNN returned high accuracy up to 95.5 percent compared with only 82.4 percent and 81.6 percent of the GCNN and CNNGA, respectively, on the testing dataset. The results have shown the efficiencies of the 2DATGA-CNN in many aspects such as type II error rate with only 0.4 percent. Furthermore, this approach can be applied to other similar problems.

Author Contributions

Conceptualization, N.-T.H.; Methodology, N.-T.H. and H.-N.N.; Software, H.-N.N.; Validation, D.-D.H.; Writing—review & editing, N.-T.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by Funds for Science and Technology Development of the University of Danang under project number B2019-DN02-64.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Huynh, N.-T. Status and challenges of textile and garment enterprises in Vietnam and a framework toward industry 3.5. Int. J. Logist. Res. Appl. 2022. [Google Scholar] [CrossRef]
  2. Karimi, M.H.; Asemani, D. Surface defect detection in tiling Industries using digital image processing methods: Analysis and evaluation. ISA Trans. 2014, 53, 834–844. [Google Scholar] [CrossRef] [PubMed]
  3. Badmos, O.; Kopp, A.; Bernthaler, T.; Schneider, G. Image-based defect detection in lithium-ion battery electrode using convolutional neural networks. J. Intell. Manuf. 2020, 31, 885–897. [Google Scholar] [CrossRef]
  4. Tabernik, D.; Šela, S.; Skvarč, J.; Skočaj, D. Segmentation-based deep-learning approach for surface-defect detection. J. Intell. Manuf. 2020, 31, 759–776. [Google Scholar] [CrossRef] [Green Version]
  5. Chen, H.; Pang, Y.; Hu, Q.; Liu, K. Solar cell surface defect inspection based on multispectral convolutional neural network. J. Intell. Manuf. 2020, 31, 453–468. [Google Scholar] [CrossRef] [Green Version]
  6. Fang, F.; Li, L.; Gu, Y.; Zhu, H.; Lim, J.H. A novel hybrid approach for crack detection. Pattern Recognit. 2020, 107, 107474. [Google Scholar] [CrossRef]
  7. Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Adv. Neural Inf. Process. Syst. 2012, 25, 1097–1105. [Google Scholar] [CrossRef] [Green Version]
  8. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
  9. Lin, H.; Li, B.; Wang, X.; Shu, Y.; Niu, S. Automated defect inspection of LED chip using deep convolutional neural network. J. Intell. Manuf. 2019, 30, 2525–2534. [Google Scholar] [CrossRef]
  10. Sainath, T.N.; Mohamed, A.R.; Kingsbury, B.; Ramabhadran, B. Deep convolutional neural networks for LVCSR. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 8614–8618. [Google Scholar]
  11. Sun, Y.; Xue, B.; Zhang, M.; Yen, G.G.; Lv, J. Automatically designing CNN architectures using the genetic algorithm for image classification. IEEE Trans. Cybern. 2020, 50, 3840–3854. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  12. Hu, W.; Shao, J.; Jiao, Q.; Wang, C.; Cheng, J.; Liu, Z.; Tan, J. A new differentiable architecture search method for optimizing convolutional neural networks in the digital twin of intelligent robotic grasping. J. Intell. Manuf. 2022. [Google Scholar] [CrossRef]
  13. Huynh, N.T.; Chien, C.F. A hybrid multi-subpopulation genetic algorithm for textile batch dyeing scheduling and an empirical study. Comput. Ind. Eng. 2018, 125, 615–627. [Google Scholar] [CrossRef]
  14. Huynh, N.T.; Huang, Y.C.; Chien, C.F. A hybrid genetic algorithm with 2D encoding for the scheduling of rehabilitation patients. Comput. Ind. Eng. 2018, 125, 221–231. [Google Scholar] [CrossRef]
  15. Li, H.; Yuan, D.; Ma, X.; Cui, D.; Cao, L. Genetic algorithm for the optimization of features and neural networks in ECG signals classification. Sci. Rep. 2017, 7, 41011. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  16. Zhang, Y.H.; Yuen, C.W.M.; Wong, W.K.; Kan, C.W. An intelligent model for detecting and classifying color-textured fabric defects using genetic algorithms and the Elman neural network. Text. Res. J. 2011, 81, 1772–1787. [Google Scholar] [CrossRef]
  17. Zhi, H.; Liu, S. Face recognition based on genetic algorithm. J. Vis. Commun. Image Represent. 2019, 58, 495–502. [Google Scholar] [CrossRef]
  18. Xie, L.; Yuille, A. Genetic cnn. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 1379–1388. [Google Scholar]
  19. Hanzaei, S.H.; Afshar, A.; Barazandeh, F. Automatic detection and classification of the ceramic tiles’ surface defects. Pattern Recognit. 2017, 66, 174–189. [Google Scholar] [CrossRef]
  20. Jajal, B.; Dobariya, A.R. Leveraging Machine Vision for Automated Tiles Defect Detection in Ceramic Industries. In Emerging Technologies in Data Mining and Information Security; Springer: Berlin/Heidelberg, Germany, 2021; pp. 725–733. [Google Scholar]
  21. Sanghadiya, F.; Mistry, D. Surface defect detection in a tile using digital image processing: Analysis and evaluation. Int. J. Comput. Appl. 2015, 116, 33–35. [Google Scholar] [CrossRef] [Green Version]
Figure 1. General structure of 2DATGA-CNN.
Figure 1. General structure of 2DATGA-CNN.
Sustainability 15 05455 g001
Figure 2. Chromosome representation.
Figure 2. Chromosome representation.
Sustainability 15 05455 g002
Figure 3. An example of the 2D crossover method.
Figure 3. An example of the 2D crossover method.
Sustainability 15 05455 g003
Figure 4. An example of the two-point mutation method.
Figure 4. An example of the two-point mutation method.
Sustainability 15 05455 g004
Figure 5. An optimal CNN model for ceramic tile defect detection and classification.
Figure 5. An optimal CNN model for ceramic tile defect detection and classification.
Sustainability 15 05455 g005
Figure 6. The diversity of the proposed algorithm.
Figure 6. The diversity of the proposed algorithm.
Sustainability 15 05455 g006aSustainability 15 05455 g006b
Figure 7. Convergence of the 2DATGA-CNN.
Figure 7. Convergence of the 2DATGA-CNN.
Sustainability 15 05455 g007
Table 1. Brief description of defects.
Table 1. Brief description of defects.
DefectSurface ImageDescription
BlobSustainability 15 05455 i001looks like drops of water on the surface due to the humidity and sleep time
CrackSustainability 15 05455 i002break lines due to the significant changes of the temperature
PinholeSustainability 15 05455 i003small holes appear on the product surface
EdgeSustainability 15 05455 i004a break appears in the edge of a ceramic tile product
ScratchSustainability 15 05455 i005one or more parts of the product are extracted or break out, and the size of parts varies from millimeters to centimeters
EclipseSustainability 15 05455 i006accumulation of a part of glaze over a part or corner of the ceramic tile
Table 2. The initial parameter setting of 2DATGA-CNN.
Table 2. The initial parameter setting of 2DATGA-CNN.
Parameter Value
Population size100
Number of generations50
Crossover rateEquation (1)
Mutation rateEquation (2)
Elitism rate0.1
Table 3. Accuracy rate on the training and testing datasets.
Table 3. Accuracy rate on the training and testing datasets.
AlgorithmAccuracy Rate (%)
Training DatasetTesting DatasetDifference
2DATGA-CNN98.295.52.7
GCNN90.182.47.7
CNNGA89.781.68.1
Table 4. Error rates of the two error types.
Table 4. Error rates of the two error types.
AlgorithmError rate (%)
Type IType II
2DATGA-CNN9.60.4
GCNN30.269.8
CNNGA42.657.4
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Huynh, N.-T.; Ho, D.-D.; Nguyen, H.-N. An Approach for Designing an Optimal CNN Model Based on Auto-Tuning GA with 2D Chromosome for Defect Detection and Classification. Sustainability 2023, 15, 5455. https://doi.org/10.3390/su15065455

AMA Style

Huynh N-T, Ho D-D, Nguyen H-N. An Approach for Designing an Optimal CNN Model Based on Auto-Tuning GA with 2D Chromosome for Defect Detection and Classification. Sustainability. 2023; 15(6):5455. https://doi.org/10.3390/su15065455

Chicago/Turabian Style

Huynh, Nhat-To, Duong-Dong Ho, and Hong-Nguyen Nguyen. 2023. "An Approach for Designing an Optimal CNN Model Based on Auto-Tuning GA with 2D Chromosome for Defect Detection and Classification" Sustainability 15, no. 6: 5455. https://doi.org/10.3390/su15065455

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop