Wood grading method and system based on deep learning
Through the wood grading method based on deep learning, the YOLO algorithm and high-order data augmentation algorithm are used to detect wood defects, which solves the problems of human factors and high equipment accuracy in the existing technology, and realizes efficient and accurate wood grading and automated classification. select.
Patent Information
- Application Number
- CN202411138932.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-27
AI Technical Summary
The existing wood grading technology has problems such as human factors that have great influence, high equipment accuracy and cost, and insufficient detection of internal wood defects, making it difficult to achieve a comprehensive evaluation.
Using a wood grading method based on deep learning, the initial image of the six sides of the wood structure is obtained for pre-processing and standardization, and the defect detection model is constructed using the YOLO algorithm, and combined with the advanced data augmentation algorithm for training to realize automated wood defect detection and grading. Decide and introduce custom functions and pre-trained models to improve detection accuracy and efficiency.
It significantly improves the accuracy and speed of wood defect detection, reduces manual mis-checking, realizes the identification of 32 defect types, reduces equipment costs, and realizes the automated sorting and classification processing of wood.
Smart Images

Figure CN119206682A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wood grading, and in particular to a wood grading method and system based on deep learning. Background Art
[0002] Wood grading technology is an indispensable part of wood processing and trade. It is related to wood quality evaluation, market pricing and the performance of the final product. With the continuous development of the wood market and the increasing requirements for wood quality, wood grading technology has also experienced a development process from simple to complex, from extensive to refined. At present, wood grading technology has formed a variety of methods and standards to meet the quality evaluation needs of wood of different types and uses.
[0003] In the existing technology of wood grading technology, there are mainly the following methods: Visual grading method: This method relies on experienced workers to observe the appearance, color, texture and other characteristics of wood by naked eyes for grading. Although this method is simple and easy to implement, it is greatly affected by human factors and the grading results are highly subjective. Mechanical grading method: Grading is carried out by measuring the physical properties of wood (such as size, density, hardness, etc.). This method is relatively objective, but the accuracy and stability of the measuring equipment have a great influence on the grading results. Non-destructive testing method: The internal structure of wood is detected by non-destructive testing technologies such as X-rays and ultrasound to evaluate its quality grade. This method is non-destructive to wood and can detect defects and cracks inside wood, but the equipment cost is high and the operation is complicated. Therefore, although the existing technology has achieved certain results in the field of wood grading, there are still some limitations. For example, for the detection of internal defects and cracks in wood, although the non-destructive testing method can provide relatively accurate results, the equipment cost is high and the operation is complicated; while the visual grading method and the mechanical grading method are greatly affected by human factors and the accuracy of the measuring equipment. In addition, the existing technology is not accurate enough in identifying information such as the material and tree species of wood, making it difficult to achieve a comprehensive evaluation of wood. Summary of the invention
[0004] In order to solve the accuracy and efficiency problems in existing wood defect detection, the present invention proposes a wood grading method based on deep learning, aiming to improve the accuracy and efficiency of wood grading and reduce the influence of human factors; the specific scheme includes the following steps:
[0005] Obtain the initial images of the six sides of the wood structure, crop and rotate the original images, preprocess the wood images to obtain images containing only wood, fix the image ratio of the wood images based on the filling method, and standardize the filled images;
[0006] A defect detection model was built based on YOLO, and the standardized images were input into the trained defect detection model for inference, and the wood grade was determined based on the test results.
[0007] The test results are subsequently processed, the defects obtained are conditionally filtered, the wood grade is determined according to the user's business needs, and finally the grading results are displayed and automatically sorted.
[0008] The wood images are collected by line scanning and converted into RGB color image data.
[0009] The original wood image is collected according to the set ratio, a certain proportion of the area without wood is cut off, and the part of the image containing wood is grayed and binarized to obtain a binary image of the wood. The impurities of sawdust and noise points are removed by multiple corrosion and expansion methods to obtain a clear wood image.
[0010] Based on the edge detection method, a picture containing only wood is obtained, and the wood picture is filled according to the set ratio to ensure the availability of defect features in the process of image shrinkage prevention, and the filled picture data is standardized.
[0011] The filled standardized image data is input into the defect detection model, and the defect detection model performs wood defect detection through the YOLO algorithm, thereby outputting the location, size and defect type information of the wood defects.
[0012] When training the defect detection model: the input image data is processed by Mosaic, CutMix, and Mixup high-order data enhancement algorithms.
[0013] The wood is automatically sorted according to the grade determination results, and wood of different grades is sent to different processing areas to achieve automatic sorting and classification of wood.
[0014] A wood grading system based on deep learning, comprising:
[0015] An image acquisition unit is used to obtain initial image information of six sides of the wood, and to pre-process and standardize the wood image;
[0016] A model building module is used to input the standardized image into the trained defect detection model for inference to obtain defect detection results;
[0017] The defect display module receives the defect detection results transmitted by the model building module to determine the wood grade, and sends the grading results to the front-end display page for display.
[0018] Due to the adoption of the above technical solution, the present invention provides a wood grading method based on deep learning. The method preprocesses the wood image data and optimizes the input data of the model detection, and integrates the high-order data enhancement algorithm in the training stage, so as to improve the speed and accuracy of wood defect detection. The model can identify 32 types of defects and reduce false detections caused by human factors.
[0019] In order to solve the problem that the classification rules do not meet the needs, the present invention adds a new defect customization function, which allows users to customize the classification rules to help production. In order to solve the problem of large data demand, the present invention introduces a pre-training model in the training stage, so that the model can be trained with a certain amount of data to obtain a defect detection model that meets user requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 Flow chart of the method of the present invention
[0022] Figure 2 It is a structural block diagram of the system of the present invention. DETAILED DESCRIPTION
[0023] In order to make the technical solutions and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention:
[0024] like Figure 1 The deep learning-based wood grading method shown in FIG. 1 specifically includes the following steps:
[0025] Step 1: Get the initial images of the six sides of the wood. First, crop the original image to reduce the amount of calculation for subsequent processing operations. Rotate the cropped wood image and perform ecological processing on the wood image to obtain an image containing only wood. Fix the image ratio of the wood image by filling it, and standardize the filled image.
[0026] Step 2: Build a defect detection model based on YOLO, input the standardized image into the trained defect detection model for inference, and send the detection results to the post-processing module for wood grade determination;
[0027] Step 3: Post-process the test results, filter the defects detected by the model with conditional constraints, determine the wood grade according to business needs, and finally send the grading results to the front-end display page for display and the sorting control module for automatic sorting.
[0028] Furthermore, the image acquisition module acquires wood images by line scanning to ensure the resolution, image integrity and defect contrast availability of the acquired wood images. The acquired images are quickly converted into RGB format color image data and transmitted to the image data preprocessing module.
[0029] Furthermore, the collected images are preprocessed. First, the collected original images are collected in proportion, and the 20% area without wood is cut off. The part of the image containing wood is grayed and binarized to obtain a binary image of wood. The influence of sawdust and noise points is eliminated by multiple corrosion and expansion methods. Through the edge detection method, a picture containing only wood is obtained. In order to ensure the integrity of the defect features, the wood image is filled according to the set ratio (aspect ratio of 4:1) before the data is inferred by the model to ensure the availability of defect features in the process of image shrinkage prevention, and the filled image data is standardized.
[0030] Furthermore, the normalized image data after filling is input into the defect detection model, and the model performs defect detection through the YOLO algorithm. The model output includes information such as the location, size, and type of the defect, which will be used as the input of the post-processing module.
[0031] Furthermore, during the training phase, the model processes the input data using high-level data enhancement algorithms such as Mosaic, CutMix, and Mixup, and uses a pre-trained model as the basic model in the backbone, which greatly reduces the data volume requirements for model training.
[0032] Furthermore, the wood grade determination module determines the grade of the wood according to the defect location, size, type and other information output by the defect detection model, combined with the preset wood grade determination rules. The grade determination results will be sent to the front-end display page for display, and users can view the wood grade information in real time. At the same time, the control sorting module automatically sorts the wood according to the grade determination results, and sends wood of different grades to different processing areas, realizing the automatic sorting and classification of wood. The system will also record the grade information and sorting results of each batch of wood to provide data support for subsequent wood quality analysis and production decisions.
[0033] The present invention discloses a wood grading method and system based on deep learning, wherein the method first performs cropping, rotation and cutout processing on the wood image, which not only improves the processing speed, but also reduces the influence of noise points in the image. The present invention integrates the user's customized judgment rules on the basis of model detection, thereby enhancing the configurability of the sorting process.
[0034] This method collects images of the wood surface, uses image processing algorithms to extract wood texture, color and other features, and then combines machine learning or deep learning algorithms to automatically grade the wood. This method can significantly improve the accuracy and efficiency of grading and reduce interference from human factors. This application uses a deep learning visual processing solution, combined with high-definition image acquisition equipment, to detect and grade wood defects through visual algorithms, which can not only greatly improve the accuracy of the model, but also detect cracks and scars at a lower cost, reducing the cost of detection.
[0035] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A wood grading method based on deep learning, characterized in that include: Obtain the initial images of the six sides of the wood structure, crop and rotate the original images, preprocess the wood images to obtain images containing only wood, fix the image ratio of the wood images based on the filling method, and standardize the filled images; A defect detection model was built based on YOLO, and the standardized images were input into the trained defect detection model for inference, and the wood grade was determined based on the test results. The test results are subsequently processed, the defects obtained are conditionally filtered, and the wood grade is determined according to business needs. Finally, the grading results are displayed and automatically sorted.
2. A wood grading method based on deep learning according to claim 1, characterized in that: The wood images are collected by line scanning and converted into RGB color image data.
3. A wood grading method based on deep learning according to claim 1, characterized in that: The original wood image is collected according to the set ratio, a certain proportion of the area without wood is cut off, and the part of the image containing wood is grayed and binarized to obtain a binary image of the wood. The impurities of sawdust and noise points are removed by multiple corrosion and expansion methods to obtain a clear wood image.
4. A wood grading method based on deep learning according to claim 3, characterized in that: Based on the edge detection method, a picture containing only wood is obtained, and the wood picture is filled according to the set ratio to ensure the availability of defect features in the process of image shrinkage prevention, and the filled picture data is standardized.
5. The wood grading method based on deep learning according to claim 3, characterized in that: The filled standardized image data is input into the defect detection model, and the defect detection model performs wood defect detection through the YOLO algorithm, thereby outputting the location, size and defect type information of the wood defects.
6. A wood grading method based on deep learning according to claim 3, characterized in that: When training the defect detection model: the input image data is processed by Mosaic, CutMix, and Mixup high-order data enhancement algorithms.
7. A wood grading method based on deep learning according to any one of claims 1 to 6, characterized in that: The wood is automatically sorted according to the grade determination results, and wood of different grades is sent to different processing areas to achieve automatic sorting and classification of wood.
8. A wood grading system based on deep learning, characterized in that include: An image acquisition unit is used to obtain initial image information of six sides of the wood, and to pre-process and standardize the wood image; A model building module is used to input the standardized image into the trained defect detection model for inference to obtain defect detection results; The defect display module receives the defect detection results transmitted by the model building module to determine the wood grade, and sends the grading results to the front-end display page for display.
Citation Information
Cited By
Cotton detection device and method based on deep learning
CN121616583A
