Method and system for detecting shape of shavings based on ai computer vision technology
By using AI computer vision technology for image preprocessing and deep transfer learning algorithms, the automatic recognition of the length, width, thickness, and approximate geometric shape of wood shavings has been achieved. This solves the problems of low efficiency and insufficient accuracy in existing wood shaving detection technologies and improves the level of intelligence in the particleboard production process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KUNMING FEILIN PANEL BOARD CO LTD
- Filing Date
- 2023-06-19
- Publication Date
- 2026-04-28
AI Technical Summary
Existing methods for inspecting wood shavings quality cannot accurately identify the size and shape of the shavings, and the inspection efficiency is low. Traditional computer vision inspection methods are also difficult to automatically identify the thickness and approximate geometric shape of the shavings.
An AI-based computer vision method for wood shavings morphology detection is adopted. Through image preprocessing, size detection, and shape recognition models, combined with deep transfer learning algorithms, the method can automatically identify the length, width, thickness, and approximate geometric shape of wood shavings.
It improves the accuracy and efficiency of wood morphology detection, reduces measurement errors, improves the method of describing wood morphology, and enhances the diagnostic and quality control level of the particleboard production process.
Smart Images

Figure CN116740449B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of wood shavings morphology detection technology, specifically relating to a method and system for wood shavings morphology detection based on AI computer vision technology. Background Technology
[0002] Wood shavings are the basic building blocks of particleboard. Current methods for inspecting wood shavings primarily rely on mechanical sieving to separate shavings of different sizes. This method is not only ineffective at accurately identifying shaving size and shape but also inefficient. With the gradual introduction of artificial intelligence into the engineered wood products manufacturing industry, more and more people are finding that inspection methods such as computer vision and machine vision are faster and more efficient than traditional sieving methods. However, currently, computer vision in the forestry industry is mostly used for surface defect detection, such as wood surface defect identification and engineered wood product appearance quality inspection. Current algorithms for shaving shape recognition mainly use traditional digital image processing algorithms to identify shaving length, width, or rectangularity, but they struggle to automatically identify shaving thickness and determine the approximate geometric shape of the shavings. Summary of the Invention
[0003] To address this, this application provides a method and system for detecting wood shavings based on AI computer vision technology, which helps to solve the problems of existing technologies being unable to automatically and accurately identify the size of wood shavings and determine their approximate geometric shape, as well as the low efficiency of wood shavings detection and recognition.
[0004] To achieve the above objectives, this application adopts the following technical solution:
[0005] Firstly, this application provides a method for detecting the shape of wood shavings based on AI computer vision technology, including:
[0006] Obtain the image of the wood shavings to be detected;
[0007] Image preprocessing is performed on the wood shavings image to be detected to obtain the preprocessed wood shavings image to be detected.
[0008] The size of wood shavings is detected by preprocessing the image of the wood shavings to be detected, and the size detection result of the wood shavings is obtained.
[0009] The preprocessed image of wood shavings to be detected is input into a preset wood shavings shape recognition model to identify the shape of the wood shavings and obtain the shape recognition result of the wood shavings.
[0010] Based on the size detection results and shape recognition results of the wood shavings, the shape of the wood shavings to be detected is determined.
[0011] Furthermore, acquiring the image of the wood shavings to be detected specifically includes:
[0012] Pour the wood shavings to be tested into a 100-mesh sieve and vibrate to sift until the wood powder movement is clearly not visible.
[0013] The wood shavings to be tested left on the 100-mesh sieve are laid flat on the black light-absorbing cloth one by one, ensuring that there is no overlap between each wood shaving. At the same time, a preset reference object is set on the black light-absorbing cloth. A high-definition camera is used to take a parallel overhead shot of the wood shavings to be tested and the preset reference object to obtain the first detection surface image of the wood shavings to be tested.
[0014] Place the wood shavings to be tested into a prefabricated black base plate to make them stand upright / sideways, and set a preset reference object on the black base plate. Use a high-definition camera to take a parallel overhead photo of the upright / sideways wood shavings to be tested and the preset reference object to obtain a second detection surface image of the wood shavings to be tested.
[0015] The image of the wood shavings to be detected is determined based on the first and second detection surface images of the wood shavings to be detected.
[0016] Furthermore, the step of detecting the size of wood shavings in the preprocessed image of the wood shavings to be detected specifically includes:
[0017] Based on the actual size of the preset reference object and the pixel size of the preset reference object in the preprocessed image of the wood shavings to be detected, the number of pixels per unit size in the image of the wood shavings to be detected is calculated; the image of the wood shavings to be detected includes a first detection surface image and a second detection surface image of the wood shavings to be detected.
[0018] Edge detection operators are used to extract the contours of the wood shavings from the first and second detection surface images of the wood shavings to be detected, respectively, to obtain the first contour image and the second contour image of the wood shavings.
[0019] The first and second contour images of wood shavings are identified using a fill function, and image holes smaller than a preset fill threshold are filled to obtain the filled first and second contour images of wood shavings.
[0020] Based on the first contour image of the wood shavings after filling, find the smallest bounding rectangle of the wood shavings plane that is circumscribed to the boundary of the wood shavings plane contour and has the smallest rectangular area. Based on the length and width of the smallest bounding rectangle of the wood shavings plane, determine the pixel length and pixel width of the wood shavings to be detected.
[0021] Based on the second contour image of the filled wood shavings, find the smallest bounding rectangle of the side contour of the wood shavings that is circumscribed with the boundary of the side contour of the wood shavings and has the smallest rectangular area. Based on the width of the smallest bounding rectangle of the side contour of the wood shavings, determine the pixel thickness of the wood shavings to be detected.
[0022] Based on the number of pixels per unit size, the pixel length, pixel width, and pixel thickness of the wood shavings to be detected are converted to obtain the actual length, width, and thickness of the wood shavings to be detected.
[0023] Furthermore, the training process of the preset wood shaving shape recognition model includes:
[0024] Based on the shape category of wood shavings, the image of wood shavings to be detected after image preprocessing is classified into shape categories, and a dataset is established according to the shape category classification results.
[0025] Data augmentation processing is performed on the wood shaving images to be detected in the dataset to obtain the data-augmented dataset;
[0026] The augmented dataset was divided into a training set and a validation set according to a 7:3 ratio.
[0027] Input the training set into the pre-trained model, perform transfer learning training according to the preset model training parameters, and obtain the initial wood shaving shape detection model.
[0028] The validation set is input into the initial wood shaving shape detection model for validation, and the model parameters are adjusted according to the validation results to obtain the preset wood shaving shape recognition model.
[0029] Furthermore, the image preprocessing includes at least one of binarization, histogram equalization, image sharpening, and image filtering.
[0030] Furthermore, the fill function is the imfill function; the preset fill threshold is specifically 500px.
[0031] Furthermore, the preset model training parameters include: the model learning rate is set to 0.0001; the number of samples per batch is set to 105; the number of iterations per round is 4; the maximum number of training rounds is set to 55; and the model is iterated a total of 220 times.
[0032] Furthermore, the data augmentation process includes at least one of image horizontal flipping, image vertical flipping, image scaling transformation, and image rotation transformation.
[0033] Furthermore, the pre-trained model is specifically the DarkNet-19 pre-trained model.
[0034] Secondly, this application provides a wood shaving morphology detection system based on AI computer vision technology, comprising:
[0035] The image acquisition module is used to acquire images of the wood shavings to be detected.
[0036] The image preprocessing module is used to preprocess the wood shavings image to be detected, and obtain the preprocessed wood shavings image to be detected.
[0037] The size detection module is used to detect the size of wood shavings in the preprocessed image of the wood shavings to be detected, and to obtain the size detection result of the wood shavings.
[0038] The shape recognition module is used to input the preprocessed image of wood shavings to be detected into a preset wood shavings shape recognition model, recognize the shape of the wood shavings, and obtain the shape recognition result of the wood shavings.
[0039] The shape output module is used to output the shape of the wood shavings to be detected based on the size detection results and shape recognition results of the wood shavings.
[0040] The application employs the above technical solution and has at least the following beneficial effects:
[0041] The wood shavings morphology detection method based on AI computer vision technology provided in this application involves: acquiring an image of wood shavings to be detected; preprocessing the image to obtain a preprocessed image of wood shavings to be detected; performing wood shavings size detection on the preprocessed image of wood shavings to obtain the size detection result; inputting the preprocessed image of wood shavings to be detected into a preset wood shavings shape recognition model to identify the shape of the wood shavings to obtain the shape recognition result; and determining the morphology of the wood shavings to be detected based on the size detection result and the shape recognition result. This application preprocesses the wood shavings image to eliminate irrelevant information and restore useful real information, enhancing the detectability of relevant information and simplifying the data to the maximum extent. Then, the size of the preprocessed image of wood shavings is detected to identify and obtain the actual size parameters of the wood shavings. Simultaneously, the preset wood shavings shape recognition model is used to perform shape recognition on the image of wood shavings, classifying the shapes of the wood shavings in the image to obtain the shape recognition result. Finally, the morphology of the wood shavings is analyzed by combining the actual size parameters and the shape recognition result. This application utilizes AI intelligent vision technology to achieve intelligent recognition and detection of wood shavings morphology. The method and system can simultaneously identify and detect the length, width, thickness, and approximate geometric shape of wood shavings, improving the accuracy and efficiency of wood shaving morphology detection and refining the method for describing wood shaving quality. This application reduces measurement errors in wood shaving morphology and can be used for precise diagnosis of the particleboard production process and prediction of the physical and mechanical properties of particleboard.
[0042] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0044] Figure 1This is a flowchart of the wood shaving morphology detection method based on AI computer vision technology of the present invention;
[0045] Figure 2 This is a flowchart of the wood shaving morphology recognition technology of the present invention;
[0046] Figure 3 This is an example diagram of the process for detecting the length and width of wood shavings according to the present invention;
[0047] Figure 4 This is an example diagram of the wood shavings thickness detection process of the present invention;
[0048] Figure 5 This is an example diagram of the shaving shape sample of the present invention; wherein, Figure 5 (a) is an example image of a rod-shaped wood shaving sample. Figure 5 (b) is an example image of a rectangular wood shaving sample. Figure 5 (c) is an example image of a triangular wood shaving sample. Figure 5 (d) is an example image of other shapes of wood shavings;
[0049] Figure 6 This is an example diagram of the output result of the wood shaving shape recognition of the present invention;
[0050] Figure 7 This is an architecture diagram of the wood shavings morphology detection system based on AI computer vision technology of the present invention. Detailed Implementation
[0051] To make the purpose, technical solution and advantages of this application clearer, the technical solution of this application will be described in detail below.
[0052] The morphology of wood shavings is a crucial factor influencing the physical and mechanical properties of particleboard and its manufacturing process. Our experimental results show that the morphology and quantity of shavings with different morphologies are affected by the shaving preparation process and consequently, the physical and mechanical properties of the particleboard. Therefore, monitoring and controlling the morphology of wood shavings during particleboard production is of paramount importance for ensuring product quality. However, existing monitoring methods in factories primarily rely on subjective human judgment, which results in low accuracy, low efficiency, and unreliable data quality. With the gradual introduction of artificial intelligence into the engineered wood products manufacturing industry, more and more people are discovering that AI-based computer vision methods can achieve online automatic identification, improving the accuracy and efficiency of shaving detection compared to traditional sieve-based methods. However, currently, the application of computer vision in the forestry industry is mostly focused on surface defect detection, such as wood surface defect identification and engineered wood product appearance quality inspection. Algorithms for shaving morphology recognition primarily use traditional digital image processing algorithms to identify shaving length, width, or rectangularity, without mentioning the use of deep learning algorithms for identifying shaving geometry and thickness.
[0053] Therefore, this invention designs an image acquisition base plate with slits on its surface. Several slits, each up to 3.5mm wide and 10mm deep, allow wood shavings to stand upright or face the camera directly, thus obtaining a wood shaving thickness image, i.e., a second detection surface image. Finally, the minimum bounding rectangle width of this portion is defined as the maximum wood shaving thickness. Furthermore, this invention proposes a method for automatically detecting wood shaving morphology using a deep transfer learning image recognition algorithm. By applying and embedding intelligent detection methods, the efficiency and accuracy of monitoring wood shaving morphology changes in particleboard factories are improved. Simultaneously, the method for describing wood shaving quality is improved, enhancing the intelligence level of particleboard production process diagnosis and quality control equipment. This invention can provide an intelligent, accurate, and efficient detection method for particleboard production process control, becoming a powerful tool for factory managers to flexibly supervise the production process. Detailed implementation of this invention is shown in the following embodiments.
[0054] Example 1:
[0055] Please see Figure 1 and Figure 2 , Figure 1 This invention relates to a method for detecting the shape of wood shavings based on AI computer vision technology. Figure 2 This is the process of wood shaving morphology recognition technology of the present invention. For example... Figure 1 As shown, the method includes:
[0056] S1: Obtain the image of the wood shavings to be detected;
[0057] S2: Perform image preprocessing on the wood shavings image to be detected to obtain the preprocessed wood shavings image to be detected;
[0058] S3: Perform wood shaving size detection on the preprocessed image of the wood shavings to be detected, and obtain the wood shaving size detection result;
[0059] S4: Input the preprocessed image of wood shavings to be detected into the preset wood shavings shape recognition model to recognize the shape of the wood shavings and obtain the shape recognition result of the wood shavings;
[0060] S5: Based on the size detection results and shape recognition results of the wood shavings, determine the shape of the wood shavings to be detected.
[0061] Furthermore, in this embodiment, the process of acquiring the image of the wood shavings to be detected specifically includes:
[0062] Pour the wood shavings to be tested into a 100-mesh sieve and use an electric vibrating sieve machine to continuously vibrate and screen them, removing wood powder larger than 100 mesh from the wood shavings until no obvious movement of wood powder is visible.
[0063] When testing the length, width, and shape of wood shavings, a black shadowless light-absorbing cloth is laid flat on a smooth test surface. The wood shavings to be tested, which were previously on a sieve larger than 100 mesh, are then laid one by one on the black light-absorbing cloth, ensuring no overlap between shavings. A pre-set reference object is placed on the black light-absorbing cloth. A high-definition camera is used to take a parallel overhead image of the wood shavings and the reference object to obtain the first test surface image of the wood shavings. The first test surface of the wood shavings is the surface visible from the top of the wood shavings when laid flat on the black light-absorbing cloth.
[0064] When testing the thickness of wood shavings, the shavings to be tested are placed into the gaps in the prefabricated black base plate, ensuring they are stably secured within the gaps. The shavings are then positioned vertically / sideways, ensuring they do not touch each other. Simultaneously, a pre-set reference object is placed on the black base plate. Under an LED shadowless light source, a 16-megapixel high-definition camera is used to take parallel overhead shots of the vertically / sideways shavings and the reference object. The shooting distance is fixed at 25cm, and the resolution is set to 1280 x 960, obtaining an image of the second testing surface of the shavings. The second testing surface is the surface of the shavings visible from the top when they are vertically / sideways on the prefabricated black base plate. If the first testing surface represents a flat surface, the second testing surface represents either the side or vertical surface of the shavings, depending on their placement.
[0065] Finally, the images of the first and second detection surfaces of the wood shavings to be detected are combined to obtain an image set of the wood shavings to be detected.
[0066] Specifically, the main purpose of image preprocessing is to eliminate irrelevant information in an image, restore useful real information, enhance the detectability of relevant information, and simplify data to the maximum extent, thereby improving the reliability of feature extraction, image segmentation, matching, and recognition. The image preprocessing involved in this embodiment includes at least one of binarization, histogram equalization, image sharpening, and image filtering.
[0067] In practical application, this invention performs a series of preprocessing steps on wood shaving images captured in complex environments. First, based on image quality, binarization is used to convert the color wood shaving image into a black and white image, reducing the amount of data to be processed and improving image recognition efficiency. Then, histogram equalization is performed, adjusting the histogram of the original image to achieve a balanced distribution, thereby enhancing the overall image contrast. Subsequently, image sharpening is applied to clarify details such as edges and contours. Finally, median filtering is used to remove noise from the image, reducing interference from dust and other noise sources.
[0068] Furthermore, in this embodiment, the wood shavings size detection is performed on the preprocessed image of the wood shavings to be detected, specifically including:
[0069] Based on the actual size of the preset reference object and the pixel size of the preset reference object in the preprocessed image of the wood shavings to be detected, the number of pixels per unit size in the image of the wood shavings to be detected is calculated; the image of the wood shavings to be detected includes the first detection surface image and the second detection surface image of the wood shavings to be detected.
[0070] Edge detection operators are used to extract the contours of the wood shavings from the first and second detection surface images of the wood shavings to be detected, respectively, to obtain the first contour image and the second contour image of the wood shavings.
[0071] The first and second contour images of wood shavings are identified using a fill function, and image holes smaller than a preset fill threshold are filled to obtain the filled first and second contour images of wood shavings.
[0072] Based on the first contour image of the wood shavings after filling, find the smallest bounding rectangle of the wood shaving plane that is circumscribed to the boundary of the wood shaving plane contour and has the smallest rectangular area. Based on the length and width of the smallest bounding rectangle of the wood shaving plane, determine the pixel length and pixel width of the wood shavings to be detected.
[0073] Based on the second contour image of the filled wood shavings, find the smallest bounding rectangle of the side contour of the wood shavings that is circumscribed with the boundary of the side contour of the wood shavings and has the smallest rectangular area. Based on the width of the smallest bounding rectangle of the side contour of the wood shavings, determine the pixel thickness of the wood shavings to be detected.
[0074] The actual length, width, and thickness of the wood shavings to be tested are calculated based on the number of pixels per unit size.
[0075] In specific practice, refer to Figure 2 As shown, the specific procedure for detecting the size of wood shavings in this embodiment is as follows:
[0076] Determining the number of pixels per unit size: In order to find the mapping relationship between pixels in an image and the real-world coordinate system, this invention uses a one-yuan coin with a diameter of 2.50cm as a reference object. By comparing the actual size of the reference object with the pixel size of the preset reference object in the preprocessed image of wood shavings to be detected, the number of pixels per unit size in the image of wood shavings to be detected is calculated.
[0077] Target contour detection: A contour can be simply viewed as a curve connecting consecutive points with the same color or grayscale. After comparing the contour extraction effects of different existing edge detection operators (including Canny, Bwperim, Sobel, etc.) on wood shavings images, this application ultimately selected the Bwperim operator to detect the contour boundaries of wood shavings.
[0078] Image Hole Filling: During image acquisition, dust or wood dust particles can affect image quality. After edge detection of the target contour, a wood shavings contour image containing holes is obtained. Therefore, to reduce the impact of environmental dust particles on detection accuracy, the `imfill` function is used to identify and fill holes smaller than 500 pixels.
[0079] Identifying the minimum bounding rectangle size of wood shavings: Finding the minimum bounding rectangle of a target polygon means finding the rectangle that circumscribes the convex polygon and has the smallest area. (Refer to...) Figure 3 As shown, in the planar image of the wood shavings to be detected, the rectangle with the smallest area that is circumscribed by the wood shavings is detected. The length and width of the smallest circumscribed rectangle of the wood shavings are calculated. The length and width of this rectangle are the longest and shortest axes of the target wood shavings (the wood shavings to be detected), that is, the pixel length and pixel width of the wood shavings to be detected. Finally, the actual size of the rectangle is calculated using the number of pixels per unit size, and the actual length and width of the wood shavings are obtained, and the visualization results are output.
[0080] Similarly, refer to Figure 4 As shown, in the side image of the wood shavings to be detected, the rectangle with the smallest area that is circumscribed to the wood shavings is detected. The width of the smallest circumscribed rectangle of the wood shavings is calculated. The width of this rectangle is the pixel thickness of the target wood shavings (the wood shavings to be detected). The actual thickness of the wood shavings is calculated using the number of pixels per unit size, and the visualization result is output.
[0081] Furthermore, in this embodiment, the training process of the preset wood shaving shape recognition model includes:
[0082] Based on the shape category of wood shavings, the image of wood shavings to be detected after image preprocessing is classified into shape categories, and a dataset is established according to the shape category classification results.
[0083] Data augmentation processing is performed on the wood shaving images to be detected in the dataset to obtain the data-augmented dataset;
[0084] The augmented dataset was divided into a training set and a validation set according to a 7:3 ratio.
[0085] Input the training set into the pre-trained model, perform transfer learning training according to the preset model training parameters, and obtain the initial wood shaving shape detection model.
[0086] The validation set is input into the initial wood shavings shape detection model for validation, and the model parameters are adjusted according to the validation results to obtain the preset wood shavings shape recognition model.
[0087] In practical application, this embodiment utilizes a deep transfer learning image recognition algorithm to automatically detect the shape of wood shavings, referring to... Figure 2As shown, the process of recognizing the shape of wood shavings is as follows:
[0088] Selection of Pre-trained Model: A pre-trained model is a deep learning network model that has already been trained and saved, and has been previously trained on a large dataset. After analyzing and comparing the transfer learning results of four network models—VGG-19, GoogleNet, ResNet-50, and DarkNet-19—this application ultimately selected the DarkNet-19 pre-trained model for transfer learning to distinguish wood shavings of different shapes.
[0089] Dataset creation: The preprocessed wood shavings images were manually divided into four categories: rod-shaped, rectangular, triangular, and other shapes. 150 images were selected from each category to create the dataset, resulting in a total of 600 images. Samples of different wood shaving shapes are shown below. Figure 5 As shown, where, Figure 5 (a) is an example image of a rod-shaped wood shaving sample. Figure 5 (b) is an example image of a rectangular wood shaving sample. Figure 5 (c) is an example image of a triangular wood shaving sample. Figure 5 (d) is an example image of other shapes of wood shavings.
[0090] Transfer learning: Transfer learning is a machine learning method that applies knowledge learned on one task to another new task. In deep learning, this typically means using a pre-trained model trained on a large dataset (such as ImageNet) to solve a new image classification task. The pre-trained model can capture general features and patterns, thus providing good initial parameters for the new task. In this invention, the Adam optimizer is selected for the transfer learning network, and the model training parameters are set as follows: learning rate is 0.0001; the number of samples per batch is 105; the number of iterations per round is 4; the maximum number of training rounds is 55; and the total number of iterations is 220. The training set is input into the pre-trained model, and transfer learning training is performed according to the above model training parameters to obtain the initial wood shaving shape detection model.
[0091] Validation Results: The validation set was input into the initial wood shaving shape detection model for validation. Based on the validation results, the model parameters were optimized and adjusted. After completing the model training and validation process, the training results and model parameters were saved and exported. Finally, refer to... Figure 6 As shown, a new, untrained image is selected and classified using a network model trained through the transfer learning described above, and the results are visualized.
[0092] Specifically, the method in this embodiment is built on the Matlab platform. First, the wood shavings to be tested are poured into a 100-mesh sieve and continuously vibrated and sieved using an electric vibrating sieve machine to remove wood flour larger than 100 mesh from the shavings until no obvious movement of wood flour is visible. Then, the wood shavings remaining on the 100-mesh sieve are laid flat on a black light-absorbing cloth, ensuring no overlap, and a high-definition camera is used to take a parallel overhead image of the wood shavings. Finally, the acquired wood shaving images are imported into Matlab, and the length and width of the wood shavings are identified using a target size detection algorithm based on digital image processing technology, and the geometric shape of the wood shavings is identified using an image classification algorithm based on deep transfer learning. When identifying the thickness of the wood shavings, the wood shavings need to be placed on a self-made black base plate with slits on the surface to make the wood shavings stand upright and ensure that they do not touch each other. The surface of the base plate has multiple slits, each with a width of 1~3.5mm, a length of 100~150mm, and a depth of 5mm~10mm. There are a total of 9 slits with varying widths from 1 to 3.5mm. This intelligent method for detecting particleboard morphology uses a camera positioned atop a black substrate to capture images of the upright sides of the particleboard shavings. The thickness of the shavings is then determined by detecting and calculating the width of the minimum bounding rectangle of the shaving side. This solves the problems of manually measuring non-standard rectangular shavings and accurately describing irregular shaving geometry. It not only provides a reference for assessing and diagnosing changes in shaving morphology during particleboard production and optimizing the manufacturing process, but also improves the intelligence level of particleboard production equipment by applying and embedding digital and intelligent technologies and systems, becoming a powerful tool for factory managers to flexibly monitor the production process. Compared to traditional methods of describing shaving morphology, this method offers higher detection efficiency and accuracy.
[0093] In summary, this application utilizes AI intelligent vision technology, requiring minimal manpower and time; only image acquisition equipment and a computer are needed. Referring to the training data of the wood shavings shape classification model in Table 1, it can be seen that the method provided in this application achieves a wood shavings size measurement error of less than 0.01 mm and an accuracy rate of 99.17% for recognizing the approximate geometric shape of wood shavings. Furthermore, this method can simultaneously detect multiple wood shavings, demonstrating high data collection efficiency. In addition, this embodiment also designs a base plate with gaps on its surface that allows the wood shavings to stand upright / sideways, enabling a high-definition camera to capture and identify the thickness of the wood shavings.
[0094] Table 1 Training Data for the Shavings Shape Classification Model
[0095]
[0096] Example 2:
[0097] This embodiment provides a wood shaving morphology detection system based on AI computer vision technology, referring to... Figure 7 As shown, the system includes:
[0098] The image acquisition module is used to acquire images of the wood shavings to be detected.
[0099] The image preprocessing module is used to preprocess the wood shavings image to be detected, and obtain the preprocessed wood shavings image to be detected.
[0100] The size detection module is used to detect the size of wood shavings in the preprocessed image of the wood shavings to be detected, and to obtain the size detection result of the wood shavings.
[0101] The shape recognition module is used to input the preprocessed image of wood shavings to be detected into a preset wood shavings shape recognition model, recognize the shape of the wood shavings, and obtain the shape recognition result of the wood shavings.
[0102] The shape output module is used to output the shape of the wood shavings to be detected based on the size detection results and shape recognition results of the wood shavings.
[0103] The image acquisition module uses a 16-megapixel high-definition camera to acquire images of the wood shavings to be inspected. The image preprocessing module, size detection module, shape recognition module, and morphology output module are set up in an industrial computer to form an image processing terminal. Connecting the high-definition camera and the image processing terminal constitutes the actual wood shaving morphology detection system.
[0104] This application preprocesses wood shavings images to remove irrelevant information and restore useful, accurate information, enhancing the detectability of relevant information and simplifying the data to the maximum extent. Then, the preprocessed wood shavings images are subjected to size detection to identify and obtain the actual size parameters of the wood shavings. Simultaneously, a pre-defined wood shavings shape recognition model is used to perform shape recognition on the wood shavings images, classifying and identifying the shapes within the images to obtain shape recognition results. Finally, the morphology of the wood shavings is analyzed by combining the actual size parameters and the shape recognition results. This application utilizes AI intelligent vision technology to achieve autonomous recognition and detection of wood shavings shapes, improving the accuracy and precision of shape recognition and reducing measurement errors.
[0105] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0106] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for detecting the shape of wood shavings based on AI computer vision technology, characterized in that, include: Obtain the image of the wood shavings to be detected; Image preprocessing is performed on the wood shavings image to be detected to obtain the preprocessed wood shavings image to be detected. The size of wood shavings is detected by preprocessing the image of the wood shavings to be detected, and the size detection result of the wood shavings is obtained. The preprocessed image of wood shavings to be detected is input into a preset wood shavings shape recognition model to identify the shape of the wood shavings and obtain the shape recognition result of the wood shavings. Based on the size detection results and shape recognition results of the wood shavings, the shape of the wood shavings to be detected is determined; The acquisition of the wood shavings image to be detected specifically includes: Pour the wood shavings to be tested into a 100-mesh sieve and vibrate to sift until the wood powder movement is clearly no longer visible. The wood shavings to be tested left on the 100-mesh sieve are laid flat on the black light-absorbing cloth one by one, ensuring that there is no overlap between each wood shaving. At the same time, a preset reference object is set on the black light-absorbing cloth. A high-definition camera is used to take a parallel overhead shot of the wood shavings to be tested and the preset reference object to obtain the first detection surface image of the wood shavings to be tested. Place the wood shavings to be tested into a prefabricated black base plate to make them stand upright / sideways, and set a preset reference object on the black base plate. Use a high-definition camera to take a parallel overhead photo of the upright / sideways wood shavings to be tested and the preset reference object to obtain a second detection surface image of the wood shavings to be tested. The image of the wood shavings to be detected is determined based on the first and second detection surface images of the wood shavings to be detected. The step of detecting the size of wood shavings in the preprocessed image of the wood shavings to be detected specifically includes: Based on the actual size of the preset reference object and the pixel size of the preset reference object in the preprocessed image of the wood shavings to be detected, the number of pixels per unit size in the image of the wood shavings to be detected is calculated; the image of the wood shavings to be detected includes a first detection surface image and a second detection surface image of the wood shavings to be detected. Edge detection operators are used to extract the contours of the wood shavings from the first and second detection surface images of the wood shavings to be detected, respectively, to obtain the first contour image and the second contour image of the wood shavings. The first and second contour images of wood shavings are identified using a fill function, and image holes smaller than a preset fill threshold are filled to obtain the filled first and second contour images of wood shavings. Based on the first contour image of the wood shavings after filling, find the smallest bounding rectangle of the wood shaving plane that is circumscribed to the boundary of the wood shaving plane contour and has the smallest rectangular area. Based on the length and width of the smallest bounding rectangle of the wood shaving plane, determine the pixel length and pixel width of the wood shavings to be detected. Based on the second contour image of the filled wood shavings, find the smallest bounding rectangle of the side contour of the wood shavings that is circumscribed with the boundary of the side contour of the wood shavings and has the smallest rectangular area. Based on the width of the smallest bounding rectangle of the side contour of the wood shavings, determine the pixel thickness of the wood shavings to be detected. Based on the number of pixels per unit size, the pixel length, pixel width, and pixel thickness of the wood shavings to be detected are converted to obtain the actual length, width, and thickness of the wood shavings to be detected.
2. The method for detecting wood shavings morphology based on AI computer vision technology according to claim 1, characterized in that, The training process of the preset wood shaving shape recognition model includes: Based on the shape category of wood shavings, the image of wood shavings to be detected after image preprocessing is classified into shape categories, and a dataset is established according to the shape category classification results. Data augmentation processing is performed on the wood shaving images to be detected in the dataset to obtain the data-augmented dataset; The augmented dataset was divided into a training set and a validation set according to a 7:3 ratio. Input the training set into the pre-trained model, perform transfer learning training according to the preset model training parameters, and obtain the initial wood shaving shape detection model. The validation set is input into the initial wood shaving shape detection model for validation, and the model parameters are adjusted according to the validation results to obtain the preset wood shaving shape recognition model.
3. The method for detecting wood shavings morphology based on AI computer vision technology according to claim 1, characterized in that, The image preprocessing includes at least one of binarization, histogram equalization, image sharpening, and image filtering.
4. The method for detecting wood shavings morphology based on AI computer vision technology according to claim 1, characterized in that, The fill function is the imfill function; the preset fill threshold is 500px.
5. The method for detecting wood shavings morphology based on AI computer vision technology according to claim 2, characterized in that, The preset model training parameters include: the model learning rate is set to 0.0001; the number of samples per batch is set to 105; the number of iterations per round is 4; the maximum number of training rounds is set to 55; and the model is iterated a total of 220 times.
6. The method for detecting wood shavings morphology based on AI computer vision technology according to claim 2, characterized in that, The data augmentation process includes at least one of image horizontal flipping, image vertical flipping, image scaling transformation, and image rotation transformation.
7. The method for detecting wood shavings morphology based on AI computer vision technology according to claim 2, characterized in that, The pre-trained model is specifically the DarkNet-19 pre-trained model.
8. A wood shaving morphology detection system based on AI computer vision technology, characterized in that, include: The image acquisition module is used to acquire images of the wood shavings to be detected. The image preprocessing module is used to preprocess the wood shavings image to be detected, and obtain the preprocessed wood shavings image to be detected. The size detection module is used to detect the size of wood shavings in the preprocessed image of the wood shavings to be detected, and to obtain the size detection result of the wood shavings. The shape recognition module is used to input the preprocessed image of wood shavings to be detected into a preset wood shavings shape recognition model, recognize the shape of the wood shavings, and obtain the shape recognition result of the wood shavings. The shape output module is used to output the shape of the wood shavings to be detected based on the size detection results and shape recognition results of the wood shavings. The acquisition of the wood shavings image to be detected specifically includes: Pour the wood shavings to be tested into a 100-mesh sieve and vibrate to sift until the wood powder movement is clearly no longer visible. The wood shavings to be tested left on the 100-mesh sieve are laid flat on the black light-absorbing cloth one by one, ensuring that there is no overlap between each wood shaving. At the same time, a preset reference object is set on the black light-absorbing cloth. A high-definition camera is used to take a parallel overhead shot of the wood shavings to be tested and the preset reference object to obtain the first detection surface image of the wood shavings to be tested. Place the wood shavings to be tested into a prefabricated black base plate to make them stand upright / sideways, and set a preset reference object on the black base plate. Use a high-definition camera to take a parallel overhead photo of the upright / sideways wood shavings to be tested and the preset reference object to obtain a second detection surface image of the wood shavings to be tested. The image of the wood shavings to be detected is determined based on the first and second detection surface images of the wood shavings to be detected. The step of detecting the size of wood shavings in the preprocessed image of the wood shavings to be detected specifically includes: Based on the actual size of the preset reference object and the pixel size of the preset reference object in the preprocessed image of the wood shavings to be detected, the number of pixels per unit size in the image of the wood shavings to be detected is calculated; the image of the wood shavings to be detected includes a first detection surface image and a second detection surface image of the wood shavings to be detected. Edge detection operators are used to extract the contours of the wood shavings from the first and second detection surface images of the wood shavings to be detected, respectively, to obtain the first contour image and the second contour image of the wood shavings. The first and second contour images of wood shavings are identified using a fill function, and image holes smaller than a preset fill threshold are filled to obtain the filled first and second contour images of wood shavings. Based on the first contour image of the wood shavings after filling, find the smallest bounding rectangle of the wood shaving plane that is circumscribed to the boundary of the wood shaving plane contour and has the smallest rectangular area. Based on the length and width of the smallest bounding rectangle of the wood shaving plane, determine the pixel length and pixel width of the wood shavings to be detected. Based on the second contour image of the filled wood shavings, find the smallest bounding rectangle of the side contour of the wood shavings that is circumscribed with the boundary of the side contour of the wood shavings and has the smallest rectangular area. Based on the width of the smallest bounding rectangle of the side contour of the wood shavings, determine the pixel thickness of the wood shavings to be detected. Based on the number of pixels per unit size, the pixel length, pixel width, and pixel thickness of the wood shavings to be detected are converted to obtain the actual length, width, and thickness of the wood shavings to be detected.