Next Article in Journal
Experimental Study and Numerical Simulation of Sediment’s Promoting Effect on Cavitation Based on Flow Field Analysis
Previous Article in Journal
Optimization and Kinetic Modelling of Hydroxycinnamic Acid Extraction from Anethum graveolens Leaves
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on Leather Defect Detection and Recognition Algorithm Based on Improved Multilayer Perceptron

1
College of Mechanical and Electrical Engineering, Fujian Agriculture and Forestry University, Fuzhou 350100, China
2
School of Management, Fujian University of Technology, Fuzhou 350118, China
3
Department of Intelligent Manufacturing, Shangdong Labor Vocational and Technical College, Jinan 250022, China
4
Fujian Chengsen Group Co., Ltd., Longyan 364300, China
5
Fujian Quanrun Construction Engineering Co., Ltd., Longyan 364200, China
*
Authors to whom correspondence should be addressed.
Processes 2025, 13(5), 1298; https://doi.org/10.3390/pr13051298
Submission received: 27 March 2025 / Revised: 13 April 2025 / Accepted: 20 April 2025 / Published: 24 April 2025
(This article belongs to the Section Automation Control Systems)

Abstract

:
To address the issues of manual inspection and low precision in the detection and recognition of defects in existing animal leather, this study first establishes a leather image dataset and applies an improved Gabor filtering algorithm for image preprocessing. Specifically, the weighted average method is adopted to grayscale the image, and the algorithm parameters are designed and improved to ensure that most of the key texture information of the leather images is obtained, meeting the requirements for texture feature information in subsequent feature extraction. Next, it explores statistical feature extraction algorithms based on the gray-level co-occurrence matrix and the statistical feature extraction algorithm based on gray-level distribution, forming a combination of features for the dataset. The leather defects mainly include warble fly holes, neck wrinkles, and scars. In the processing process, there are also defects such as scratches, holes, and stains. Finally, a leather defect image classification model is proposed based on a multilayer perceptron algorithm, using the ReLU activation function and a SoftMax classifier to classify surface defects in 1280 samples. The classification time is 0.0854 s, and the average precision, recall, and accuracy for leather defect image classification are all 99.53%. This solution innovatively integrates the improved Gabor filtering with the adaptive multilayer perceptron architecture to construct a multi-modal leather defect classification model, which significantly improves the detection accuracy of three types of defects, namely holes, scratches, and stains. It provides a theoretical reference for the automation of the leather processing process.

1. Introduction

Animal leather is widely used in various fields, and surface defects can significantly impact its economic value. Defects such as fly bites, neck wrinkles, and scars are unavoidable during animal growth, while scratches, holes, and stains may occur during processing. Therefore, essential steps in leather production include defect detection, classification and marking, intelligent layout, and cutting.
Currently, defect detection and classification in animal leather are primarily manual. Due to variations in human judgment, the detection results are often inconsistent. In recent years, with breakthroughs in deep learning algorithms and various computer hardware technologies, machine vision-based leather defect detection and recognition algorithms have gradually been applied to animal leather defect detection [1,2,3]. These mainly include image feature extraction algorithms and image classification algorithms.
In terms of animal leather image feature extraction algorithms, some scholars have adopted traditional methods. Tsai et al. developed a Fourier transform-based algorithm to eliminate background features in textured images while retaining defect features. They used Mahalanobis distance to detect whether defects existed in the images [4]. Sobral, using wavelet transforms, designed a filter bank for each sub-band. By tuning the size, shape, and wavelet sub-bands of each filter, it was possible to detect specific types of leather defects [5]. Some other scholars have adopted the methods of deep learning models. Liong et al. proposed a leather detection method based on a deep learning framework, utilizing deep convolutional neural networks for feature extraction [6,7]. Ding Caihong et al. used convolutional neural networks to detect and recognize multiple types of leather defects, and then verified the detection results through saliency features to improve the convolutional network [8]. Deng Jiehang applied an optimized ResNet-50 network to extract features from five types of leather images [9].
In terms of animal leather defect image classification algorithms, multiple scholars have adopted traditional methods. Jawahar et al. used a wavelet-based feature extractor and a support vector machine classifier to identify leather defects. In their experiment, the dataset contained 700 images, with 70% allocated to the training set, achieving an overall classification accuracy of over 95% [10]. Pereira combined a pixel intensity analyzer with an extreme learning machine classifier to detect 11 types of leather defect images. Although the detection accuracy did not improve compared to other methods, the detection speed significantly increased [11]. Villar used a multilayer perceptron classifier combined with features selected through a sequential forward selection algorithm to classify leather images. Their dataset included 1769 leather images, including open cuts, closed cuts, fly bites and defect-free samples, with the test set accounting for 30% of the entire dataset. The overall classification accuracy for the test set was over 95% [12]. Mohammed proposed an optimized multilayer perceptron neural network structure to detect and classify 11 common types of wet blue leather. First, defect features were extracted using the gray-level co-occurrence matrix and the gray-level run-length matrix, and then a multilayer perceptron neural network was used for defect classification. Genetic algorithms, particle swarm optimization, and artificial bee colony algorithms were applied to optimize the neural network structure. Among them, the artificial bee colony algorithm showed the best classification results, achieving an accuracy of 98.73%, a recall rate of 94.14%, and a precision of 97.85% for wet blue leather defect classification [13]. Compared to Villar’s method, this approach significantly improved the recognition accuracy of wet blue leather defects using a multilayer perceptron.
However, this paper addresses the limitations of existing animal leather defect detection and recognition algorithms, particularly in multi-class classification accuracy, which fails to meet the automation needs of leather processing. Therefore, this paper aims to address these pain points by applying an improved Gabor filter algorithm for image preprocessing and proposing a modified multilayer perceptron algorithm to construct a leather defect image classification model, the classification accuracy for hole defects, scratch defects, stain defects, and defect-free images has been improved, providing theoretical support for the automation of leather processing.

2. Materials and Methods

2.1. Dataset

2.1.1. System Configuration

The hardware equipment used in this paper is based on the Windows platform, and image processing is implemented using the Python (version 3.8.10) programming language. The configuration includes an Intel Core i5-9600KF 3.70 GHz CPU processor and an NVIDIA GeForce GTX 1050Ti graphics card.

2.1.2. Image Data Collection

The research focuses on defect detection and recognition algorithms using cow leather as an example. Complete cow leather samples were used for image acquisition, with an industrial camera capturing the surface images of the leather. The resolution of the digital images captured by the camera is 2592 × 1944 pixels, and an example of the captured digital image is shown in Figure 1. The actual leather area covered in a single image is approximately 4265 mm2.
The study focuses on the integrity and diversity of the samples, which not only covers the leather from different parts of the cow, but also includes the leather samples from different production stages and different preservation environments, ensuring that the image data can fully reflect the possible defects of the leather. Since large images consume significant computer memory during neural network training, which slows down processing speed, it is necessary to segment the leather image samples to improve processing efficiency. Additionally, segmentation allows for defect localization based on block labels. A sliding window method was used to crop the original image into 1600 smaller leather images, each sized 200 × 150 pixels2. Among these, 400 images contained hole defects, 400 contained scratch defects, 400 contained stain defects, and 400 were defect-free.

2.1.3. Data Augmentation

To enhance the training performance of subsequent neural network models due to the limited number of leather defect image data, this paper adopts the method of image augmentation by combining rotation and flipping to increase the number of samples in the leather defect image dataset. In order to reduce the impact of leather texture features in the background on defect detection and recognition, we perform image augmentation on the samples by applying both rotation and flipping.
By rotating the image by 180 degrees, augmented image data with the same width and height can be obtained. Let the center of symmetry of the image be the origin, with the length and width directions corresponding to the x-axis and y-axis, respectively. Point m(a,b) is a point in the image, and its polar coordinates can be represented by Equation (1). After rotating point m counterclockwise by an angle β , the corresponding position will be M(x,y). The relationship between x and y and a and b after transformation is shown in Equation (2), and the method of coordinate transformation is provided in Equation (3):
{ b = r sin α a = r cos α
{ y = r sin ( α + β ) = r sin α cos β + r cos α sin β = a sin β b cos β x = r cos ( α + β ) = r cos α cos β r sin α sin β = a cos β b sin β
M ( a cos β b sin β , a sin β + b cos β ) = m ( a , b )
Horizontal and vertical flipping of images can effectively increase the sample size of leather defect images. The pixel transformation process during image flipping can be described by the following formulas. Let the center of symmetry of the image be the origin, with the length and width directions as the x-axis and y-axis, respectively. Points m ( a , b ) and n ( c , d ) represent two points in the image. After horizontally flipping point m and vertically flipping point n , their corresponding positions are M ( x , y ) , N ( u , v ) . The transformation methods are shown in Equations (4) and (5):
M ( a , b ) = m ( a , b )
N ( c , d ) = n ( c , d )
By applying image rotation and image flipping techniques for data augmentation on the segmented image dataset, the resulting dataset is four times larger than the original. It includes 6400 leather images with a pixel size of 200 × 150 pixel2, comprising 1600 images each for hole defects, scratch defects, stain defects, and defect-free images.

2.1.4. Image Preprocessing

Traditional Gabor filters have significant constraints in their frequency domain selection mechanism and direction sensitivity during the extraction of leather texture features, leading to insufficient representation of microscopic defect textures. The improved Gabor filter, through the redesign of parameters (such as the standard deviation of Gaussian functions and filter orientation), can better match the scale characteristics of leather defect textures, ensuring that the filter has strong responses to defect textures of different sizes. In this study, a weighted average method is first used to convert the images to grayscale [14,15]. Then, improvements are made to the parameters of the Gabor filter algorithm to ensure that it captures the majority of the key texture information in leather images, meeting the demands for texture feature extraction in subsequent analysis. The Gabor filter algorithm is widely used in texture image analysis; it was initially defined by D. Gabor for one-dimensional Gabor functions [16], and Daugman extended the definition of the Gabor function from one dimension to two dimensions [17]. The two-dimensional Gabor function is obtained by modulating a Gaussian function, with its complex expression as shown in Equations (6)–(8). Equation (7) defines the rotation operation, where θ represents the rotation angle, and Equation (8) specifies the calculation method for the standard deviation of the Gaussian function.
g ( x , y ) = exp x 2 + γ 2 y 2 2 σ 2 exp i 2 π x λ + ψ
{ y = x sin θ + y cos θ x = x cos θ + y sin θ
σ = λ π ln 2 2 2 b + 1 2 b 1
In the equations, γ —spatial aspect ratio of the filter, with a value of 0.5 [18]; σ —standard deviation of the Gaussian function; λ —wavelength of the sine factor in the filter kernel function, set to π/2; ψ —phase offset of the sine factor in the filter kernel function, set to 0; θ —direction of the filter, set to π/4 [19]; and b —bandwidth of the filter, set to 1.
The leather images processed with the Gabor filter based on the improved parameters for the grayscale leather sample images are shown in Figure 2. The characteristics of the defect areas in the processed leather images are not only preserved but also their differences from the background areas are enhanced.

2.2. Texture Feature Extraction of Leather Defect Images

The surface texture of leather is characterized by fine details and high texture density, allowing texture features to be described based on the spatial gray-level dependencies of the texture images. By analyzing the gray-level co-occurrence matrix features and gray-level distribution features of the texture images, an effective feature extraction scheme is proposed.

2.2.1. Feature Extraction Algorithm for Leather Images Based on the Gray-Level Co-Occurrence Matrix

The gray-level co-occurrence matrix features of four types of leather samples are extracted, selecting eight statistical features from the matrix to describe the texture image features, including Entropy, Contrast, Energy, Homogeneity, Dissimilarity, Mean_x (mean in the x-axis direction), Variance_x (variance in the x-axis direction), and Correlation. Here, p(i,j) represents the element value at (i,j) in the gray-level co-occurrence matrix, with its calculation method shown in Equations (9)–(20).
E n t r o p y = i , j p ( i , j ) log ( p ( i , j ) )
C ontract = i , j ( i j ) 2 p ( i , j )
E n e r g y = i , j p ( i , j ) 2
H o m o g e n e i t y = i , j p ( i , j ) 1 + i j
D i s s i m i l a r i t y = i , j i j p ( i , j )
M e a n _ x = i , j i p ( i , j )
V a r i a n c e _ x = i , j p ( i , j ) ( i M e a n _ x ) 2
C o r r e l a t i o n = i , j ( i j ) p ( i , j ) u x u y / σ x σ y
u x = i i j p ( i , j )
u y = i j j p ( i , j )
σ x = i ( i u x ) 2 j p ( i , j )
σ y = i ( i u y ) 2 j p ( i , j )

2.2.2. Feature Extraction Algorithm for Leather Images Based on Gray-Level Distribution

This algorithm uses five typical statistical features from the gray-level distribution to describe the texture image features, including Skew, Kurtosis, Mean, Variance, and the first quartile (Q1). The calculation methods are shown in Equations (21)–(25).
S k e w = u 3 σ 3
K u r t = u 4 σ 4 3
M e a n = k x k p ( X = k )
V a r = k x k 2 p ( X 2 = k ) k x k p ( X = k ) 2
Q 1 = F ( 1 4 M × N )

2.3. Evaluation Methods for Neural Network Classification Models

To evaluate the classification performance of a neural network model, four types of evaluation metrics are commonly used [20]: precision, recall, F1 score, and accuracy. The formulas for each are shown in Equations (26)–(29):
Pr e c i s i o n = T P T P + F P × 100 %
Re c a l l = T P T P + F N × 100 %
F 1 _ S c o r e = 1 n i n 2 × Pr e c i s i o n i × Re c a l l j Pr e c i s i o n i + Re c a l l j × 100 %
A c c u r e c y = T P + T N T P + F P + T N + F N × 100 %
In the equations, TP—the number of positive samples correctly classified as positive; TN—the number of negative samples correctly classified as negative; FN—the number of negative samples incorrectly classified as positive; FP—the number of positive samples incorrectly classified as negative; n—the number of sample categories.
Precision measures the proportion of actual positive samples that were correctly classified. Recall measures the proportion of samples predicted to be positive that were correctly classified. F1 score is the harmonic mean of precision and recall, providing a balanced evaluation of both metrics. Accuracy represents the degree to which the predicted output matches the actual situation.

3. Construction of the Multilayer Perceptron Neural Network Model

Based on the improved image classification and recognition neural network model of the multilayer perceptron, this paper constructs a three-layer fully connected neural network, namely the multilayer perceptron neural network [21], and its architecture is shown in Figure 3. The multilayer perceptron neural network achieves mapping from input to output by cascading multiple transformations. After learning from the image feature dataset, the neural network can perform nonlinear classification of leather defect image samples. In this neural network structure, the feature data vector set of leather images is used as the input. Both hidden layers contain 20 neurons, and the activation function used is the ReLU function. In a multilayer perceptron neural network using the ReLU activation function, approximately 50% of the neurons are in an active state. This dispersion of neuron activity can reduce the overall computational cost of the network. The input vector is processed by multiple sets of affine transformations and activation functions in the hidden layers, resulting in a 20-component vector, which serves as the input to the output layer. Since this study involves the classification of four types of leather images, the output layer contains 4 neurons. The 4 affine values obtained from the output layer are processed through a SoftMax operation, yielding a set of probability values. Based on these probabilities, the leather image category represented by the input feature data vector combination is determined. Compared with the traditional multi-layer perceptron architecture, the three-layer fully connected neural network architecture constructed in this study solves the problem of overfitting or underfitting when the traditional architecture deals with complex leather defect classification problems, and can learn the feature representation of different defect images more accurately, thus improving the accuracy of classification.
The established leather image feature dataset uses strings as category labels, with “K” for holes, “H” for scratches, “W” for stains, and “N” for no defects. These four categories are then labeled using numerical data. One-hot encoding is applied to map discrete features into the Euclidean space, enabling better calculation of the distances between features, resulting in 4 label vectors.
The weight and bias update method of the neural network adopts the backpropagation algorithm and the Adam algorithm, with the update rules given by Equations (30)–(36).
g t = 1 M i = 1 M L
m t = β 1 m t 1 + ( 1 β 1 ) g t
v t = β 2 v t 1 + ( 1 β 2 ) g t 2
m t = m t 1 β 1 t
v t = v t 1 β 2 t
η t = α m t v t + ε
θ t + 1 = θ t η t
In the equations, t —number of iterations; g t —gradient of the current iteration’s loss function with respect to weights and biases; M —number of training samples used to compute the average gradient, set to 40; β 1 —exponential decay rate of the first moment, set to 0.9; β 2 —exponential decay rate of the second moment, set to 0.99; m t —first moment of the updated gradient; m t 1 —first moment of the gradient before the update; v t —second moment of the updated gradient; v t 1 —second moment of the gradient before the update; m t —correction of the first moment; v t —correction of the second moment; η t —gradient descent for the weights and biases in the current iteration; α —initial learning rate, set to 0.004; ε —constant for stability, set to 1010; θ t + 1 —updated weights or biases.
From the above equations, it can be seen that the Adam algorithm leverages the characteristics of both the first and second moments to adjust the direction and speed of gradient updates. This allows the network to accelerate learning while ensuring effective convergence. During the update of the second moment, adjustments are made based on the exponential average of the squared gradient, which reflects the severity of momentum oscillations. Therefore, the learning rate is decayed with the second moment to reduce the amplitude of these oscillations.

4. Experimental Results

4.1. Algorithm Training and Experimental Results Analysis

Based on the comprehensive leather defect detection and recognition scheme designed in this study, the dataset contains a total of 6400 leather image samples, with an equal number of samples for each of the four categories. After randomly shuffling the samples, 80% were allocated to the training set, while the remaining samples constituted the test set. Image preprocessing was performed based on improved parameters of the Gabor filter algorithm, and texture features were extracted using a combination of gray-level co-occurrence matrix features and gray-level distribution features. Finally, the number of iterations for updating weights and biases was used as a variable to train the dataset with a multilayer perceptron neural network algorithm model.
In this study, the number of iterations was set to 50,000. The obtained weights and biases were used as parameters for the multilayer perceptron neural network, which then classified the test set samples from the feature dataset. The number of test samples was 20% of the total samples, amounting to 1280 samples. Due to the random shuffling of the leather image samples, the quantities of the four categories in the test set were not the same: there were 339 hole samples, 333 scratch samples, 309 stain samples, and 299 other samples. The classification results were visually represented using a confusion matrix [22].
The gray-level co-occurrence matrix feature values for the four types of leather images were organized, randomly selecting 100 samples from each category and plotting their feature data as line graphs for analysis, as shown in Figure 4.
It is evident that there are significant differences in the distribution of the gray-level co-occurrence matrix feature values among the four sample types. The features of Entropy, Mean_x, and Variance_x exhibit substantial fluctuations, with notable differences between different categories. In contrast, Contrast, Energy, Homogeneity, Dissimilarity, and Correlation show much smaller fluctuations; although there is a clear stratification among different samples, their discrimination is limited. By combining these eight features, it is possible to reduce the errors caused by excessive fluctuations in Variance_x, Mean_x, and Entropy while ensuring a good degree of differentiation in the gray-level co-occurrence matrix feature combinations among different sample categories.
The feature dataset was used to train a neural network, and the classification performance was validated using a test set. The dataset contains a total of 6400 samples, with an equal number of samples for each of the four types of leather images. After randomly shuffling the samples, 80% were selected for the training set, with the remaining samples designated as the test set. The training process involved 5000 iterations, using accuracy, recall, and F1 score as evaluation metrics. The classification results are shown in Table 1, achieving a neural network classification accuracy of 85.47%.
The feature extraction algorithm of leather images based on gray-scale distribution is used to calculate five types of descriptive features for all the samples in the leather image dataset. A random selection of 100 samples from each of the four categories was made, and their feature data were plotted as line graphs for analysis, as shown in Figure 5. It is evident that there are significant differences in the distribution of gray-level distribution feature values among the four sample types. The Mean, Variance, and Q1 exhibit the greatest fluctuations, with the most pronounced differences between categories. In contrast, Skew and Kurtosis show smaller fluctuations; while there is clear stratification among different samples, their discrimination is limited. By combining these five features, it is possible to reduce errors caused by excessive fluctuations in Mean, Variance, and Q1 while ensuring good differentiation in the gray-level distribution feature combinations among different sample categories.
A neural network was trained using the feature dataset, and the classification performance was validated using a test set. The feature dataset contains a total of 6400 samples, with an equal number of samples for each of the four types of leather images. After randomly shuffling the samples, 80% were selected for the training set, with the remaining samples designated as the test set. The training process involved 5000 iterations, using accuracy, recall, and F1 score as evaluation metrics. The classification results are shown in Table 2, achieving a neural network classification accuracy of 78.83% for the feature dataset.
Comparing Table 1 and Table 2, it is evident that the neural network trained using gray-level co-occurrence matrix features achieves F1 scores for the classification of the four defect sample types between 80% and 90%, demonstrating balanced classification performance across different defect samples. In contrast, the neural network trained using gray-level distribution features yields F1 scores ranging from a maximum of 98.16% to a minimum of 42.27%, indicating significant differentiation in classification performance among the four defect samples. Therefore, this study proposes combining gray-level co-occurrence matrix features with gray-level distribution features as the feature dataset for neural network training, leveraging the advantages of both feature types.
By obtaining eight gray-level co-occurrence matrix features and five gray-level distribution features, the two types of features for the same samples were combined, resulting in a feature dataset containing 6400 samples, with an equal number of samples for each of the four types of leather images. After randomly shuffling the samples, 80% were selected for the training set, and the remaining samples were designated as the test set. The neural network training and classification testing were conducted using the aforementioned feature dataset, with 5000 iterations during the training process. The classification results are shown in Table 3.
The training results indicate that combining gray-level co-occurrence matrix feature combinations with gray-level distribution feature combinations as a feature dataset for neural network model training improved the classification accuracy from 85.47% and 78.73% to 91.02%, compared to training the neural network model with either gray-level co-occurrence matrix features or gray-level distribution features alone. This demonstrates the feasibility of using this feature combination scheme for neural network training, enhancing the classification performance of the trained neural network.
The training results are shown in Table 4, which indicates that the classification model achieved the highest F1 score for stain samples, while the lowest F1 score was for hole samples. Comparing the precision and recall, this suggests that the classification model performs best for stain samples, being less likely to misclassify stain samples as other types, and vice versa. In contrast, the classification model performed the worst for hole samples, misclassifying 1.17% of other category samples as hole samples and identifying 0.59% of hole samples as other categories. The neural network model classified the 1280 test samples in a total time of 0.0854 s, meaning that defect detection and recognition for an area of 1 m2 of leather would take 2.627 s, meeting the speed requirements for automated defect detection and recognition in enterprises.

4.2. Comparison of Leather Defect Detection and Recognition Algorithms

The leather defect detection and recognition algorithm proposed in this study is compared with recent domestic and international algorithms for leather defect detection and recognition. These include the support vector machine-based scheme proposed by Yin Zhifeng in 2019 [23], the convolutional neural network-based scheme proposed by Liao Jiahua in 2020 [24], the 2020 study on defect detection and recognition of animal leather based on machine vision [25], the perceptron neural network-based scheme proposed by Moganam [26], the parameter-optimized residual network-based scheme proposed by Wu Changzheng in 2020 [27], and the improved Faster R-CNN-based scheme proposed by Fang Qianqian in 2021 [28].
From Table 5, it can be seen that the leather defect detection scheme in this study has achieved a certain degree of improvement in the classification results of detecting and recognizing four types of leather textures—holes, scratches, stains, and defect-free—compared to recent domestic and international leather defect detection schemes. The overall accuracy has increased to 99.5% by using a multilayer perceptron-based image classification neural network model.

5. Conclusions

This study researched five aspects: the construction of a leather defect image dataset, leather defect image preprocessing algorithms, feature extraction algorithms for leather defect images, and multilayer perceptron classification algorithms for leather defect images. An improved Gabor filter algorithm was proposed for image preprocessing. Furthermore, statistical feature extraction algorithms based on gray-level co-occurrence matrices and gray-level distributions were studied to establish a feature dataset. Finally, a classification training of image defects was conducted using an improved multilayer perceptron image classification neural network model, achieving an average precision of 99.53%, an average recall of 99.53%, and an average classification accuracy of 99.53%. This result is significantly better than that of similar studies reported in the existing literature (such as 95% in the study by Villar et al. [12] and 97.85% in the study by Mohammed et al. [13]). The effectiveness and feasibility of this algorithm were validated through comparisons with other algorithm schemes, demonstrating that the model can meet the accuracy requirements for defect detection and recognition in the animal leather processing industry.
In recent years, the intelligent transformation of the leather manufacturing industry has been continuously advancing. However, this study still has certain limitations: optimization of the extensibility of defect detection categories. The current algorithm only covers three typical types of defects, namely holes, scratches, and stains. In subsequent research, it is necessary to construct a multi-modal defect database and systematically incorporate natural defects during the animal growth stage and derivative defects during the processing stage. Collaborative verification between the algorithm and the production system is needed. The study has not yet completed the integration verification of the algorithm and production equipment. It is necessary to deploy the detection system in the intelligent leather cutting assembly line and optimize the robustness of the model through continuous feedback under actual working conditions.

Author Contributions

Conceptualization, L.L. (Lin Liu), F.Z. and X.L. (Xibing Li); methodology, X.L. (Xizhao Li), R.W., and X.L. (Xingke Li); software, L.Z. and L.L. (Lihua Lan); validation, L.L. (Lin Liu), F.Z. and X.L. (Xibing Li); formal analysis, R.W.; resources, F.Z. and X.L. (Xibing Li); data curation, L.L. (Lin Liu); writing—original draft preparation, L.L. (Lin Liu); writing—review and editing, X.L. (Xibing Li) and F.Z.; visualization, L.L. (Lin Liu), F.Z. and X.L. (Xibing Li). All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by Fujian Research Institute of China Engineering Science and Technology Development Strategy: Research on Intelligent Construction Level and Innovation Ecosystem in Fujian Province (No.2021-DFZ-20-2), and the Natural Science Foundation of Fujian “Research on the Forming Mechanism and Heat Transfer Performance of Ultra-Thin Micro Heat Pipes” (No. 2022J01609).

Data Availability Statement

The data used to support the findings of this study are available from the corresponding author upon request.

Acknowledgments

We thank the Fujian Research Institute of China Engineering Science and technology development strategy and the Fujian Provincial Natural Science Foundation for their support.

Conflicts of Interest

Author Liwang Zheng was employed by Fujian Chengsen Group Co., Ltd. and author Lihua Lan was employed by Fujian Quanrun Construction Engineering Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Han, X.X.; Geng, S.Y.; Li, H.Y. Application Review of Defect Detection Based on Machine Vision. Electr. Eng. 2019, 14, 117–118+132. [Google Scholar]
  2. Zhang, T.; Liu, Y.T.; Yang, Y.N.; Wang, X.; Jing, Y. Review of surface defect detection based on machine vision. Sci. Technol. Eng. 2020, 20, 14366–14376. [Google Scholar]
  3. Tang, B.; Kong, J.Y.; Wu, S.Q. Review of surface defect detection based on machine vision. J. Image Graph. 2017, 22, 1640–1663. [Google Scholar]
  4. Tsai, D.M.; Huang, T.Y. Automated surface inspection for statistical textures. Image Vis. Comput. 2003, 21, 307–323. [Google Scholar] [CrossRef]
  5. Sobral, J.L. Optimised filters for texture defect detection. In Proceedings of the IEEE International Conference on Image Processing 2005, Genova, Italy, 14 September 2005; IEEE: Piscataway, NJ, USA, 2005; Volume 3, p. III-565. [Google Scholar]
  6. Liong, S.T.; Gan, Y.S.; Huang, Y.C.; Yuan, C.A.; Chang, H.C. Automatic defect segmentation on leather with deep learning. arXiv 2019, arXiv:1903.12139. [Google Scholar]
  7. Liong, S.T.; Gan, Y.S.; Huang, Y.C.; Liu, K.H.; Yau, W.C. Integrated neural network and machine vision approach for leather defect classification. arXiv 2019, arXiv:1905.11731. [Google Scholar]
  8. Ding, C.H.; Huang, H.; Peng, M. Inspection Method of Leather Defect Based on Convolutional Neural Network and Salient Feature. J. Donghua Univ. Nat. Sci. 2020, 46, 408–413. [Google Scholar]
  9. Deng, J.H.; Wu, C.Z.; Liang, H.J.; Gu, G.; Wong, S. Classification of leather defects based on a parameter-optimized residual network. Sci. Technol. Eng. 2020, 20, 3143–3148. [Google Scholar]
  10. Jawahar, M.; Babu, N.K.C.; Vani, K. Leather texture classification using wavelet feature extraction technique. In Proceedings of the 2014 IEEE International Conference on Computational Intelligence and Computing Research, Coimbatore, India, 18–20 December 2014; IEEE: Piscataway, NJ, USA, 2014; pp. 1–4. [Google Scholar]
  11. Pereira, R.F.; Dias, M.L.; de Sá Medeiros, C.M.; Rebouças Filho, P.P. Classification of Failures in Goat Leather Samples Using Computer Vision and Machine Learning. In Proceedings of the SIBGRAPI 2017—Conference on Graphics, Patterns and Images (Workshop of Industry Applications), Niterói, Brazil, 17–20 October 2017; pp. 1–9. [Google Scholar]
  12. Villar, P.; Mora, M.; Gonzalez, P. A new approach for wet blue leather defect segmentation. In Iberoamerican Congress on Pattern Recognition; Springer: Berlin/Heidelberg, Germany, 2011; pp. 591–598. [Google Scholar]
  13. Mohammed, K.M.C.; Prasad, G. Defective texture classification using optimized neural network structure. Pattern Recognit. Lett. 2020, 135, 228–236. [Google Scholar] [CrossRef]
  14. The Songyuan Municipal Bureau of Commerce. Project for Deep Processing of 500,000 High-Grade Cowhides Per Year. Available online: http://sw.jlsy.gov.cn/zsxm/xdny/201807/t20180713_223995.html (accessed on 28 March 2022).
  15. Pan, Y.F.; Yang, F.; Yang, B. Research on the Design of a Part Dimension Measurement System Based on Machine Vision. J. Shandong Ind. Technol. 2017, 20, 138. [Google Scholar]
  16. Gabor, D. Theory of communication. J. Inst. Electr. Eng. 1946, 93, 429–457. [Google Scholar] [CrossRef]
  17. Daugman, J.G. Uncertainty relation for resolution in space, spatial frequency, and orientation optimized by two-dimensional visual cortical filters. JOSA A 1985, 2, 1160–1169. [Google Scholar] [CrossRef] [PubMed]
  18. Hu, G.H. Automated defect detection in textured surfaces using optimal elliptical Gabor filters. Optik 2015, 126, 1331–1340. [Google Scholar] [CrossRef]
  19. Pistori, H.; Paraguassu, W.A.; Martins, P.S.; Conti, M.P.; Pereira, M.A.; Jacinto, M.A. Defect detection in raw hide and wet blue leather. In Computational Modelling of Objects Represented in Images; CRC Press: Boca Raton, FL, USA, 2018; pp. 355–360. [Google Scholar]
  20. Wenxia, B.; Qing, S.; Qing, S.; Linsheng, H.; Dong, L.; Jian, Z. Image recognition of field wheat scab based on multi-way convolutional neural network. Trans. Chin. Soc. Agric. Eng. Trans. CSAE 2020, 36, 174–181. [Google Scholar]
  21. Pal, S.K.; Mitra, S. Multilayer perceptron, fuzzy sets, and classification. IEEE Trans. Neural Netw. 1992, 3, 683–697. [Google Scholar] [CrossRef] [PubMed]
  22. Zhang, K.F.; Su, H.Y.; Dou, Y. A new multi-classification task accuracy evaluation method based on confusion matrix. Comput. Eng. Sci. 2021, 43, 1910–1919. [Google Scholar]
  23. Yin, Z.F. Research and Development for Leather Defect Inspection System Based on Machine Vision Detection Technology. Master’s Thesis, Guangdong University of Technology, Guangzhou, China, 2019. [Google Scholar]
  24. Liao, J.H. Intelligent Visual Inspection Technology for Flexible Leather Material Defects. Master’s Thesis, Guangdong University of Technology, Guangzhou, China, 2020. [Google Scholar]
  25. Xu, Q.; Zhao, Q.; Wang, L.; Shen, T. Rail defect detection method based on BP neural network. In International Conference on Computer Engineering and Networks; Springer: Singapore, 2020; pp. 68–78. [Google Scholar]
  26. Moganam, P.K.; Seelan, D.A.S. Perceptron Neural Network Based Machine Learning Approaches for Leather Defect Detection and Classification. Instrum. Mes. Métrologies 2020, 19, 421–429. [Google Scholar] [CrossRef]
  27. Wu, C.Z. Leather Defects Recognition and Classification Based on a Parameter Optimized Residual Network. Master’s Thesis, Guangdong University of Technology, Guangzhou, China, 2020. [Google Scholar]
  28. Fang, X.X. Research on Leather Material Defect Detection Based on Improved Faster RCNN. Master’s Thesis, Taiyuan University of Technology, Taiyuan, China, 2021. [Google Scholar]
Figure 1. Collected leather defect images.
Figure 1. Collected leather defect images.
Processes 13 01298 g001
Figure 2. Grayscale image of leather processed using the Gabor filter algorithm with improved parameters.
Figure 2. Grayscale image of leather processed using the Gabor filter algorithm with improved parameters.
Processes 13 01298 g002
Figure 3. Structure of a three-layer fully connected neural network.
Figure 3. Structure of a three-layer fully connected neural network.
Processes 13 01298 g003
Figure 4. Gray-level co-occurrence matrix feature combination of leather defect samples. (a) Feature combination of gray-level co-occurrence matrix of hole samples; (b) feature combination of gray-level co-occurrence matrix of scratch samples; (c) feature combination of gray-level co-occurrence matrix of stain samples; (d) feature combination of gray-level co-occurrence matrix of defect-free samples.
Figure 4. Gray-level co-occurrence matrix feature combination of leather defect samples. (a) Feature combination of gray-level co-occurrence matrix of hole samples; (b) feature combination of gray-level co-occurrence matrix of scratch samples; (c) feature combination of gray-level co-occurrence matrix of stain samples; (d) feature combination of gray-level co-occurrence matrix of defect-free samples.
Processes 13 01298 g004
Figure 5. Gray-level distribution feature combination of leather defect samples. (a) Feature combination of gray-scale distribution of hole samples; (b) feature combination of gray-scale distribution of scratch samples; (c) feature combination of gray-scale distribution of stain samples; (d) feature combination of gray-scale distribution of defect-free samples.
Figure 5. Gray-level distribution feature combination of leather defect samples. (a) Feature combination of gray-scale distribution of hole samples; (b) feature combination of gray-scale distribution of scratch samples; (c) feature combination of gray-scale distribution of stain samples; (d) feature combination of gray-scale distribution of defect-free samples.
Processes 13 01298 g005aProcesses 13 01298 g005b
Table 1. Classification results of feature extraction based on gray-level co-occurrence matrix.
Table 1. Classification results of feature extraction based on gray-level co-occurrence matrix.
SamplePrecision (%)Recall (%)F1_Score (%)Sample Size
Hole90.7873.7881.4347
Scratch92.2878.7484.98334
Stain83.0096.3289.16299
Defect-free78.4295.6786.19300
Arithmetic mean86.1286.1385.431280
Weighted average86.4685.4785.271280
Table 2. Classification results of feature extraction based on gray-level distribution.
Table 2. Classification results of feature extraction based on gray-level distribution.
SamplePrecision (%)Recall (%)F1_Score (%)Sample Size
Hole78.2328.9642.27335
Scratch94.1096.8195.43313
Stain98.3297.9998.16299
Defect-free58.9694.8972.73333
Arithmetic mean82.4079.6677.151280
Weighted average81.7978.8376.251280
Table 3. Classification results of combined feature extraction from both feature combinations.
Table 3. Classification results of combined feature extraction from both feature combinations.
SamplePrecision (%)Recall (%)F1_Score (%)Sample Size
Hole92.2069.0778.98291
Scratch92.8897.6095.18334
Stain99.3798.4398.90319
Defect-free82.0396.4388.65336
Arithmetic mean91.6290.3890.431280
Weighted average91.4991.0290.711280
Table 4. Leather defect classification training results based on multilayer perceptron.
Table 4. Leather defect classification training results based on multilayer perceptron.
SamplePrecision (%)Recall (%)F1_Score (%)Sample Size
Hole98.8399.4199.12339
Scratch100.0098.8099.40333
Stain100.00100.00100.00309
Defect-free99.34100.0099.67299
Arithmetic mean99.5499.5599.551280
Weighted average99.5399.5399.531280
Table 5. Comparison of classification accuracy for test set samples.
Table 5. Comparison of classification accuracy for test set samples.
Classification Algorithm SchemeHole (%)Scratch (%)Stain (%)Defect-Free (%)Overall Accuracy (%)
Support vector machine90.588.584.588.3
Convolutional neural network95.593.294.294.3
Perceptron neural network95.394.494.8
Residual network93.096.097.095.3
Faster_RCNN97.297.2
Algorithm in this study99.498.8100.0100.099.5
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

Liu, L.; Li, X.; Wang, R.; Li, X.; Zheng, L.; Lan, L.; Zhao, F.; Li, X. Research on Leather Defect Detection and Recognition Algorithm Based on Improved Multilayer Perceptron. Processes 2025, 13, 1298. https://doi.org/10.3390/pr13051298

AMA Style

Liu L, Li X, Wang R, Li X, Zheng L, Lan L, Zhao F, Li X. Research on Leather Defect Detection and Recognition Algorithm Based on Improved Multilayer Perceptron. Processes. 2025; 13(5):1298. https://doi.org/10.3390/pr13051298

Chicago/Turabian Style

Liu, Lin, Xizhao Li, Ruiyu Wang, Xingke Li, Liwang Zheng, Lihua Lan, Fangwei Zhao, and Xibing Li. 2025. "Research on Leather Defect Detection and Recognition Algorithm Based on Improved Multilayer Perceptron" Processes 13, no. 5: 1298. https://doi.org/10.3390/pr13051298

APA Style

Liu, L., Li, X., Wang, R., Li, X., Zheng, L., Lan, L., Zhao, F., & Li, X. (2025). Research on Leather Defect Detection and Recognition Algorithm Based on Improved Multilayer Perceptron. Processes, 13(5), 1298. https://doi.org/10.3390/pr13051298

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