A method and system for intelligently judging the number of gaps between stacked board logs
Through computer deep learning methods, the convolutional neural network model is used to identify and calculate the number of log gaps in stacked plates, solving the problem of time-consuming and labor-intensive and errors in manual measurement, and achieving efficient and accurate measurement efficiency.
Patent Information
- Application Number
- CN202111130862.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-09-26
AI Technical Summary
In the prior art, the number of log gaps in stacked plates requires manual measurement, which consumes a lot of labor and time costs and has errors.
The computer deep learning method is used to generate heat maps through the CenterNet network model, and the convolutional neural network models such as Unet or improved Linknet34 are trained to identify and calculate the number of log gaps in stacked plates.
It improves the accuracy of quantity calculations, greatly improves the measurement efficiency, and saves the workload of staff.
Smart Images

Figure CN114092390B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of stacking calculation technology, and in particular to a method and system for intelligently judging the number of gaps in stacked board logs. Background Art
[0002] The existing number of stacks, number of board layers, and number of logs need to be manually measured, counted, and recorded, which results in a huge amount of manpower and time costs, and there is a large amount of random error and negligence. Summary of the invention
[0003] In view of this, the purpose of the present invention is: in the field of stacking calculation, through the method of computer deep learning, to obtain the number of wood roots, the number of stacks and the number of pad layers, so as to improve the accuracy of quantity calculation.
[0004] The present invention provides a method for intelligently determining the number of gaps between stacked board logs, comprising the following steps:
[0005] S1. Mark the gaps, pads, and wood stacks in straight lines on the scanned image;
[0006] S2. According to the generation method of Gaussian heat map in CenterNet network model, the generation parameters of heat map are adjusted accordingly according to the characteristics of different objects, and the labeled image is used to generate heat map;
[0007] S3. After generating the heatmap, use Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model, take the heatmap as the target and the original image as the input for training to obtain the recognized heatmap.
[0008] Furthermore, in the step S2, the method for generating the heatmap is to take the manually marked line as the center: the thermal center, and symmetrically generate pixel bands with a certain width, a high center temperature, and a temperature on both sides gradually decreasing to zero: the thermal distribution.
[0009] Furthermore, in the step S2, the method of adjusting the generation parameters of the thermal map according to the characteristics of different objects includes: adjusting the bandwidth of the thermal map of small boards to be narrow, adjusting the bandwidth of the thermal map of logs to be wide, and adjusting the bandwidth of the thermal map of the stack line to be the widest.
[0010] Furthermore, in the step S3, the structure of the Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model includes: a coding area, an intermediate area, and a decoding area;
[0011] The encoding area is used for downsampling processing of the image; the middle area (also the Skip Connection area) is used for skip-layer residual connection to improve the convergence speed; and the decoding area is used for interpolation upsampling processing.
[0012] Furthermore, the identified thermal map in step S3 further includes post-processing, and the post-processing includes the following steps:
[0013] S41, projecting the thermal map of the stacking line in the vertical direction to find the position of the stacking line;
[0014] S42, using the stack line and the boundary line as the area division standard, sampling the horizontal gap lines in the area, projecting these sampled straight lines in the horizontal direction, and calculating the number of gaps;
[0015] S43, take samples of more than 5 pieces from each stack, calculate repeatedly according to step S42, and finally obtain the number of gaps by taking the arithmetic mean, or taking the arithmetic mean after removing the highest and lowest values, or taking the arithmetic mean of the top 50%, top 80%, etc.
[0016] Furthermore, the loss function of the Linknet34 convolutional neural network model is cross entropy BCELoss+Jaccard Loss.
[0017] The present invention also provides a system for intelligently determining the number of gaps between stacked board logs, and the method for intelligently determining the number of gaps between stacked board logs as described above comprises:
[0018] Annotation image module: used to mark gaps, pads, and wood stacks in straight lines;
[0019] Heatmap generation module: According to the generation method of Gaussian heatmap in CenterNet network model, the generation parameters of heatmap are adjusted accordingly according to the characteristics of different objects, and the labeled image is used to generate a heatmap;
[0020] Heatmap training module: After generating the heatmap, use Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model, take the heatmap as the target and the original image as the input for training to obtain the recognized heatmap.
[0021] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method for intelligently determining the number of gaps in stacked board logs are implemented.
[0022] The present invention also provides a computer device that integrates the above-mentioned system for intelligently determining the number of gaps between logs in stacked boards. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned method for intelligently determining the number of gaps between logs in stacked boards are implemented.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] Through computer deep learning methods, we can obtain information on the number of wood roots, stacks and layers of wood, which improves the accuracy of quantity calculation, greatly improves measurement efficiency and saves staff workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.
[0026] In the attached picture:
[0027] Figure 1 A flow chart of a method for intelligently determining the number of gaps between stacked board logs according to the present invention;
[0028] Figure 2 A schematic diagram of a system structure of a computer device provided by an embodiment of the present invention;
[0029] Figure 3 is a flowchart of post-processing of an embodiment of the present invention;
[0030] Figure 4 is a structural diagram of the Linknet34 convolutional neural network model of an embodiment of the present invention;
[0031] Figure 5 It is a real scene picture with gaps, pads, and wood stacks marked on the scanned image in an embodiment of the present invention;
[0032] Figure 6 This is a real scene picture of testing a real object after the heat map training of the embodiment of the present invention. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and products consistent with some aspects of the present disclosure as detailed in the appended claims.
[0034] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0035] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0037] The embodiment of the present invention provides a method for intelligently determining the number of gaps between stacked board logs, see the accompanying drawings Figure 1 As shown, the following steps are included:
[0038] S1. Mark the gaps, pads, and wood stacks in straight lines on the scanned image;
[0039] Specifically, see the accompanying drawings Figure 5 As shown, the red lines are the identified gaps;
[0040] S2. According to the generation method of Gaussian heat map in CenterNet network model, the generation parameters of heat map are adjusted accordingly according to the characteristics of different objects, and the labeled image is used to generate heat map;
[0041] S3. After generating the heatmap, use Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model, take the heatmap as the target and the original image as the input for training to obtain the recognized heatmap.
[0042] In the step S2, the method for generating the heat map is to take the manually marked line as the center: the heat center, and symmetrically generate a pixel band with a certain width, a high center temperature, and a temperature on both sides gradually decreasing to zero: the heat distribution.
[0043] In the step S2, the method of adjusting the generation parameters of the thermal map according to the characteristics of different objects includes: adjusting the bandwidth of the thermal map of small boards to be narrow, adjusting the bandwidth of the thermal map of logs to be wide, and adjusting the bandwidth of the thermal map of the stack line to be the widest.
[0044] In the S3 step, the structure of the Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model is shown in the attached figure Figure 4 As shown, it includes: A, coding area, B, middle area, C, decoding area;
[0045] The encoding area is used for downsampling of images; the middle area (also Skip Connection area) is used for skip-layer residual connection to improve convergence speed; the decoding area is used for interpolation upsampling;
[0046] Specifically, the light blue arrow is the residual module, see Figure 4 Detail of lower left corner;
[0047] The step S3 of obtaining the identified thermal map also includes post-processing, see the accompanying drawings. Figure 3 As shown, the post-processing includes the following steps:
[0048] S41, projecting the thermal map of the stacking line in the vertical direction to find the position of the stacking line;
[0049] S42, using the stack line and the boundary line as the area division standard, sampling the horizontal gap lines in the area, projecting these sampled straight lines in the horizontal direction, and calculating the number of gaps;
[0050] Preferably, the sampling is to select an appropriate length;
[0051] S43, take samples of more than 5 pieces from each stack, calculate repeatedly according to step S42, and finally obtain the number of gaps by taking the arithmetic mean, or taking the arithmetic mean after removing the highest and lowest values, or taking the arithmetic mean of the top 50%, top 80%, etc.
[0052] The loss function of the Linknet34 convolutional neural network model is cross entropy BCELoss+Jaccard Loss;
[0053] See attached picture Figure 6 As shown, the embodiment of the present invention tests the real object after the heat map training, the blue lines are the identified stacking positions, and the green lines are the positions of the padding layers.
[0054] The present invention also provides a system for intelligently determining the number of gaps between stacked board logs, and the method for intelligently determining the number of gaps between stacked board logs as described above comprises:
[0055] Annotation image module: used to mark gaps, pads, and wood stacks in straight lines;
[0056] Heatmap generation module: According to the generation method of Gaussian heatmap in CenterNet network model, the generation parameters of heatmap are adjusted accordingly according to the characteristics of different objects, and the labeled image is used to generate a heatmap;
[0057] Heatmap training module: After generating the heatmap, use Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model, take the heatmap as the target and the original image as the input for training to obtain the recognized heatmap.
[0058] The embodiment of the present invention further provides a computer device, which can integrate the system for intelligently determining the number of gaps in stacked board logs provided by the embodiment of the present invention; Figure 2 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention; see the accompanying drawings Figure 2 As shown, the computer device includes: an input device 23, an output device 24, a memory 22 and a processor 21; the memory 22 is used to store one or more programs; when the one or more programs are executed by the one or more processors 21, the one or more processors 21 implement the method for intelligently judging the number of gaps in stacked board logs as provided in the above embodiment; wherein the input device 23, the output device 24, the memory 22 and the processor 21 can be connected via a bus or other means, Figure 2 The example of connecting through bus is taken in the following.
[0059] The memory 22 is a readable and writable storage medium of a computing device, and can be used to store software programs and computer executable programs, such as program instructions corresponding to the method for intelligently determining the number of gaps in stacked board logs described in the embodiment of the present invention; the memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the device, etc.; in addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device; in some instances, the memory 22 can further include a memory remotely arranged relative to the processor 21, and these remote memories can be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0060] The input device 23 may be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the device; the output device 24 may include a display device such as a display screen.
[0061] The processor 21 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 22, that is, realizes the above-mentioned method of intelligently determining the number of gaps in stacked board logs.
[0062] The computer device provided above can be used to execute the method for intelligently determining the number of gaps in stacked board logs provided in the above embodiment, and has corresponding functions and beneficial effects.
[0063] The embodiment of the present invention also provides a storage medium containing computer executable instructions, which are used to execute the method for intelligently judging the number of gaps in stacked board logs as provided in the above embodiment when executed by a computer processor. The storage medium is any of various types of memory devices or storage devices, and the storage medium includes: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc.; the storage medium may also include other types of memory or a combination thereof; in addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet); the second computer system may provide program instructions to the first computer for execution. The storage medium includes two or more storage media that may reside in different locations (for example, in different computer systems connected via a network). The storage medium may store program instructions (for example, specifically implemented as a computer program) that may be executed by one or more processors.
[0064] Of course, the storage medium containing computer executable instructions provided by an embodiment of the present invention is not limited to the method for intelligently determining the number of gaps in stacked board logs as described in the above embodiment, and the computer executable instructions can also execute related operations in the method for intelligently determining the number of gaps in stacked board logs provided by any embodiment of the present invention.
[0065] The technical solutions of the present invention are described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for intelligently determining the number of gaps in stacked board logs, characterized in that: The following steps are involved: S1. Mark the gaps, pads, and wood stacks in straight lines on the scanned image; S2. According to the generation method of Gaussian heat map in CenterNet network model, the generation parameters of heat map are adjusted accordingly according to the characteristics of different objects, and the labeled image is used to generate heat map; S3. After generating the heatmap, use Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model, take the heatmap as the target and the original image as the input for training, and obtain the recognized heatmap; The identified thermal map in step S3 further includes post-processing, and the post-processing includes the following steps: S41, projecting the thermal map of the stacking line in the vertical direction to find the position of the stacking line; S42, using the stack line and the boundary line as the area division standard, sampling the horizontal gap lines in the area, projecting these sampled straight lines in the horizontal direction, and calculating the number of gaps; S43. Take samples of more than 5 pieces from each stack, and calculate repeatedly according to step S42. Finally, the number of gaps is obtained by taking the arithmetic average, or taking the arithmetic average after removing the highest and lowest values, or taking the arithmetic average of the top 50% and top 80%.
2. The method according to claim 1, characterized in that In the step S2, the method for generating the heat map is to take the manually marked line as the center: the heat center, and symmetrically generate pixel bands with a certain width, a high center temperature, and a temperature on both sides gradually decreasing to zero: the heat distribution.
3. The method according to claim 1, characterized in that In the step S2, the method of adjusting the generation parameters of the thermal map according to the characteristics of different objects includes: adjusting the bandwidth of the thermal map of small boards to be narrow, adjusting the bandwidth of the thermal map of logs to be wide, and adjusting the bandwidth of the thermal map of the stack line to be the widest.
4. The method according to claim 1, characterized in that: In the step S3, the structure of the Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model includes: a coding area, an intermediate area, and a decoding area; The encoding area is used for downsampling processing of the image; the middle area is used for skip-layer residual connection to improve the convergence speed; and the decoding area is used for interpolation upsampling processing.
5. The method according to claim 1, characterized in that The loss function of the Linknet34 convolutional neural network model is cross entropy BCELoss + Jaccard Loss.
6. A system for intelligently judging the number of gaps in stacked board logs, using the method for intelligently judging the number of gaps in stacked board logs as claimed in any one of claims 1 to 5, characterized in that: include: Annotation image module: used to mark gaps, pads, and wood stacks in straight lines; Heatmap generation module: According to the generation method of Gaussian heatmap in CenterNet network model, the generation parameters of heatmap are adjusted accordingly according to the characteristics of different objects, and the labeled image is used to generate a heatmap; Heatmap training module: After generating the heatmap, use Unet or improved Linknet34, UnetPLus, UnetPlusPlus, DeepLabV3 convolutional neural network model, take the heatmap as the target and the original image as the input for training to obtain the recognized heatmap.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for intelligently determining the number of gaps between logs in stacked boards as described in any one of claims 1 to 5 are implemented.
8. A computer device, integrated with the system for intelligently determining the number of gaps between logs in stacked planks as claimed in claim 6, wherein the computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for intelligently determining the number of gaps in stacked board logs as described in any one of claims 1 to 5 are implemented.