Wood floor surface quality grading method and system based on user personalized demands

Through image acquisition and deep learning technology, combined with expert systems and fuzzy criteria, efficient identification and personalized classification of solid wood composite floor surfaces are achieved, and the problems of low manual detection efficiency and poor adaptability of personalized production in the existing technology are solved. It realizes efficient and precise personalized custom processing.

CN119048437APending Publication Date: 2024-11-29NANJING FORESTRY UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411050595.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The surface defect detection of existing solid wood composite floors relies on artificial visualization, which has strong subjectivity, low efficiency and high error detection rate, making it difficult to meet the needs of modern efficient production, and in personalized production, parameter adjustment is complex and low efficiency, making it difficult to adapt to users. Personalized needs.

Method used

Using the method of wood floor surface quality classification based on user personalized needs, the YOLOv9 model optimized by floor surface image acquisition system, image preprocessing, expert system and fuzzy criterion method, CSP structure and Transformer self-attention mechanism, realize the floor surface surface Identification and classification of features and defects, and personalized custom processing is carried out according to user needs through floor relational database storage and screening.

Benefits of technology

It realizes quantitative statistics of floor surface texture, color and defect information, has high robustness, high recognition accuracy, fast processing speed, and can personalize classification and screen according to user needs, solving the problem of complex personalized customization procedures. , promotes flexible and customized processing in the home furnishing industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048437A_ABST
    Figure CN119048437A_ABST
Patent Text Reader

Abstract

The invention discloses a wood floor surface quality grading method and system based on user personalized demands, and the method comprises the steps: collecting a floor surface image, carrying out the image preprocessing, carrying out the rough classification of a floor through an expert system and a fuzzy criterion method, and drawing label information; the floor images with the drawn labels serve as a training data set, and a YOLOv9 model optimized by combining a CSP structure and a Transform self-attention mechanism is trained; building a floor relational database used for storing the identification result of the floor image; and the plates in the floor relational database are classified and screened according to the needs of the user, so that the target of personalized customization processing is achieved. According to the method, grading and screening can be carried out according to the individual requirements of users on the surface quality of the solid wood composite floor, and the problem that the individual customization program of a solid wood composite floor enterprise at present is complex can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of solid wood composite floor defect detection, and in particular relates to a method and system for grading the surface quality of wooden floors based on personalized needs of users. Background Art

[0002] Solid wood composite flooring has become the preferred material for interior decoration due to its durability, beautiful texture, good moisture absorption and breathability. However, during the production process, there are often a variety of wood textures and defects on its surface, which makes it particularly important to extract surface information and detect defects on the floor. At present, the classification and defect detection of solid wood composite flooring workpieces mainly rely on manual vision, which has strong subjectivity, low efficiency, high false detection rate and easy fatigue, and it is difficult to meet the needs of modern efficient production. With the increasing application of intelligent technology in the wood products manufacturing industry, machine vision technology based on image processing is gradually replacing some production links that are mainly manual, and its advantages of high efficiency and high precision have been fully verified in actual production.

[0003] As the home furnishing industry is becoming more flexible and customized, users' demands for solid wood composite flooring are also becoming more diversified. During the production process, companies often need to flexibly adjust the production quality standards of flooring according to the personalized needs of different users. However, in the current wood flooring processing and sorting process, personalized processing is often achieved by modifying the internal algorithm. This method has limitations such as complex parameter adjustment, low efficiency, and poor adaptability, and it is difficult to adapt to the current personalized production processing needs. Summary of the invention

[0004] Purpose of the invention: In view of the existing problems in surface defect detection of solid wood composite flooring, the present invention provides a method for grading the surface quality of wooden flooring based on the personalized needs of users, which can grade and screen the surface quality of solid wood composite flooring according to the personalized needs of users.

[0005] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:

[0006] A method for grading the surface quality of wooden flooring based on user personalized needs comprises the following steps:

[0007] Step S1: construct a floor surface image acquisition system, and acquire floor surface images through the floor surface image acquisition system.

[0008] Step S2: The collected floor image is subjected to an image preprocessing method to obtain a standard floor surface image with obvious features that only contains the floor area.

[0009] Step S3: Based on the standard image of the floor surface and user requirements, the color, texture, and defect type of the floor surface are roughly classified using the expert system and fuzzy criterion method and label information is drawn.

[0010] Step S4: Use the labeled floor images as training data sets, and optimize the YOLOv9 model by combining the CSP structure and the Transformer self-attention mechanism. The trained optimized YOLOv9 model can be used to identify and classify floor surface features and defects in subsequent production processes.

[0011] Step S5: Build a floor relational database to store the recognition results of the floor image, extract and quantify the color, texture and defect information of the floor surface in the production line through a feature extraction method, and store this information as metadata of the floor image in the floor relational database.

[0012] Step S6: Classify and filter the panels in the floor relational database according to the user's own needs, so as to achieve the goal of personalized customization.

[0013] Preferably, in step S3, the specific steps of roughly classifying the color, texture, and defect type of the floor surface by combining the expert system and the fuzzy criterion method are as follows:

[0014] S31, using the expert system to build a floor classification knowledge base, covering the feature descriptions of color, texture and defect type and the corresponding classification rules. According to the features of color, texture and defect type, a comprehensive scoring model is established to obtain a comprehensive score of color and texture defect features.

[0015] S32, knowledge base for classification of structured floors.

[0016] S33, since color, texture and defect type are often fuzzy, fuzzy set theory is introduced. By defining a membership function for each attribute, the membership function represents the degree to which the floor surface feature belongs to a certain category.

[0017] S34, the inference engine of the expert system further infers and classifies the color, texture and defect type of the floor surface according to the rules and fuzzy criteria method in the knowledge base. The inference engine calculates the membership degree of the input floor surface features through fuzzy matching and fuzzy reasoning. The fuzzy reasoning results of different features belonging to different categories are obtained through the membership degrees of different features belonging to different categories.

[0018] S35, according to the fuzzy inference results of different features belonging to each category, the maximum membership principle is used to obtain the fuzzy inference result with the highest probability. The fuzzy inference result with the highest probability is compared with the comprehensive score of the color and texture defect features to determine the final fuzzy classification of the floor surface.

[0019] Optimum: The final fuzzy classification formula for the floor surface is as follows:

[0020]

[0021] In the formula, D represents the final fuzzy classification of the floor surface, argmax represents the maximum membership principle, and F(C i ,T i ,D i ) represents the fuzzy reasoning result, C i Represents the floor color characteristics, T i Represents the floor texture characteristics, D i Indicates the floor defect characteristics, S k (C i ,T i ,D i ) represents the comprehensive score of the kth classification rule, w k represents the weight coefficient, μ(C i ) represents the characteristic function value of the floor color, μ(T i ) represents the characteristic function value of the texture, μ(D i ) represents the characteristic function value of the defect type, α i is the floor color feature hyperparameter, β i is the texture feature hyperparameter, γ i is the defect type characteristic hyperparameter, λ k It is an index related to the complexity of the rules.

[0022] Preferably: in step S2, the image preprocessing implementation method is as follows:

[0023] S21, convert the original image into a grayscale image by weighted averaging method, and obtain a more reasonable grayscale image by weighted averaging the three components of RGB. The formula is as follows:

[0024] Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.144*B(i,j);

[0025] Among them, Gray(i,j) represents the gray value of the pixel (i,j), R(i,j) represents the red component value of the pixel (i,j), G(i,j) represents the green component value of the pixel (i,j), B(i,j) represents the blue component value of the pixel (i,j), i represents the row coordinate of the pixel, and j represents the column coordinate of the pixel.

[0026] S22, use Gaussian filtering to smooth the image and reduce the noise on the image surface. The formula is as follows:

[0027]

[0028] Where G(x,y) is the pixel value of the filtered image at coordinate (x,y). σ is the standard deviation of the Gaussian function, which determines the weight distribution of the Gaussian function.

[0029] S23, using the grayscale threshold binarization method to separate the background and floor areas in the image, by setting a suitable threshold, the boundary between the floor and the background can be clearly defined, and a black mask image can be generated, which facilitates the subsequent floor feature extraction.

[0030] S24, overlaying the black mask image on the original image to obtain a standard floor surface image that does not include the background.

[0031] Preferably, in step S4, the YOLOv9 model using the CSP structure and Transformer optimization is further adopted and applied to the training classification of the expert system annotated file images. The specific process is as follows:

[0032] S41: First, the image file data is enhanced, including flipping, rotating at any angle, adding noise, and adjusting brightness, so as to simulate floor images under different lighting conditions and shooting angles.

[0033] S42: Introduced the YOLOv9 model and used the CSP structure and Transformer self-attention mechanism to optimize the model. The CSP structure improves the performance of deep neural networks by dividing the input features into two parts and then cross-connecting the two parts. The CSP structure can effectively improve the feature representation ability of the model, thereby improving the accuracy and generalization ability of the model. The Transformer self-attention mechanism can better capture the contextual information and long-distance dependencies in the image when the target defect area is small or mixed in complex textures, thereby improving the recognition accuracy of the model.

[0034] The self-attention mechanism calculates the similarity or correlation between Q and K, obtains the weight coefficient of each K corresponding to V, and then performs weighted summation on V to obtain the final Attention value. The calculation formula is as follows:

[0035]

[0036] Where Q represents the query matrix, which is used to match the key matrix. K represents the key matrix, which is used to match the query matrix. V represents the value matrix, which contains the information used to update the query. k is the dimension of the key vector, which is used to scale the dot product result to prevent the gradient from disappearing or exploding. The soft max function is used to normalize the dot product result to a probability distribution.

[0037] S43: Calculate the precision and recall rate based on the classification results, and use them to draw the PR curve, and calculate the average precision to evaluate the model.

[0038] S44, according to the evaluation results, adjust the learning rate and layer structure parameters to improve the model classification effect.

[0039] Preferably: in step S42, specific statistical methods for different parameter types are as follows:

[0040] Color: The color histogram of the defect area is counted by the advanced color space CIELab, and the color feature vector is calculated to quantify the color information of the defect area. The color feature vector is a multi-order color moment, including mean, variance and slope. The calculation formula is as follows:

[0041] The mean reflects the average intensity of each color component of the image:

[0042]

[0043] Variance reflects the color variance, or unevenness, of the image area to be tested:

[0044]

[0045] The slope reflects the skewness of the image color components, that is, the asymmetry of the color:

[0046]

[0047] Where P i,j represents the jth color component of the i-th pixel in the floor color image, and N represents the number of pixels in the image.

[0048] The first three color moments of the three components R, G, and B of the image form a 9-dimensional histogram vector, that is, the color features of the image are expressed as follows:

[0049]

[0050] Texture: The local binary pattern (LBP) combining equivalent patterns and rotation invariance is used to describe the texture, and the texture features are quantified by counting its histogram.

[0051] The steps of extracting texture with LBP feature vector are as follows:

[0052] 1. Calculate the LBP mode of each pixel in the floor image. Divide the image into several 16*16 image sub-blocks and calculate the LBP value of each pixel in each sub-block.

[0053] 2. Calculate the LBP feature value histogram of each sub-block, obtain the histogram of each image sub-block, and then normalize these histograms.

[0054] 3. Connect the normalized histogram of each sub-block into a feature vector, which is the LBP texture feature vector of the entire image. The calculation formula is as follows:

[0055]

[0056] Where (x c ,y c ) is the center pixel, g c is brightness; g p is the brightness of the adjacent pixels; s is the sign function.

[0057] Physical parameters: Physical parameters are the area, location and number of defects. Connected component analysis is used to count continuous defective pixel areas and record them as different components. The number of components is the number. At the same time, the threshold is specified by statistical calculation of the average grayscale value of the component area, the image is segmented by the resulting threshold, and the edges are smoothed by morphological operations. The boundary tracking algorithm is used to calculate the area of ​​the defect area. Then, the SURF defect point algorithm is used to count the key points of the defect area in the image to evaluate the geometric center of each component. Finally, the Euclidean distance from the geometric center point to the center point of the plate is calculated to determine the location of the defect.

[0058] Preferably: in step S6, a graphical user interface is designed and constructed to visualize the database information, and the quantization parameter is replaced by a grade classification model as a screening condition, and the range of the quantization parameter corresponding to different grades is adjusted.

[0059] Preferably, the floor surface image acquisition system includes an industrial linear array CCD camera, an adjustable light source system, a mechanical transmission device and an image processing card, wherein the mechanical transmission device is used to adjust the positions of the industrial linear array CCD camera and the adjustable light source system, and the adjustable light source system is used to provide a light source with a required light source intensity to the floor of the plate conveyor belt. The industrial linear array CCD camera is used to take pictures of the floor under the light source. The image processing card is used to process the taken floor pictures to obtain clear and standard floor images.

[0060] Preferably: the scanning frequency of the industrial camera is consistent with the conveying frequency of the plate conveyor belt.

[0061] Preferably: in step S3, defects include floor growth defects, floor biological infection defects and floor processing defects. Floor growth defects include surface color difference, white edges, knots, cracks, skin and mineral lines. Floor biological infection defects include decay, fungal discoloration and insect holes. Floor processing defects include saw marks, peeling, glue penetration, joints and defects.

[0062] A wooden floor surface quality grading system based on user personalized needs is used to implement a wooden floor surface quality grading method based on user personalized needs, comprising a floor surface image acquisition system, an image preprocessing unit, a coarse classification unit, a secondary classification unit, a floor relational database unit, and a grading screening unit, wherein:

[0063] The floor surface image acquisition system is used to acquire floor surface images.

[0064] The image preprocessing unit is used to process the collected floor image through an image preprocessing method to obtain a floor surface standard image with obvious features that only contains the floor area.

[0065] The rough classification unit is used to perform rough classification operations on the color, texture, and defect type of the floor surface and draw label information based on the floor surface standard image and user requirements using an expert system and a fuzzy criterion method.

[0066] The secondary classification unit is used to use the floor images with labels as training data sets, and realizes the recognition and classification of floor surface features and defects in subsequent production processes by combining the CSP structure and the YOLOv9 model optimized by the Transformer self-attention mechanism.

[0067] The floor relational database unit is used to store the recognition results of the floor image, extract and quantify the color, texture and defect information of the floor surface in the production line through a feature extraction method, and store this information as metadata of the floor image in the floor relational database.

[0068] The grading and screening unit is used to grade and screen the panels in the floor relational database according to the user's own needs, so as to achieve the goal of personalized customization and processing.

[0069] Compared with the prior art, the present invention has the following beneficial effects:

[0070] Expert systems, deep learning neural network algorithms, and image processing algorithms are used to achieve quantitative statistics of floor surface texture, color, and other various defect information, and a database is built based on image information statistics to achieve personalized grading and indexing. It has the advantages of good robustness, high recognition accuracy, fast processing speed, and convenient update and maintenance. It can grade and screen according to the user's personalized needs for the surface quality of solid wood composite flooring, which can effectively solve the problem of complex personalized customization procedures for solid wood composite flooring companies at present, and further promote the development of flexible and customized processing in the home furnishing industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0072] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0073] Example

[0074] A method for grading the surface quality of wooden flooring based on user personalized needs, such as Figure 1 As shown, the following steps are included:

[0075] Step S1: construct a floor surface image acquisition system, and acquire floor surface images through the floor surface image acquisition system.

[0076] In another embodiment, the floor surface image acquisition system includes an industrial linear array CCD camera, an adjustable light source system, a mechanical transmission device and an image processing card, wherein the mechanical transmission device is used to adjust the positions of the industrial linear array CCD camera and the adjustable light source system, and the adjustable light source system is used to provide a light source with a required light source intensity to the floor of the plate conveyor belt. The industrial linear array CCD camera is used to take pictures of the floor under the light source. The image processing card is used to process the taken floor pictures to obtain clear and standard floor images.

[0077] In another embodiment, the scanning frequency of the industrial camera is kept consistent with the conveying frequency of the plate conveyor belt, and a black screen, appropriate light source intensity and camera white balance parameters are used to reduce interference from ambient light.

[0078] Step S2: The collected floor image is subjected to image preprocessing methods such as Gaussian filtering, gray threshold binarization, and mask processing to obtain a standard floor surface image with obvious features that only contains the floor area.

[0079] In another embodiment, in step S2, the image preprocessing implementation method is as follows:

[0080] S21, convert the original image into a grayscale image by weighted averaging method, and obtain a more reasonable grayscale image by weighted averaging the three components of RGB. The formula is as follows:

[0081] Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.144*B(i,j);

[0082] Among them, Gray(i,j) represents the gray value of the pixel (i,j), R(i,j) represents the red component value of the pixel (i,j), G(i,j) represents the green component value of the pixel (i,j), B(i,j) represents the blue component value of the pixel (i,j), i represents the row coordinate of the pixel, and j represents the column coordinate of the pixel.

[0083] S22, use Gaussian filtering to smooth the image and reduce the noise on the image surface. The formula is as follows:

[0084]

[0085] Where G(x,y) is the pixel value of the filtered image at coordinate (x,y). σ is the standard deviation of the Gaussian function, which determines the weight distribution of the Gaussian function.

[0086] S23, uses the grayscale threshold binarization method to separate the background and floor areas in the image, and uses the Otsu method to find the threshold that maximizes the inter-class variance between the background and the foreground, so as to adaptively adjust the threshold according to different backgrounds to clearly separate the floor and background areas in the image, and generate a black mask image to facilitate the subsequent floor feature extraction.

[0087] The maximum between-class variance formula is as follows:

[0088]

[0089] in,

[0090] Indicates the probability that the pixel grayscale is less than the set threshold Th;

[0091] Indicates the probability that the pixel grayscale is greater than the set threshold Th

[0092] Represents the cumulative mean of gray level k;

[0093] Represents the global mean of image grayscale;

[0094] σ 2represents the inter-class variance, k represents the maximum gray level (threshold), and G represents 256 gray levels.

[0095] S24, overlaying the black mask image on the original image to obtain a standard floor surface image that does not include the background.

[0096] Step S3: Based on the standard image of the floor surface and user requirements, the color, texture, and defect type of the floor surface are roughly classified using the expert system and fuzzy criterion method and label information is drawn.

[0097] Defects include floor growth defects, floor biological infection defects and floor processing defects. Floor growth defects include surface color difference, white edges, knots, cracks, skin and mineral lines. Floor biological infection defects include decay, fungal discoloration and insect holes. Floor processing defects include saw marks, peeling, glue penetration, joints and defects.

[0098] In another embodiment, in step S3, the rough classification process of the color, texture and defect type of the floor surface is refined, integrating the expert system and the fuzzy criterion method, and the specific steps are optimized as follows:

[0099] S31, build classification knowledge base and scoring mechanism: Use expert system to build floor classification knowledge base, covering the feature description of color, texture and defect type and the corresponding classification rules R k , introduced a comprehensive scoring model to scientifically evaluate the floor surface quality. The comprehensive scoring model is as follows:

[0100]

[0101] In the formula, S k (C i ,T i ,D i ) represents the classification rule R k The overall score is C i Represents the floor color characteristics, T i Represents the floor texture characteristics, D i Represents the floor defect characteristics, w k is its weight coefficient, μ(C i )、μ(T i )、μ(D i ) represent the characteristic function values ​​of floor color, texture, and defect type respectively; α i , β i , γ i As a hyperparameter, the optimal value is obtained through machine learning techniques of cross-validation and random search, aiming to regulate the nonlinear contribution of features to classification rules; λ k It is an index related to the complexity of rules, and its calculation method is based on the complexity of interaction between features Ik and the global maximum interaction metric I max , through logarithmic function smoothing, to ensure the balance of the formula:

[0102]

[0103] In the formula, λ k is an index related to the complexity of the rules, I k represents the interaction complexity, I max represents the global maximum interaction measure, n k Representation rule R k is the number of features, and N is the complexity base constant.

[0104] S32, construction of structured knowledge base: The knowledge of the expert system comes from the experience and knowledge of experts in the field, and is stored in the knowledge base in a structured way to facilitate the retrieval and application of knowledge and ensure the accuracy and comprehensiveness of the classification rules. The formula is as follows:

[0105] E={(C1,T1,D1,R1),(C2,T2,D2,R2),...,(C i ,T i ,D i ,R i ),...,(C n ,T n ,D n ,R n )}

[0106] In the formula, C i Represents the floor color characteristics, T i Represents the floor texture characteristics, D i Represents the floor defect characteristics, R i represents classification rules, and E represents the expert system knowledge base, which is constructed in a structured way by combining the experience and knowledge of domain experts, covering features and corresponding classification rules.

[0107] S33, fuzzy set theory is introduced. Since color, texture and defect type are often fuzzy, fuzzy set theory is introduced. By defining a membership function for each attribute, the membership function represents the degree to which the floor surface feature belongs to a certain category.

[0108] Taking floor defects as an example, the trapezoidal membership function is used to quantify the membership of the defect area. The mathematical expression is as follows:

[0109]

[0110] Among them, T(x j ) represents the degree of membership of the floor defect area, x jrepresents the coordinates of the defect area, and a, b, c, and d represent the upper and lower boundaries and intersection points of the trapezoidal membership function, respectively.

[0111] S34, fuzzy reasoning and classification: The reasoning engine of the expert system further infers and classifies the color, texture and defect type of the floor surface according to the rules and fuzzy criteria in the knowledge base. The reasoning engine calculates the membership of the input floor surface features through fuzzy matching and fuzzy reasoning. The fuzzy reasoning results of different features belonging to different categories are obtained through the membership of different features belonging to different categories;

[0112] The formula is as follows:

[0113]

[0114] Among them, F(C i ,T i ,D i ) represents the feature C i ,T i ,D i (color, texture, defect type) fuzzy reasoning results.

[0115] R k Represents the kth rule in the knowledge base.

[0116] μ(C i (x j )) represents feature C i (color) at point x j The degree of membership.

[0117] μ(T i (x j )) represents feature T i (texture) at point x j The degree of membership.

[0118] μ(D i (x j )) indicates feature D i (defect type) at point x j The degree of membership.

[0119] Indicates the sum of all related rules.

[0120] S35, according to the fuzzy reasoning results of different features belonging to each category, the maximum membership principle is used to obtain the fuzzy reasoning result with the highest probability; the fuzzy reasoning result with the highest probability is compared with the comprehensive score of the color and texture defect features to determine the final fuzzy classification of the floor surface, so that the obtained result is more objective, the classification is more refined, and the accuracy is higher.

[0121] According to the calculation results of the membership, the maximum membership principle is used to determine the fuzzy reasoning result with the highest probability of the floor surface. Its mathematical expression is as follows:

[0122] D F = argmaxF(C i ,T i ,D i );

[0123] Among them, D F represents the fuzzy inference result with the maximum probability on the floor surface, C i It indicates the floor surface color, T i Indicates floor texture, D i Indicates the floor defect type. argmax represents the maximum membership principle, that is, the category with the highest membership is selected as the fuzzy set of different categories of the final classification result.

[0124] The floor surface quality information is roughly classified according to the comprehensive score of color and texture defects and the results of fuzzy reasoning. The mathematical expression is as follows:

[0125]

[0126] Finally, the final fuzzy classification formula for the floor surface is as follows:

[0127]

[0128] In the formula, D represents the final fuzzy classification of the floor surface, argmax represents the maximum membership principle, and F(C i ,T i ,D i ) represents the fuzzy reasoning result, C i Represents the floor color characteristics, T i Represents the floor texture characteristics, D i Indicates the floor defect characteristics, S k (C i ,T i ,D i ) represents the comprehensive score of the kth classification rule, w k represents the weight coefficient, μ(C i ) represents the characteristic function value of the floor color, μ(T i ) represents the characteristic function value of the texture, μ(D i ) represents the characteristic function value of the defect type, α i is the floor color feature hyperparameter, β i is the texture feature hyperparameter, γ i is the defect type characteristic hyperparameter, λ k It is an index related to the complexity of the rules.

[0129] Step S4: Use the labeled floor images as training data sets, and optimize the YOLOv9 model by combining the CSP structure and the Transformer self-attention mechanism. The trained optimized YOLOv9 model can be used to identify and classify floor surface features and defects in subsequent production processes.

[0130] In another embodiment, in step S4, the YOLOv9 model using the CSP structure and Transformer optimization is further adopted and applied to the training classification of the expert system annotated file images. The specific process is as follows:

[0131] S41: In order to enhance the generalization ability of the model, the image file data is first enhanced, including flipping, rotating at any angle, adding noise, adjusting brightness, etc., to simulate floor images under different lighting conditions and shooting angles.

[0132] S42: Introduce the YOLOv9 model, and use the CSP structure and Transformer self-attention mechanism to optimize the model. The CSP structure improves the performance of deep neural networks by dividing the input features into two parts and then cross-connecting the two parts. The CSP structure can effectively improve the feature representation ability of the model, thereby improving the accuracy and generalization ability of the model. The Transformer self-attention mechanism can better capture the contextual information and long-distance dependencies in the image when the target defect area is small or mixed in complex textures, thereby improving the recognition accuracy of the model. The self-attention mechanism calculates the similarity or correlation between Q and K, obtains the weight coefficient of V corresponding to each K, and then performs a weighted sum on V to obtain the final Attention value. The calculation formula is as follows:

[0133]

[0134] Where Q represents the query matrix, which is used to match the key matrix. K represents the key matrix, which is used to match the query matrix. V represents the value matrix, which contains the information used to update the query.

[0135] d k is the dimension of the key vector, which is used to scale the dot product result to prevent the gradient from disappearing or exploding. The soft max function is used to normalize the dot product result to a probability distribution.

[0136] S43: According to the classification results, the precision (Presion) and recall (Recall) are calculated, and the PR curve is drawn based on this, and the mean average precision (mAP) is calculated to evaluate the model.

[0137] S44, according to the evaluation results, adjust the learning rate and layer structure parameters to improve the model classification effect.

[0138] In another embodiment, in step S4, quantitative analysis is performed for different types of defects. Different types of defects require different quantitative parameters to be counted. For example, defects such as surface color difference, white edge, decay, fungal discoloration, and skinning require the color change of the floor surface to be counted; knots require the number and color to be counted; cracks require the number, area, and position to be counted; mineral lines require the area to be counted; and wormholes require the number to be counted. The quantitative parameters mainly include color, texture, area, position, and number. The quantitative method used is: using contour extraction algorithm and mask method to segment the defect area, and identifying and classifying its parameters according to the identified defect type.

[0139] In another embodiment, in step S42, specific statistical methods for different parameter types are as follows:

[0140] Color: The color histogram of the defect area is counted by the advanced color space CIELab, and the color feature vector is calculated to quantify the color information of the defect area. The color feature vector is mainly a multi-order color moment, including mean, variance and slope. The calculation formula is as follows:

[0141] The mean reflects the average intensity of each color component of the image:

[0142]

[0143] Variance reflects the color variance, or unevenness, of the image area to be tested:

[0144]

[0145] The slope reflects the skewness of the image color components, that is, the asymmetry of the color:

[0146]

[0147] Where P i,j represents the jth color component of the i-th pixel in the floor color image, and N represents the number of pixels in the image.

[0148] The first three color moments of the three components R, G, and B of the image form a 9-dimensional histogram vector, that is, the color features of the image are expressed as follows:

[0149]

[0150] Texture: The local binary pattern (LBP) that combines equivalent patterns and rotation invariance is used to describe the texture, and the texture features are quantified by counting its histogram. The steps for extracting texture from LBP feature vector are as follows:

[0151] 1. Calculate the LBP mode of each pixel in the floor image. Divide the image into several 16*16 image sub-blocks and calculate the LBP value of each pixel in each sub-block;

[0152] 2. Calculate the LBP feature value histogram of each sub-block, obtain the histogram of each image sub-block, and then normalize these histograms;

[0153] 3. Connect the normalized histogram of each sub-block into a feature vector, which is the LBP texture feature vector of the entire image. The calculation formula is as follows:

[0154]

[0155] Where (x c ,y c ) is the center pixel, g c is brightness; g p is the brightness of the adjacent pixels; s is the sign function.

[0156] Physical parameters: Physical parameters are the area, location and number of defects. Connected component analysis is used to count continuous defective pixel areas and record them as different components. The number of components is the number. At the same time, the threshold is specified by statistical calculation of the average grayscale value of the component area, the image is segmented by the resulting threshold, and the edges are smoothed by morphological operations. The boundary tracking algorithm is used to calculate the area of ​​the defect area. Then, the SURF defect point algorithm is used to count the key points of the defect area in the image to evaluate the geometric center of each component. Finally, the Euclidean distance from the geometric center point to the center point of the plate is calculated to determine the location of the defect.

[0157] Step S5: Build a floor relational database to store the recognition results of floor images, extract and quantify the color, texture and defect information of the floor surface in the production line through feature extraction methods, and store this information as metadata of the floor image in the database.

[0158] In another embodiment, a floor relational database is built to store floor classification batch numbers and obtained surface feature quantitative parameters. The database can implement indexing, deletion, addition and modification operations, which is convenient for users to query and manage data according to their needs. The specific implementation method is as follows:

[0159] S51, save the storage location of each scanned floor and their classification information.

[0160] S52, according to the defect standard determined by the expert system, the corresponding parameters are saved, and an index is created for each parameter.

[0161] S53, the database completes the operations of adding, deleting, and changing the data in the table according to the executed transaction.

[0162] Step S6: Classify and filter the panels in the floor relational database according to the user's own needs, so as to achieve the goal of personalized customization.

[0163] In another embodiment, a graphical user interface (GUI) is designed and constructed based on the data information of the floor relational database. Users can classify and filter the panels in the database according to their own needs, thereby achieving the goal of personalized customization.

[0164] In another embodiment, a graphical user interface (GUI) is designed and constructed to visualize the database information, and a simple level division is used instead of a quantitative parameter as a screening condition, and the range of the quantitative parameter corresponding to different levels can be adjusted. In addition, the module also supports data export and report generation functions, which facilitates users to perform data analysis and decision support.

[0165] In another embodiment, the quantitative parameters that can be screened include floor wood species, color depth, texture type, and the type, number, area and location of defects on the board.

[0166] In another embodiment, a wooden floor surface quality grading system based on user personalized needs is provided, which is used to implement a wooden floor surface quality grading method based on user personalized needs, including a floor surface image acquisition system, an image preprocessing unit, a coarse classification unit, a secondary classification unit, a floor relational database unit, and a grading screening unit, wherein:

[0167] The floor surface image acquisition system is used to acquire floor surface images.

[0168] The image preprocessing unit is used to process the collected floor image through an image preprocessing method to obtain a floor surface standard image with obvious features that only contains the floor area.

[0169] The rough classification unit is used to perform rough classification operations on the color, texture, and defect type of the floor surface and draw label information based on the floor surface standard image and user requirements using an expert system and a fuzzy criterion method.

[0170] The secondary classification unit is used to use the floor images with labels as training data sets, and realizes the recognition and classification of floor surface features and defects in subsequent production processes by combining the CSP structure and the YOLOv9 model optimized by the Transformer self-attention mechanism.

[0171] The floor relational database unit is used to store the recognition results of the floor image, extract and quantify the color, texture and defect information of the floor surface in the production line through a feature extraction method, and store this information as metadata of the floor image in the floor relational database.

[0172] The grading and screening unit is used to grade and screen the panels in the floor relational database according to the user's own needs, so as to achieve the goal of personalized customization and processing.

[0173] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for grading the surface quality of wooden floors based on user personalized needs. It is characterized in that The following steps are involved: Step S1: constructing a floor surface image acquisition system, and acquiring a floor surface image through the floor surface image acquisition system; Step S2: The collected floor image is subjected to an image preprocessing method to obtain a standard floor surface image with obvious features that only includes the floor area; Step S3: Based on the standard image of the floor surface and user requirements, the color, texture, and defect type of the floor surface are roughly classified using the expert system and fuzzy criterion method, and label information is drawn; Step S4: Use the labeled floor images as training data sets, train the YOLOv9 model optimized by combining the CSP structure and the Transformer self-attention mechanism, and use the trained optimized YOLOv9 model to recognize and classify floor surface features and defects in subsequent production processes; Step S5: Building a floor relational database for storing the recognition results of the floor image, extracting and quantifying the color, texture and defect information of the floor surface in the production line through a feature extraction method, and storing this information as metadata of the floor image in the floor relational database; Step S6: Classify and filter the panels in the floor relational database according to the user's own needs, so as to achieve the goal of personalized customization.

2. According to the method for grading the surface quality of wooden flooring based on user personalized needs according to claim 1, Features: In step S3, the specific steps of roughly classifying the color, texture, and defect type of the floor surface by combining the expert system and the fuzzy criterion method are as follows: S31, using the expert system to build a floor classification knowledge base, covering the characteristic descriptions of color, texture and defect type and the corresponding classification rules; according to the characteristics of color, texture and defect type, a comprehensive scoring model is established to obtain a comprehensive score of color and texture defect characteristics; S32, knowledge base for classification of structured floors; S33, since color, texture and defect type are often fuzzy, fuzzy set theory is introduced to define a membership function for each attribute, which represents the degree to which the floor surface feature belongs to a certain category; S34, the inference engine of the expert system further infers and classifies the color, texture and defect type of the floor surface according to the rules and fuzzy criteria method in the knowledge base; the inference engine calculates the membership degree of the feature to each category through fuzzy matching and fuzzy reasoning based on the input floor surface features; the fuzzy reasoning results of different features belonging to each category are obtained through the membership degrees of different features belonging to each category; S35, according to the fuzzy inference results of different features belonging to each category, the maximum membership principle is used to obtain the fuzzy inference result with the highest probability; The fuzzy inference result with the highest probability is compared with the comprehensive score of color and texture defect features to determine the final fuzzy classification of the floor surface.

3. According to the method for grading the surface quality of wooden flooring based on user personalized needs as claimed in claim 1, It is characterized in that The final fuzzy classification formula for the floor surface is as follows: In the formula, D represents the final fuzzy classification of the floor surface, argmax represents the maximum membership principle, and F(C i , T i , D i ) represents the fuzzy reasoning result, C i Represents the floor color characteristics, T i Represents the floor texture characteristics, D i Indicates the floor defect characteristics, S k (C i , T i , D i ) represents the comprehensive score of the kth classification rule, w k represents the weight coefficient, μ(C i ) represents the characteristic function value of the floor color, μ(T i ) represents the characteristic function value of the texture, μ(D i ) represents the characteristic function value of the defect type, α i is the floor color feature hyperparameter, β i is the texture feature hyperparameter, γ i is the defect type characteristic hyperparameter, λ k It is an index related to the complexity of the rules.

4. According to the method for grading the surface quality of wooden flooring based on user personalized needs as described in claim 2, Features: In step S2, the image preprocessing implementation method is as follows: S21, convert the original image into a grayscale image by weighted averaging method, and obtain a more reasonable grayscale image by weighted averaging the three components of RGB. The formula is as follows: Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.144*B(i,j); Where Gray(i, j) represents the gray value of pixel (i, j), R(i, j) represents the red component value of pixel (i, j), G(i, j) represents the green component value of pixel (i, j), B(i, j) represents the blue component value of pixel (i, j), i represents the row coordinate of the pixel, and j represents the column coordinate of the pixel; S22, use Gaussian filtering to smooth the image and reduce the noise on the image surface. The formula is as follows: Where G(x, y) is the pixel value of the filtered image at the coordinate (x, y); σ is the standard deviation of the Gaussian function, which determines the weight distribution of the Gaussian function; S23, using a grayscale threshold binarization method to separate the background and floor areas in the image. By setting a suitable threshold, the boundary between the floor and the background can be clearly defined, and a black mask image can be generated; S24, overlaying the black mask image on the original image to obtain a standard floor surface image that does not include the background.

5. According to the method for grading the surface quality of wooden flooring based on user personalized needs as claimed in claim 3, Features: In step S4, the YOLOv9 model using the CSP structure and Transformer optimization is used and applied to the training classification of the expert system annotated file images. The specific process is as follows: S41: firstly, the image file data is enhanced, including flipping, rotating at any angle, adding noise, and adjusting brightness, so as to simulate floor images under different lighting conditions and shooting angles; S42: Introduced the YOLOv9 model, and used the CSP structure and Transformer self-attention mechanism to optimize the model. The CSP structure improves the performance of deep neural networks by dividing the input features into two parts and then cross-connecting the two parts. The CSP structure can effectively improve the feature representation ability of the model, thereby improving the accuracy and generalization ability of the model. The Transformer self-attention mechanism can better capture the contextual information and long-distance dependencies in the image when the target defect area is small or mixed in complex textures, thereby improving the recognition accuracy of the model. The self-attention mechanism calculates the similarity or correlation between Q and K, obtains the weight coefficient of each K corresponding to V, and then performs weighted summation on V to obtain the final Attention value. The calculation formula is as follows: Where Q represents the query matrix, which is used to match the key matrix; K represents the key matrix, which is used to match the query matrix; V represents the value matrix, which contains the information used to update the query; d k is the dimension of the key vector, which is used to scale the dot product result to prevent the gradient from disappearing or exploding. The softmax function is used to normalize the dot product result into a probability distribution; S43: Calculate the precision and recall rate according to the classification results, draw the PR curve based on them, and calculate the average precision to evaluate the model; S44, according to the evaluation results, adjust the learning rate and layer structure parameters to improve the model classification effect.

6. According to the method for grading the surface quality of wooden flooring based on user's personalized needs as claimed in claim 4, It is characterized in that In step S42, specific statistical methods for different parameter types are as follows: Color: The color histogram of the defect area is counted by the advanced color space CIELab, and the color feature vector is calculated to quantify the color information of the defect area; the color feature vector is a multi-order color moment, including mean, variance and slope, and the calculation formula is as follows: The mean reflects the average intensity of each color component of the image: Variance reflects the color variance, or unevenness, of the image area to be tested: The slope reflects the skewness of the image color components, that is, the asymmetry of the color: Where P i,j represents the jth color component of the i-th pixel in the floor color image, and N represents the number of pixels in the image; The first three color moments of the three components of the image R, G, B form a 9-dimensional histogram vector, that is, the color features of the image are expressed as follows: F color =[μr,σ r ,s r ,m g ,s g ,s g ,m b ,s b ,s b ]; Texture: The local binary pattern (LBP) that combines equivalent patterns and rotation invariance is used to describe the texture, and the texture features are quantified by counting its histogram; The steps of LBP feature vector extraction texture are as follows: Step S421. Calculate the LBP mode of each pixel in the floor image; divide the image into a number of 16*16 image sub-blocks, and calculate the LBP value of each pixel in each sub-block; Step S422. Calculate the LBP feature value histogram of each sub-block to obtain the histogram of each image sub-block, and then normalize these histograms; Step S423. Connect the obtained normalized histograms of each sub-block into a feature vector, that is, the LBP texture feature vector of the entire image, and the calculation formula is as follows: Where (x c ,y c ) is the center pixel, g c is brightness; g p is the brightness of the adjacent pixels; s is the sign function; Physical parameters: Physical parameters are the area, location and number of defects. Connected component analysis is used to count continuous defective pixel areas and record them as different components. The number of components is the number. At the same time, the threshold is specified by statistical calculation of the average grayscale value of the component area, the image is segmented by the resulting threshold, and the edges are smoothed using morphological operations. The area of ​​the defective area is calculated using a boundary tracking algorithm. The SURF defect point algorithm is then used to count the key points of the defective area in the image to evaluate the geometric center of each component. Finally, the location of the defect is determined by calculating the Euclidean distance from the geometric center point to the center point of the panel.

7. According to the method for grading the surface quality of wooden flooring based on user's personalized needs as claimed in claim 6, Features: The floor surface image acquisition system includes an industrial linear array CCD camera, an adjustable light source system, a mechanical transmission device and an image processing card. The mechanical transmission device is used to adjust the positions of the industrial linear array CCD camera and the adjustable light source system. The adjustable light source system is used to provide a light source with a light intensity that meets the requirements for the floor of the plate conveyor belt; the industrial linear array CCD camera is used to take pictures of the floor under the light source; and the image processing card is used to process the taken floor pictures to obtain clear and standard-compliant floor images.

8. According to the method for grading the surface quality of wooden flooring based on user's personalized needs as claimed in claim 7, Features: The scanning frequency of the industrial camera is consistent with the conveying frequency of the plate conveyor belt.

9. According to the method for grading the surface quality of wooden flooring based on user's personalized needs as claimed in claim 8, Features: In step S3, defects include floor growth defects, floor biological infection defects and floor processing defects. Floor growth defects include surface color difference, white edges, knots, cracks, skin and mineral lines. Floor biological infection defects include decay, fungal discoloration and insect holes. Floor processing defects include saw marks, peeling, glue penetration, joints and defects.

10. A wooden floor surface quality grading system based on user personalized needs. It is characterized in that The method for grading the surface quality of wooden flooring based on the personalized needs of users as described in claim 1 comprises a floor surface image acquisition system, an image preprocessing unit, a coarse classification unit, a secondary classification unit, a floor relational database unit, and a grading screening unit, wherein: The floor surface image acquisition system is used to acquire floor surface images; The image preprocessing unit is used to process the collected floor image through an image preprocessing method to obtain a floor surface standard image with obvious features that only contains the floor area; The coarse classification unit is used to perform coarse classification operations on the color, texture, and defect type of the floor surface and draw label information based on the floor surface standard image and user needs using an expert system and a fuzzy criterion method; The secondary classification unit is used to use the floor images with labels as training data sets, and realizes the recognition and classification of floor surface features and defects in subsequent production processes by combining the CSP structure and the YOLOv9 model optimized by the Transformer self-attention mechanism; The floor relational database unit is used to store the recognition result of the floor image, extract and quantify the color, texture and defect information of the floor surface in the production line through a feature extraction method, and store this information as metadata of the floor image in the floor relational database; The grading and screening unit is used to grade and screen the panels in the floor relational database according to the user's own needs, so as to achieve the goal of personalized customization and processing.

Citation Information

Patent Citations

  • Wood structure ancient building health state evaluation method based on normal cloud model

    CN110750830A

  • Solid wood floor classification method based on deep learning

    CN112419278A

  • Cultivated land classification method and system based on remote sensing image and fuzzy recognition

    CN116188880A

  • Multi-modal information fusion plate defect detection system and detection method thereof

    CN116448769A

  • User demand accurate matching method and system based on big data

    CN117972218A