Rice hull separation method based on deep learning

By using a dynamic feature reconstructable sorting network and a dynamic graph convolutional neural network, combined with a dynamic gated multi-head decision inference layer, the problems of low automation and insufficient sorting accuracy in rice husk separation technology are solved, realizing a high-precision and flexible rice husk separation process.

CN120838699AInactive Publication Date: 2025-10-28TANGSHAN CITY CAO THE CAOFEIDIAN AREA WO METER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511024607.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-10-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing rice husk separation technologies suffer from low automation and insufficient sorting accuracy, making it difficult to adapt to the diversity of rice grains and industrial site noise. They also lack intelligent and flexible sorting solutions.

Method used

By employing a dynamic feature reconfigurable sorting network and a dynamic graph convolutional neural network, combined with a dynamic gated multi-head decision inference layer, we can achieve joint modeling of the spatial structure and attributes of rice grains, adaptively optimize sorting decisions, and introduce confidence-adaptive threshold verification.

Benefits of technology

It improves the sorting accuracy and reliability of rice husk separation, realizes full-process automation, reduces manual intervention, and improves production efficiency and yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120838699A_ABST
    Figure CN120838699A_ABST
Patent Text Reader

Abstract

The invention discloses a deep learning-based rice hull separation method, which comprises the following steps of performing multi-angle image acquisition and preprocessing on rice batches to obtain standardized image data; the images are input into a dynamic feature reconfigurable sorting network for automatic identification and feature extraction, and particle space and attribute features are obtained; inputting the feature representation into a dynamic graph convolutional neural network containing a dynamic gating multi-head decision inference layer for sorting inference, and outputting a sorting decision result; performing automatic re-judgment or rejection judgment on a low-confidence result; and automatically generating process parameters based on the final decision, and issuing the process parameters to sorting equipment to complete rice hull separation operation. The full-process intelligent self-adaptive separation of rice husks can be realized, and the separation precision, reliability and automation level are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent sorting technology for grain processing, and in particular to a method for separating rice husks based on deep learning. Background Technology

[0002] Rice husk separation is a crucial step in primary grain processing, directly impacting the quality, loss rate, and production efficiency of finished rice. Traditional rice sorting and husk separation primarily rely on mechanical screening, air separation, and gravity separation. These processes generally suffer from low automation, insufficient sorting accuracy, excessive manual intervention, and poor adaptability to the diversity of rice grains. With the expansion of grain production scale and the improvement of quality standards, modern grain processing enterprises urgently need to achieve intelligent and automated sorting processes.

[0003] In recent years, with the rapid development of image recognition and deep learning technologies, computer vision-based rice sorting methods have gradually emerged. Some studies have attempted to use deep learning models such as convolutional neural networks to recognize and classify rice images, improving the automation level of sorting. However, most existing technologies remain at the stage of static recognition or simple classification of single grains, making it difficult to take into account the complex spatial distribution, multi-scale particle size, integrity, and breakage rate of batches of rice grains, and their adaptability to dynamic batch differences and industrial noise is limited.

[0004] Currently, the setting of process parameters for rice husk separation still relies on experience or manual adjustment, lacking an intelligent recommendation mechanism that links in real time with the actual characteristics of different batches of raw grain. This makes it difficult to achieve an optimal sorting scheme that adapts to different batches of raw grain. Therefore, there is an urgent need for a novel sorting method that integrates deep learning and dynamic graph structure analysis. This method should be able to automatically identify and extract multi-dimensional attribute features of rice batches, intelligently judge the sorting results, and dynamically link the sorting equipment to achieve a high-precision, flexible, and fully automated rice husk separation process. Summary of the Invention

[0005] One objective of this invention is to propose a deep learning-based method for separating rice husks. This invention integrates a dynamically reconstructable sorting network, a dynamic graph convolutional neural network, and a dynamically gated multi-head decision inference layer to achieve joint modeling of the spatial structure and attributes of rice grains and high-precision intelligent sorting. It can adaptively optimize multi-objective sorting decisions and dynamically adjust sorting strategies for different batches. By introducing a confidence-adaptive threshold verification, the reliability and consistency of sorting results are effectively improved. Combined with automatic process parameter generation and equipment linkage control, the entire process of rice husk separation is automated and efficiently managed.

[0006] A method for separating rice husks based on deep learning according to an embodiment of the present invention includes the following steps: Batch images of rice to be sorted are acquired using a standard light source and multi-angle imaging. The images are preprocessed to obtain standardized rice image data. The standardized image data is input into a dynamic feature reconstructable sorting network to complete the automatic identification and multi-scale feature extraction of rice grains, and obtain a feature representation that includes the spatial positional relationship and attribute features of each grain. The feature representation is input into a dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer. The dynamic graph convolutional neural network containing the dynamic gated multi-head decision inference layer dynamically constructs adjacency relationships based on the spatial structure and attributes of rice grains. It then performs inference sequentially through the graph convolutional layer and the dynamic gated multi-head decision inference layer integrated into the network inference end, and outputs the sorting decision results of the rice batch. An adaptive threshold verification based on sorting and discrimination confidence level automatically triggers re-judgment or rejection for low-confidence results; Based on the sorting decision results verified twice, sorting process parameters are automatically generated and sent to the rice sorting equipment to drive the equipment to switch process states and complete the rice husk separation operation.

[0007] Furthermore, the batch image acquisition includes using a standard light source with a constant color temperature and an imaging device with multiple angles and adjustable focal length to simultaneously capture images of rice batches at different positions and postures on the conveyor belt from multiple perspectives. The preprocessing operations include normalization, noise reduction, histogram equalization, distortion correction, and edge enhancement steps.

[0008] Furthermore, the dynamically reconfigurable sorting network specifically includes: A feature adaptive adjustment module is embedded in the backbone structure of a deep convolutional neural network. The feature adaptive adjustment module receives input batch rice images and extracts global statistical features of the batch. Based on the batch global statistical features, the parameter generation unit outputs the adjustment coefficients and variable receptive field parameters of each convolutional layer feature channel. The adjustment coefficients are applied to the feature maps of each convolutional layer, each channel is weighted, and the configuration of the convolutional kernel or receptive field is adjusted. During each forward inference process, the above parameters are dynamically updated based on the statistical characteristics of the current batch.

[0009] Furthermore, the batch global statistical features specifically include: Receive standardized rice image data and input it into the feature adaptive adjustment module in batches; For each image, an instance segmentation model is used to identify all rice grains and obtain the boundary mask of each grain. Geometric parameters were calculated for all particle boundary masks, and the particle size, aspect ratio, and integrity values ​​of all particles were statistically analyzed. Based on the particle size, aspect ratio, and integrity values ​​of all the particles mentioned above, the average particle size, median, standard deviation, number of main peaks, and average values ​​of extreme particle proportions and particle integrity of the batch are calculated to form a global statistical feature vector for the batch.

[0010] Furthermore, the dynamic graph convolutional neural network including the dynamically gated multi-head decision inference layer specifically includes: Based on the spatial location relationships and attribute characteristics of rice grains, a graph-structured adjacency relation matrix is ​​dynamically constructed, and the attribute characteristics are used as node feature inputs. In multiple graph convolutional layers of a dynamic graph convolutional neural network, multi-level feature aggregation and updating of node features are performed based on adjacency relationships to obtain high-dimensional graph structure features for each particle. A dynamic gated multi-head decision inference layer is integrated at the network inference end. The high-dimensional graph structure features of each particle are input into multiple independent inference branches to distinguish the sorting target based on sorting category, integrity, and damage probability. The dynamic gating module adaptively generates weight coefficients for each inference branch based on the global statistical features of the batch, and the outputs of each branch are weighted and fused to form the final sorting decision result.

[0011] Furthermore, the multi-level feature aggregation and updating of node features based on adjacency relationships specifically includes: In each graph convolutional layer, the adjacency matrix between nodes is dynamically constructed or adjusted based on the spatial positional relationship and attribute characteristics between rice grains to determine the neighborhood range of each node. Using the node features and adjacency matrix of the previous layer as input, perform the following operations on each node: collect the features of neighboring nodes from the neighboring nodes, and combine the node's own features with the features of neighboring nodes by max pooling according to a preset aggregation method to form the neighborhood feature representation of the node. The neighborhood feature representation is input into the node feature update unit, which includes a learnable linear transformation layer and a nonlinear activation function. The aggregated features are linearly mapped and nonlinearly transformed to generate new node feature representations. Multi-layer graph convolutional layers are stacked sequentially, with the output of each layer serving as the input of the next layer. This process involves repeated dynamic aggregation and update operations to ultimately obtain high-dimensional graph structure features that contain multi-layer spatial structure information and batch attribute information.

[0012] Furthermore, the dynamic gated multi-head decision inference layer specifically includes: Set up at least two independent inference branches. Each inference branch contains a mapping structure composed of a multi-layer fully connected neural network and a non-linear activation function. It receives the high-dimensional graph structure features of each rice grain as input and performs feature mapping and discrimination calculation for different sorting targets such as sorting category, grain integrity and damage probability, and outputs the corresponding discrimination score. In each round of inference, a dynamic gating module is set up. The dynamic gating module includes a set of fully connected layers that take batch global statistical features as input and adaptively output the weight coefficients of each inference branch through a normalized activation function. Each weight coefficient corresponds one-to-one with the corresponding inference branch. The discrimination scores output by all inference branches are weighted and fused with the weight coefficients output by the dynamic gating module item by item. Specifically, each branch output is multiplied by its corresponding weight and then summed to form the sorting decision result for the current batch of rice grains. The parameters of the dynamically gated multi-head decision inference layer are jointly optimized together with the parameters of the backbone structure of the dynamic graph convolutional neural network during end-to-end training.

[0013] Furthermore, the adaptive threshold verification of the sorting and discrimination confidence specifically includes: When the dynamic graph convolutional neural network outputs the sorting decision results, it also outputs the confidence score corresponding to each sorting result. The confidence score is directly given by the discrimination score of the inference branch. By statistically analyzing the confidence distribution of all particles in the current batch, a confidence threshold is adaptively set based on batch characteristics. The threshold can be dynamically adjusted according to the mean, variance, adaptive quantile, or historical experience rules. For sorting decision results with a confidence level lower than the threshold, a re-judgment process is automatically triggered, that is, the corresponding particles are re-inputted into a dynamic feature reconstructible sorting network and a dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer for feature analysis and sorting. If the confidence level is still below the threshold after re-judgment, the sorting decision result will be marked as rejected or suspected incorrect sorting, and the marking information will be output for subsequent manual review.

[0014] The beneficial effects of this invention are: This invention integrates a dynamically reconstructable sorting network with a dynamic graph convolutional neural network, and introduces a dynamically gated multi-head decision inference layer at the network inference end, achieving for the first time joint modeling and high-precision sorting of rice grain spatial structure and attribute information. The use of multi-head inference branches and a dynamic gating weight mechanism allows for adaptive optimization of multiple objectives such as sorting category, integrity, and damage probability, improving the intelligence and flexibility of sorting decisions. Through dynamic guidance of batch-wide statistical features, the network structure and inference layer parameters can be adjusted in real time for different batches of raw grain, significantly enhancing the sorting algorithm's adaptability to particle size diversity and structural complexity.

[0015] This invention introduces a confidence score and adaptive threshold verification mechanism when outputting sorting results. This mechanism automatically re-classifies or rejects low-confidence particles, significantly improving the reliability and industrial controllability of the overall sorting results and effectively avoiding risks such as mis-sorting and missed sorting. By automatically generating process parameters from the secondary-verified sorting results and linking them to control the sorting equipment, the entire process from raw grain characteristic analysis to equipment process adjustment is automated, greatly reducing manual intervention and improving production efficiency and sorted product yield.

[0016] The overall solution balances model innovation with engineering feasibility, and can be widely adapted to rice husk separation scenarios with different batches, varieties, and complex distributions. It has significant intelligent, flexible, and economic benefits, and promotes technological progress in intelligent grain sorting and high-quality processing. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a deep learning-based method for separating rice husks proposed in this invention; Figure 2 This is a schematic diagram of the data flow and decision feedback loop between modules in the entire process of the deep learning-based rice husk separation method proposed in this invention. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0019] refer to Figure 1-2 A deep learning-based method for separating rice husks includes the following steps: Batch images of rice to be sorted are acquired using a standard light source and multi-angle imaging. The images are preprocessed to obtain standardized rice image data. The standardized image data is input into a dynamic feature reconstructable sorting network to complete the automatic identification and multi-scale feature extraction of rice grains, and obtain a feature representation that includes the spatial positional relationship and attribute features of each grain. The feature representation is input into a dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer. The dynamic graph convolutional neural network containing the dynamic gated multi-head decision inference layer dynamically constructs adjacency relationships based on the spatial structure and attributes of rice grains. It then performs inference sequentially through the graph convolutional layer and the dynamic gated multi-head decision inference layer integrated into the network inference end, and outputs the sorting decision results of the rice batch. An adaptive threshold verification based on sorting and discrimination confidence level automatically triggers re-judgment or rejection for low-confidence results; Based on the sorting decision results verified twice, sorting process parameters are automatically generated and sent to the rice sorting equipment to drive the equipment to switch process states and complete the rice husk separation operation.

[0020] This invention integrates deep learning feature extraction with dynamic graph neural network intelligent decision-making to achieve high-precision automatic identification and adaptive sorting of rice batches. It effectively improves sorting reliability through confidence verification and re-judgment mechanisms, and can automatically generate and distribute optimal process parameters to complete the intelligent separation of rice husks throughout the entire process, significantly improving sorting accuracy, production efficiency and system automation level.

[0021] In this embodiment, the batch image acquisition includes using a standard light source with a constant color temperature and an imaging device with multiple angles and adjustable focal length to simultaneously capture images of rice batches at different positions and postures on the conveyor belt from multiple perspectives. The preprocessing operation includes normalization, noise reduction, histogram equalization, distortion correction, and edge enhancement steps.

[0022] Specifically, the rice grains to be sorted are laid flat on a conveyor belt or workbench. A constant color temperature LED standard light source is used, along with three industrial cameras mounted at different angles, to simultaneously acquire images, ensuring coverage of the rice surface in all directions. The acquired raw images are first normalized, mapping pixel values ​​to the [0,1] range. Then, median filtering and other methods are used to remove noise. Images with insufficient contrast are enhanced with histogram equalization to improve details, followed by lens distortion correction and edge enhancement to ensure the accuracy of subsequent particle identification. All processed images are saved as high-resolution standardized image data.

[0023] In this embodiment, the dynamically reconfigurable sorting network specifically includes: A feature adaptive adjustment module is embedded in the backbone structure of a deep convolutional neural network. The feature adaptive adjustment module receives input batch rice images and extracts global statistical features of the batch. Based on the batch global statistical features, the parameter generation unit outputs the adjustment coefficients and variable receptive field parameters of each convolutional layer feature channel. The adjustment coefficients are applied to the feature maps of each convolutional layer, each channel is weighted, and the configuration of the convolutional kernel or receptive field is adjusted. During each forward inference process, the above parameters are dynamically updated based on the statistical characteristics of the current batch.

[0024] Specifically, preprocessed standardized rice image data is input into the backbone of a deep convolutional neural network in batches. The backbone network consists of multiple sets of two-dimensional convolutional layers, batch normalization layers, ReLU activation functions, pooling layers, and residual connection modules stacked together. To enable the network to adapt to batch differences, a feature adaptive adjustment module is embedded between each set of convolutional and activation layers. This module receives the entire batch of image data and segments all rice grains using the instance segmentation model Mask R-CNN to obtain the boundary mask of each grain. For each grain mask, geometric parameters such as grain size, aspect ratio, and integrity are calculated. The parameter data of all grains in the batch are statistically analyzed to calculate the average grain size, median, standard deviation, number of main peaks, proportion of extreme grains, and mean integrity of the batch, forming a global statistical feature vector for the batch.

[0025] The feature vector is fed into the parameter generation unit, which is a three-layer fully connected neural network. Each layer has a certain number of neurons and a ReLU activation function. The output includes weighted coefficients for the feature channels of each convolutional layer and variable receptive field parameters. These output parameters directly affect each convolutional layer: each feature channel of the output is multiplied by a weighted coefficient to dynamically adjust the response intensity of different feature channels; simultaneously, different sizes of convolutional kernels are dynamically selected based on the receptive field parameters, or the outputs of multiple sizes of convolutional kernels are weighted and fused.

[0026] During each batch forward inference, the feature adaptive adjustment module recalculates the global features of the current batch, and the parameter generation unit outputs new channel weighting coefficients and receptive field parameters accordingly. This enables the network parameters to dynamically adapt to the batch features, improving the sorting model's generalization and adaptability to differences in the morphology, size distribution, and structure of rice grains from different batches. All of the above parameters can be jointly optimized end-to-end during network training and inference without manual setting or intervention.

[0027] Throughout the inference process, the feature adaptive adjustment module can dynamically update the above parameters based on the real-time input batch statistical features, enabling the network to flexibly adjust the feature extraction strategy for the particle morphology and distribution changes of different raw grain batches, thereby improving the characterization capability and adaptability of the sorting front end.

[0028] In this embodiment, the batch global statistical features specifically include: Receive standardized rice image data and input it into the feature adaptive adjustment module in batches; For each image, an instance segmentation model is used to identify all rice grains and obtain the boundary mask of each grain. Geometric parameters were calculated for all particle boundary masks, and the particle size, aspect ratio, and integrity values ​​of all particles were statistically analyzed. Based on the particle size, aspect ratio, and integrity values ​​of all the particles mentioned above, the average particle size, median, standard deviation, number of main peaks, and average values ​​of extreme particle proportions and particle integrity of the batch are calculated to form a global statistical feature vector for the batch.

[0029] In this embodiment, the dynamic graph convolutional neural network including the dynamic gated multi-head decision inference layer specifically includes: Based on the spatial location relationships and attribute characteristics of rice grains, a graph-structured adjacency relation matrix is ​​dynamically constructed, and the attribute characteristics are used as node feature inputs. In multiple graph convolutional layers of a dynamic graph convolutional neural network, multi-level feature aggregation and updating of node features are performed based on adjacency relationships to obtain high-dimensional graph structure features for each particle. A dynamic gated multi-head decision inference layer is integrated at the network inference end. The high-dimensional graph structure features of each particle are input into multiple independent inference branches to distinguish the sorting target based on sorting category, integrity, and damage probability. The dynamic gating module adaptively generates weight coefficients for each inference branch based on the global statistical features of the batch, and the outputs of each branch are weighted and fused to form the final sorting decision result.

[0030] For each batch of rice grains, the aforementioned dynamic feature reconstructable sorting network is used to obtain the attribute features of each grain in six dimensions, including two-dimensional spatial coordinates, grain size, aspect ratio, integrity, mask area, and principal orientation angle. All grains are numbered sequentially and organized into an N×6 node feature matrix, where N is the total number of grains in this batch.

[0031] In the graph structure construction phase, following the spatial distance principle, each particle node establishes graph structure edges with all other particles within a Euclidean distance of less than 30 pixels. If no node falls within this range, it is only connected to the two nearest nodes. This results in an N×N adjacency matrix, where each row contains 1s indicating the existence of an edge.

[0032] The node feature matrix and adjacency matrix mentioned above are fed into a dynamic graph convolutional neural network. The network consists of three stacked graph convolutional layers, each using max pooling for feature aggregation. Specifically, in each layer, for each node, its features and those of its neighboring nodes are processed by maximizing the channel value, then a linear transformation with ReLU activation is applied, outputting a 64-dimensional high-dimensional graph structure feature. After the three layers are stacked, the final output of each node is a 64-dimensional real-valued vector.

[0033] At the network inference end, a dynamically gated multi-head decision inference layer is integrated. This inference layer consists of three independent branches, each a three-layer fully connected neural network with 64, 32, and 16 neurons per layer, all using ReLU activation. The first branch outputs the particle sorting category (3-class softmax), the second branch outputs the particle integrity rating (2-class softmax), and the third branch outputs the damage probability (binary sigmoid). Each branch also outputs a normalized confidence score.

[0034] The dynamic gating module is a two-layer fully connected neural network. It takes six statistical features as input for the current batch: average particle size, median, standard deviation, number of main peaks, proportion of extreme particles, and mean integrity. It outputs three normalized weights, which are assigned to three inference branches.

[0035] The discrimination scores output by the three inference branches are multiplied by the weights of the gating module output, and the weighted sum is used as the final sorting decision result. At the same time, the independent outputs of the three branches and their confidence scores are retained for subsequent sorting confidence threshold verification and sorting result re-judgment.

[0036] All neural network structure parameters, aggregation methods, connection methods, and statistical feature selection methods remain fixed, and the network obtains its final parameters through end-to-end supervised training. Data input, processing flow, model structure, and output are all uniquely determined, requiring no manual adjustment or fuzzy steps.

[0037] In this embodiment, the multi-level feature aggregation and updating of node features based on adjacency relationships specifically includes: In each graph convolutional layer, the adjacency matrix between nodes is dynamically constructed or adjusted based on the spatial positional relationship and attribute characteristics between rice grains to determine the neighborhood range of each node. Using the node features and adjacency matrix of the previous layer as input, perform the following operations on each node: collect the features of neighboring nodes from the neighboring nodes, and combine the node's own features with the features of neighboring nodes by max pooling according to a preset aggregation method to form the neighborhood feature representation of the node. The neighborhood feature representation is input into the node feature update unit, which includes a learnable linear transformation layer and a nonlinear activation function. The aggregated features are linearly mapped and nonlinearly transformed to generate new node feature representations. Multi-layer graph convolutional layers are stacked sequentially, with the output of each layer serving as the input of the next layer. This process involves repeated dynamic aggregation and update operations to ultimately obtain high-dimensional graph structure features that contain multi-layer spatial structure information and batch attribute information.

[0038] At the beginning of each convolutional layer, the system iterates through each grain node based on its spatial coordinates and attribute features, calculating its Euclidean distance and attribute difference with all other nodes. If the distance is less than 30 pixels and the attribute difference is less than 0.1, the node is assigned a value of 1 in the adjacency matrix with the target node; otherwise, it is assigned a value of 0. This determines the neighborhood of each node, ensuring effective connections between spatially and attribute-adjacent grains.

[0039] Next, the node feature matrix from the previous layer and the currently constructed adjacency matrix are input into the graph convolution module of this layer. For each node, the feature vectors of all neighboring nodes (i.e., nodes with an adjacency of 1) are first collected, and the maximum value of the node's own feature vector and the feature vectors of these neighboring nodes is taken in each channel to obtain the neighborhood feature representation of the node.

[0040] The aforementioned neighborhood feature representation is input into the node feature update unit, which consists of a linear transformation layer and a ReLU activation function layer. Specifically, the linear transformation is first performed through matrix multiplication and a bias term, and the output is activated by the ReLU function to obtain the updated node feature vector.

[0041] The entire dynamic graph convolutional neural network sequentially stacks three layers of the aforementioned graph convolutional structure. The output of each layer serves as the input to the next layer, repeating operations such as dynamic adjacency matrix generation, neighborhood feature aggregation, and feature updating. Ultimately, each node obtains a 64-dimensional high-dimensional graph structure feature that integrates spatial multi-layer structure and batch attribute information. All parameters are automatically optimized through supervised training, and the structure and processing strictly follow the above process in each forward inference step.

[0042] In this embodiment, the dynamic gated multi-head decision inference layer specifically includes: Set up at least two independent inference branches. Each inference branch contains a mapping structure composed of a multi-layer fully connected neural network and a non-linear activation function. It receives the high-dimensional graph structure features of each rice grain as input and performs feature mapping and discrimination calculation for different sorting targets such as sorting category, grain integrity and damage probability, and outputs the corresponding discrimination score. In each round of inference, a dynamic gating module is set up. The dynamic gating module includes a set of fully connected layers that take batch global statistical features as input and adaptively output the weight coefficients of each inference branch through a normalized activation function. Each weight coefficient corresponds one-to-one with the corresponding inference branch. The discrimination scores output by all inference branches are weighted and fused with the weight coefficients output by the dynamic gating module item by item. Specifically, each branch output is multiplied by its corresponding weight and then summed to form the sorting decision result for the current batch of rice grains. The parameters of the dynamically gated multi-head decision inference layer are jointly optimized together with the parameters of the backbone structure of the dynamic graph convolutional neural network during end-to-end training.

[0043] Three independent inference branches are set up at the inference end of the dynamic graph convolutional neural network. Each branch consists of three fully connected neural networks with 64, 32, and 16 neurons in each layer, respectively, and each layer uses the ReLU activation function. All branches simultaneously receive the 64-dimensional high-dimensional graph structure features obtained by convolving each rice grain with three layers of graphs as input.

[0044] The first branch is used for particle sorting category determination, outputting a softmax probability distribution for the three sorting categories. The second branch is used for particle integrity level determination, outputting a softmax probability distribution for two integrity levels. The third branch is used for damage probability determination, outputting a one-dimensional sigmoid probability. The last neural network node output by each branch is considered as the discrimination score for the corresponding sorting target.

[0045] During each batch of inference, a dynamic gating module is set up. The dynamic gating module is a two-layer fully connected neural network with 32 and 16 neurons in each layer. The input is the batch global statistical features (such as average particle size, median, standard deviation, number of main peaks, proportion of extreme particles, and mean integrity, totaling 6 dimensions). The output is normalized to three weight coefficients through softmax and assigned to the three inference branches to ensure that the sum of all weights is 1.

[0046] Finally, the discrimination scores output by the three inference branches are multiplied by their corresponding weight coefficients one by one, and then summed according to their weights to form the sorting decision result for each rice grain. The network parameters of all inference branches and the dynamic gating module are automatically and jointly optimized along with the backbone parameters of the dynamic graph convolutional neural network during end-to-end supervised training, requiring no manual adjustment. This structure ensures adaptive dynamic fusion of multi-objective sorting decisions and possesses good generalization ability.

[0047] In this embodiment, the adaptive threshold verification of the sorting and discrimination confidence specifically includes: When the dynamic graph convolutional neural network outputs the sorting decision results, it also outputs the confidence score corresponding to each sorting result. The confidence score is directly given by the discrimination score of the inference branch. By statistically analyzing the confidence distribution of all particles in the current batch, a confidence threshold is adaptively set based on batch characteristics. The threshold can be dynamically adjusted according to the mean, variance, adaptive quantile, or historical experience rules. For sorting decision results with a confidence level lower than the threshold, a re-judgment process is automatically triggered, that is, the corresponding particles are re-inputted into a dynamic feature reconstructible sorting network and a dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer for feature analysis and sorting. If the confidence level is still below the threshold after re-judgment, the sorting decision result will be marked as rejected or suspected incorrect sorting, and the marking information will be output for subsequent manual review.

[0048] First, after the dynamic graph convolutional neural network completes inference, the system outputs a sorting decision result for each rice grain, while simultaneously recording the confidence scores output by each inference branch in the dynamic gated multi-head decision inference layer. The confidence score for the sorting category is the maximum softmax probability, while the confidence scores for integrity and damage probability are the softmax and sigmoid output values, respectively. The system can select the output of the corresponding branch as the final confidence score as needed.

[0049] Subsequently, for all particles in the current batch, the system performs centralized statistical analysis on all confidence scores, calculating the mean, standard deviation, and adaptive quantile of the confidence score. Based on historical sorting data experience, a fixed set of rules is used to set the confidence threshold for this batch. Specifically, the mean confidence score of the current batch minus 0.5 times the standard deviation, or the lower 25% quantile of the confidence score distribution, is preferentially selected as the dynamic threshold. For special batches, historical experience rules can be automatically invoked for fine-tuning.

[0050] After the confidence threshold is set, the system checks the sorting confidence score of each particle one by one. If the confidence score of any particle is lower than the threshold for this batch, the system automatically initiates a re-judgment process for that particle. That is, the image and attribute data of the particle are input again into the dynamic feature reconstructible sorting network and the dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer, and the feature extraction, graph structure construction, inference and sorting process is repeated until a new sorting and discrimination result and confidence score are obtained.

[0051] If the confidence score after re-judgment is still lower than the threshold for this batch, the system directly marks the sorting decision result of that particle as "rejected" or "suspected incorrect sorting," and records the relevant particle number, judgment details, and confidence score to the sorting traceability module and manual review interface for subsequent manual verification, system quality analysis, and intelligent optimization. The entire verification, re-judgment, and rejection process is executed automatically, improving the robustness of the sorting results and the controllability of the engineering. Example

[0052] To verify the feasibility of this invention in practice, it was applied to the sorting of ordinary indica rice on a farm. The process was as follows: The batch of indica rice was evenly spread on a conveyor belt, and three industrial cameras (resolution 2048×1536, color temperature set to 5500K, illumination intensity 900 lux) were used to simultaneously acquire images from multiple angles at 30fps from directly above and two sides, resulting in 200 frames of images. The acquired images were then subjected to normalization, noise reduction, median filtering, histogram equalization, distortion correction, and edge enhancement, outputting standardized rice image data with a size of 2048×1536.

[0053] Standardized images are batch-input into the backbone of a deep convolutional neural network. The network contains three sets of convolutional layers (32 / 64 / 64 channels per set), batch normalization, and ReLU activation. An adaptive feature adjustment module is embedded between each convolutional group in the backbone. This module first uses a Mask R-CNN instance to segment all particle masks from each image, and then calculates the centroid coordinates, particle size, aspect ratio, and integrity of each particle. After aggregating the particle parameters of the entire batch, the following parameters are calculated: average particle size 7.28 mm, median 7.19 mm, standard deviation 0.47 mm, number of dominant peaks 1, extreme proportion 2.1%, and mean integrity 0.96, forming a 6-dimensional batch global statistical feature vector. This vector is input into a three-layer fully connected parameter generation unit, which outputs the weighting coefficients of each convolutional layer channel and the weights of the convolutional kernels (3×3 and 5×5), achieving adaptive adjustment.

[0054] Each particle's centroid coordinates, particle size, aspect ratio, integrity, mask area, and principal orientation angle constitute a node feature (6 dimensions in total). All particles are numbered and arranged into an N×6 matrix (N being the total number of particles in the frame). An N×N adjacency matrix is ​​constructed using an edge-connection strategy with spatial distances less than 30 pixels. The node feature matrix and adjacency matrix are input into a three-layer graph convolutional network, with each layer employing max pooling to aggregate the features, outputting 64-dimensional node features. Finally, a high-dimensional graph structure feature for all particles is obtained.

[0055] The inference module has three independent fully connected branches: the sorting category branch outputs three softmax probabilities, the integrity branch outputs two softmax probabilities, and the damage probability branch outputs a sigmoid probability. Batch global statistical features are input to a two-layer fully connected gating module, and the softmax outputs three branch weights (e.g., 0.6, 0.3, 0.1). The discrimination scores output by the three branches are multiplied by their corresponding weights and summed to obtain the sorting decision result and confidence score for each particle.

[0056] The system calculates the confidence scores for all particles in this batch, with a mean of 0.86, a standard deviation of 0.07, and a lower 25% quantile of 0.82. The system automatically sets the confidence threshold to 0.82. For particles with a confidence score below the threshold, a re-judgment process is automatically triggered: the entire network structure mentioned above is re-entered for repeated inference. After re-judgment, 9 particles still have insufficient confidence scores, which are automatically marked as "rejected" by the system, and the relevant information is sent for manual review.

[0057] Based on information such as sorting category distribution and integrity statistics, the system automatically generates recommended process parameters: screen size 1.9mm, screening amplitude 1.5mm, frequency 70Hz, and feed rate 0.24t / h. These parameters are then sent to the sorting equipment via industrial Ethernet, and the equipment automatically adjusts its process settings to complete the separation of the rice husks for that batch.

[0058] After sorting, the batch was inspected manually and found to have a qualified sorting rate of 97.8%, a damage rate of 1.2%, and a coverage rate of 99.1%, achieving high-precision automated separation of rice husks.

[0059] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for separating rice husks based on deep learning, characterized in that, Includes the following steps: Batch images of rice to be sorted are acquired using a standard light source and multi-angle imaging. The images are preprocessed to obtain standardized rice image data. The standardized image data is input into a dynamic feature reconstructable sorting network to complete the automatic identification and multi-scale feature extraction of rice grains, and obtain a feature representation that includes the spatial positional relationship and attribute features of each grain. The feature representation is input into a dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer. The dynamic graph convolutional neural network containing the dynamic gated multi-head decision inference layer dynamically constructs adjacency relationships based on the spatial structure and attributes of rice grains. It then performs inference sequentially through the graph convolutional layer and the dynamic gated multi-head decision inference layer integrated into the network inference end, and outputs the sorting decision results of the rice batch. An adaptive threshold verification based on sorting and discrimination confidence level automatically triggers re-judgment or rejection for low-confidence results; Based on the sorting decision results verified twice, sorting process parameters are automatically generated and sent to the rice sorting equipment to drive the equipment to switch process states and complete the rice husk separation operation.

2. The method for separating rice husks based on deep learning according to claim 1, characterized in that, The batch image acquisition includes using a standard light source with constant color temperature and an imaging device with multiple angles and adjustable focal length to simultaneously capture images of rice batches at different positions and postures on the conveyor belt from multiple perspectives. The preprocessing operations include normalization, noise reduction, histogram equalization, distortion correction, and edge enhancement steps.

3. The method for separating rice husks based on deep learning according to claim 1, characterized in that, The dynamically reconfigurable sorting network specifically includes: A feature adaptive adjustment module is embedded in the backbone structure of a deep convolutional neural network. The feature adaptive adjustment module receives input batch rice images and extracts global statistical features of the batch. Based on the batch global statistical features, the parameter generation unit outputs the adjustment coefficients and variable receptive field parameters of each convolutional layer feature channel. The adjustment coefficients are applied to the feature maps of each convolutional layer, each channel is weighted, and the configuration of the convolutional kernel or receptive field is adjusted. During each forward inference process, the above parameters are dynamically updated based on the statistical characteristics of the current batch.

4. The method for separating rice husks based on deep learning according to claim 3, characterized in that, The specific batch global statistical features include: Receive standardized rice image data and input it into the feature adaptive adjustment module in batches; For each image, an instance segmentation model is used to identify all rice grains and obtain the boundary mask of each grain. Geometric parameters were calculated for all particle boundary masks, and the particle size, aspect ratio, and integrity values ​​of all particles were statistically analyzed. Based on the particle size, aspect ratio, and integrity values ​​of all the particles mentioned above, the average particle size, median, standard deviation, number of main peaks, and average values ​​of extreme particle proportions and particle integrity of the batch are calculated to form a global statistical feature vector for the batch.

5. The method for separating rice husks based on deep learning according to claim 1, characterized in that, The dynamic graph convolutional neural network containing a dynamically gated multi-head decision inference layer specifically includes: Based on the spatial location relationships and attribute characteristics of rice grains, a graph-structured adjacency relation matrix is ​​dynamically constructed, and the attribute characteristics are used as node feature inputs. In multiple graph convolutional layers of a dynamic graph convolutional neural network, multi-level feature aggregation and updating of node features are performed based on adjacency relationships to obtain high-dimensional graph structure features for each particle. A dynamic gated multi-head decision inference layer is integrated at the network inference end. The high-dimensional graph structure features of each particle are input into multiple independent inference branches to distinguish the sorting target based on sorting category, integrity, and damage probability. The dynamic gating module adaptively generates weight coefficients for each inference branch based on the global statistical features of the batch, and the outputs of each branch are weighted and fused to form the final sorting decision result.

6. The method for separating rice husks based on deep learning according to claim 5, characterized in that, Multi-level feature aggregation and updating of node features based on adjacency relationships specifically includes: In each graph convolutional layer, the adjacency matrix between nodes is dynamically constructed or adjusted based on the spatial positional relationship and attribute characteristics between rice grains to determine the neighborhood range of each node. Using the node features and adjacency matrix of the previous layer as input, perform the following operations on each node: collect the features of neighboring nodes from the neighboring nodes, and combine the node's own features with the features of neighboring nodes by max pooling according to a preset aggregation method to form the neighborhood feature representation of the node. The neighborhood feature representation is input into the node feature update unit, which includes a learnable linear transformation layer and a nonlinear activation function. The aggregated features are linearly mapped and nonlinearly transformed to generate new node feature representations. Multi-layer graph convolutional layers are stacked sequentially, with the output of each layer serving as the input of the next layer. This process involves repeated dynamic aggregation and update operations to ultimately obtain high-dimensional graph structure features that contain multi-layer spatial structure information and batch attribute information.

7. The method for separating rice husks based on deep learning according to claim 1, characterized in that, The dynamic gated multi-head decision inference layer specifically includes: Set up at least two independent inference branches. Each inference branch contains a mapping structure composed of a multi-layer fully connected neural network and a non-linear activation function. It receives the high-dimensional graph structure features of each rice grain as input and performs feature mapping and discrimination calculation for different sorting targets such as sorting category, grain integrity and damage probability, and outputs the corresponding discrimination score. In each round of inference, a dynamic gating module is set up. The dynamic gating module includes a set of fully connected layers that take batch global statistical features as input and adaptively output the weight coefficients of each inference branch through a normalized activation function. Each weight coefficient corresponds one-to-one with the corresponding inference branch. The discrimination scores output by all inference branches are weighted and fused with the weight coefficients output by the dynamic gating module item by item. Specifically, each branch output is multiplied by its corresponding weight and then summed to form the sorting decision result for the current batch of rice grains. The parameters of the dynamically gated multi-head decision inference layer are jointly optimized together with the parameters of the backbone structure of the dynamic graph convolutional neural network during end-to-end training.

8. The method for separating rice husks based on deep learning according to claim 1, characterized in that, The adaptive threshold verification of the sorting and discrimination confidence specifically includes: When the dynamic graph convolutional neural network outputs the sorting decision results, it also outputs the confidence score corresponding to each sorting result. The confidence score is directly given by the discrimination score of the inference branch. By statistically analyzing the confidence distribution of all particles in the current batch, a confidence threshold is adaptively set based on batch characteristics. The threshold can be dynamically adjusted according to the mean, variance, adaptive quantile, or historical experience rules. For sorting decision results with a confidence level lower than the threshold, a re-judgment process is automatically triggered, that is, the corresponding particles are re-inputted into a dynamic feature reconstructible sorting network and a dynamic graph convolutional neural network containing a dynamic gated multi-head decision inference layer for feature analysis and sorting. If the confidence level is still below the threshold after re-judgment, the sorting decision result will be marked as rejected or suspected incorrect sorting, and the marking information will be output for subsequent manual review.