Coal density level visual identification method and system, computer device and storage medium

CN122949352APending Publication Date: 2026-10-20CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611093297.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

1. 缺乏对煤颗粒区域的精准分割,混合光谱会影响密度识别的准确性

Benefits of technology

本发明专门针对13-200mm粒级块煤这一典型的干法分选和重介浅槽分选入料范围,解决了该粒度范围内块煤密度快速、非接触式识别的技术难题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method, system, computer equipment, and storage medium for visual recognition of coal density levels. The method includes: acquiring hyperspectral image data of lump coal with a particle size range of 13mm to 200mm; inputting the hyperspectral image data into a pre-trained FreqMamba-UNet segmentation network to obtain a particle segmentation mask for the lump coal, and extracting the pure spectral information corresponding to each coal particle based on the particle segmentation mask; inputting the pure spectral information into a pre-trained SpectralConvTran density recognition model to output the density level of each coal particle; and generating sorting control instructions based on the density level of each coal particle. This invention enables automatic, rapid, and non-contact recognition of the density level of 13-200mm lump coal in dry sorting scenarios, improving sorting accuracy and efficiency, and providing real-time density indicators for subsequent dry sorting equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of mineral processing and machine vision technology, and in particular to a method for visual recognition of coal density, a system for visual recognition of coal density, a computer device, and a computer-readable storage medium. Background Technology

[0002] In coal sorting and processing, density is a core indicator for evaluating coal quality and guiding sorting processes. Traditional methods for coal density testing primarily employ buoyancy tests, which, while accurate, suffer from drawbacks such as time consumption, sample damage, and inability to perform online testing. In recent years, wet sorting technologies such as heavy medium cyclones and shallow-trough heavy medium separators have been widely used; however, wet sorting suffers from problems such as high water consumption, complex medium recovery, and high investment costs.

[0003] Dry coal separation technology, due to its advantages such as not requiring water as a medium, simple process, and low investment, is gradually becoming an important development direction for coal separation in water-scarce areas. Currently, the feed for dry separation is usually lump coal with a particle size of 13-200mm, which is also the typical range processed by heavy medium shallow trough separators. However, real-time density detection methods for dry separation are relatively scarce, currently relying mainly on offline testing, making it difficult to achieve closed-loop intelligent control of the separation process.

[0004] Hyperspectral imaging technology can simultaneously acquire spatial and spectral information of coal. Coal of different densities exhibits different spectral reflectance characteristics in the visible-near-infrared band, making non-contact rapid detection of coal density possible. Current spectral-based coal analysis methods mostly employ traditional machine learning methods (such as PLS-DA and SVM) or simple one-dimensional convolutional neural networks, which have the following problems: 1. The lack of precise segmentation of coal particle regions and the mixing of spectra can affect the accuracy of density identification.

[0005] 2. Existing spectral analysis models fail to fully utilize the positional relationships and distance correlations between spectral bands.

[0006] 3. Ignore the order constraint between density levels. For example, the cost of misclassifying 1.4-1.7 g / cm³ as 1.7+ g / cm³ should be greater than the cost of misclassifying it as -1.4 g / cm³.

[0007] 4. Lack of systematic assessment of the generalization ability of different coal types. Summary of the Invention

[0008] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the first objective of this invention is to propose a visual recognition method for coal density levels, capable of automatic, rapid, and non-contact recognition of the density levels of 13-200mm particle size lump coal in dry sorting scenarios, improving sorting accuracy and efficiency, and providing real-time density indicators for subsequent dry sorting equipment.

[0009] The second objective of this invention is to provide a visual recognition system for coal density levels.

[0010] The third objective of this invention is to provide a computer device.

[0011] The fourth objective of this invention is to provide a computer-readable storage medium.

[0012] To achieve the above objectives, a first aspect of the present invention provides a visual recognition method for coal density levels, comprising: Acquire hyperspectral image data of lump coal with a particle size range of 13 mm to 200 mm; Hyperspectral image data is input into a pre-trained FreqMamba-UNet segmentation network to obtain a particle segmentation mask for lump coal, and the pure spectral information corresponding to each coal particle is extracted based on the particle segmentation mask. The pure spectral information is input into the pre-trained SpectralConvTran density recognition model, which outputs the density level of each coal particle. Based on the density class of each coal particle, sorting control instructions are generated.

[0013] In addition, the coal density visual recognition method according to the above embodiments of the present invention may also have the following additional technical features: According to one embodiment of the present invention, the hyperspectral image data covers a wavelength range of 400 nm to 1000 nm and includes 512 consecutive band channels.

[0014] According to an embodiment of the present invention, the FreqMamba-UNet segmentation network includes a spatial branch and a frequency branch. The spatial branch uses convolution operations and a state space model to extract spatial context features, and the frequency branch uses Fourier transform to extract frequency features. The frequency features are then fused with the spatial features output by the spatial branch to output a particle segmentation mask. The FreqMamba-UNet segmentation network also includes a multi-task learning branch, which outputs edge prediction maps of coal particles. The edge prediction maps are output in parallel with the particle segmentation mask, and the edge prediction maps are supervised by the Canny edge detection loss.

[0015] According to an embodiment of the present invention, the construction steps of the SpectralConvTran density identification model are as follows: A one-dimensional convolutional layer is constructed to extract local spectral features from pure spectral information. The one-dimensional convolutional layer uses multi-scale convolutional kernels with kernel sizes of 3, 5, and 7. A Gaussian spectral coding layer is introduced to encode the band position information, and the encoded position information is fused with the convolution output; A spectral distance-aware attention module is introduced to calculate the Euclidean distance matrix between different bands, and attention weights are generated based on the distance matrix to characterize the correlation between near and far bands. The multilayer perceptron outputs the probability of each coal particle belonging to each density level.

[0016] According to one embodiment of the present invention, the density grades include three categories: -1.4 g / cm³, 1.4-1.7 g / cm³, and 1.7+ g / cm³.

[0017] According to one embodiment of the present invention, the training loss function of the SpectralConvTran density recognition model is a hybrid loss function, including: Cross-entropy loss is used to measure the difference between the predicted density level and the actual density level. Label smoothing regularization is used to prevent model overfitting and improve generalization ability; The order constraint loss is used to penalize prediction misalignment between adjacent density levels. The order constraint loss is expressed as: for a sample with true density level i, the penalty weight for predicting j is |ij|.

[0018] According to one embodiment of the present invention, the method further includes validating and evaluating the SpectralConvTran density identification model, comprising the following steps: The performance of the SpectralConvTran density recognition model was evaluated using overall accuracy, F1 score, and confusion matrix. A comparative experiment was set up to compare the performance of SpectralConvTran with SVM, Random Forest, 1D-CNN, and Transformer. An ablation experiment was set up to remove the one-dimensional convolutional layer, the Gaussian spectral coding layer, and the spectral distance-aware attention module respectively, to verify the contribution of each module; Lignite and anthracite samples were selected for independent validation to examine the recognition performance and generalization ability of the SpectralConvTran density recognition model under different coal types.

[0019] To achieve the above objectives, a second aspect of the present invention provides a visual recognition system for coal density levels, comprising: The hyperspectral imaging module is used to acquire hyperspectral image data of lump coal with a particle size range of 13mm to 200mm; The segmentation processing module is used to input hyperspectral image data into the FreqMamba-UNet segmentation network to obtain a coal particle segmentation mask, and extract the pure spectral information of each coal particle based on the coal particle segmentation mask; The density classification module is used to input pure spectral information into the SpectralConvTran density identification model and output the density level to which each coal particle belongs. The control output module is used to generate and output sorting control commands based on the density level of each coal particle.

[0020] To achieve the above objectives, a third aspect of the present invention provides a computer device, including: a memory, a processor, and a coal density level visual recognition program stored in the memory and executable on the processor. When the processor executes the coal density level visual recognition program, it implements the above-described coal density level visual recognition method.

[0021] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing a coal density level visual recognition program thereon, which, when executed by a processor, implements the above-described coal density level visual recognition method.

[0022] The above technical solution has the following beneficial effects: This invention is specifically designed for the typical dry separation and heavy medium shallow trough separation feed range of 13-200mm lump coal, and solves the technical problem of rapid and non-contact identification of lump coal density in this particle size range. Accurate segmentation of coal particle regions is achieved through the FreqMamba-UNet segmentation network, extracting pure spectral information and avoiding interference from background and inter-particle mixed spectra on recognition accuracy; The SpectralConvTran model extracts local spectral features through one-dimensional convolution, preserves band position information through Gaussian spectral encoding, and characterizes the correlation between near and far bands through spectral distance-aware attention, thereby enhancing the utilization of high-dimensional spectral sequence structure information while controlling the model size. A hybrid optimization strategy combining label smoothing and order constraint loss is adopted to improve the distinguishability between adjacent density levels; Through systematic comparative experiments, ablation experiments, and independent verification across coal types, the performance and generalization ability of the model are comprehensively evaluated, providing a reliable basis for practical engineering applications.

[0023] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0024] Figure 1 A flowchart of a visual recognition method for coal density levels according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the network structure of a FreqMamba-UNet segmentation network according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the network structure of a SpectralConvTran density recognition model according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the composition of a hybrid loss function according to an embodiment of the present invention; Figure 5 This is a block diagram of a visual recognition system for coal density levels according to an embodiment of the present invention; Figure 6 This is a block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0025] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0026] The following description, with reference to the accompanying drawings, outlines the coal density level visual recognition method, coal density level visual recognition system, computer equipment, and computer-readable storage medium proposed in embodiments of the present invention.

[0027] like Figure 1 As shown, the coal density level visual recognition method of this invention may include the following steps: S1, acquire hyperspectral image data of lump coal with a particle size range of 13mm to 200mm.

[0028] According to one embodiment of the present invention, the hyperspectral image data covers a wavelength range of 400 nm to 1000 nm and includes 512 consecutive band channels.

[0029] Specifically, a hyperspectral imager was used to acquire hyperspectral images of lump coal on the conveyor belt. The particle size range of the lump coal was 13-200 mm, which is consistent with the typical feed particle size of existing dry separation equipment and heavy medium shallow trough separators, ensuring the industrial applicability of the technical solution. The hyperspectral imager has a spectral coverage range of 400-1000 nm (visible-near-infrared band) and a spectral resolution of approximately 1.17 nm, containing 512 continuous band channels. During acquisition, the coal sample was illuminated by a stable linear array light source, maintaining a fixed distance between the lens and the coal sample surface, and the spatial resolution of each frame was set to 1024×1024 pixels. Thus, the hyperspectral image forms a three-dimensional data cube (x, y, λ), where each pixel contains a continuous spectral curve covering 400-1000 nm.

[0030] S2. Input the hyperspectral image data into the pre-trained FreqMamba-UNet segmentation network to obtain the particle segmentation mask of the coal, and extract the pure spectral information corresponding to each coal particle based on the particle segmentation mask.

[0031] Specifically, hyperspectral image data is input into a pre-defined FreqMamba-UNet segmentation network. This network employs an encoder-decoder architecture, and through the collaborative work of spatial and frequency domain branches, it outputs a probability map of each pixel belonging to a coal particle region. After thresholding, a binary segmentation mask is obtained. Subsequently, connected component labeling is performed on the segmentation mask, identifying each independent connected component as a coal particle region. For each particle region, the spectral reflectance values ​​of all pixels within that region are extracted across 512 bands, and their arithmetic mean is calculated to obtain a clean spectral vector of length 512. This averaging process effectively suppresses random noise in individual pixels while avoiding spectral contamination caused by background intrusion at edge pixels.

[0032] Therefore, through frequency-spatial collaborative feature extraction, the FreqMamba-UNet segmentation network can simultaneously capture the local texture details and global spatial layout of coal particles. Compared with a single spatial convolutional network, it significantly improves the segmentation accuracy of irregularly shaped coal blocks of 13-200mm. By using connected component labeling and region mean extraction, it eliminates the mixed spectral interference of background pixels and adjacent particles from the source, providing high signal-to-noise ratio input data for subsequent density recognition, fundamentally solving the problem of decreased recognition accuracy caused by spectral contamination in traditional methods.

[0033] S3 inputs the pure spectral information into the pre-trained SpectralConvTran density recognition model and outputs the density level to which each coal particle belongs.

[0034] Specifically, the purified spectral vector extracted in step S2 is input into the SpectralConvTran density recognition model. The SpectralConvTran density recognition model first extracts local spectral band features through a one-dimensional convolutional layer, then injects band position information through a Gaussian spectral coding layer, then models the correlation between different bands through a spectral distance-aware attention layer, and finally outputs the probability distribution of each coal particle belonging to each density level through a classification layer, taking the category corresponding to the maximum probability as the final recognition result.

[0035] Therefore, the SpectralConvTran density recognition model transforms traditional "disordered vector" spectral analysis into "sequence structure" deep modeling by combining one-dimensional convolution, position encoding, and distance-aware attention. This enables the SpectralConvTran density recognition model to perceive the physical priors of "which bands are adjacent and which bands are far apart," thereby significantly enhancing the ability to represent high-dimensional spectral sequences and improving the distinguishability of adjacent density levels while controlling the scale of model parameters.

[0036] S4 generates sorting control instructions based on the density class of each coal particle.

[0037] Specifically, based on the density level of each identified coal particle, corresponding sorting control commands are generated. These commands can be used to control downstream actuators (such as valve arrays, baffles, etc.) to sort coal particles of different density levels into different product channels. The control commands can be transmitted to the sorting control system via PLC signals, industrial Ethernet communication, or digital outputs, enabling real-time transmission of identification results to the sorting execution end.

[0038] It is important to understand that the introduction of step S4 in the above technical solution creates a complete closed loop for the entire identification method, from image acquisition to sorting execution. Traditional spectral identification methods only output identification results, requiring manual intervention or additional systems to convert the results into control actions. This invention eliminates intermediate conversion steps and reduces system latency by directly generating sorting control commands, providing directly usable control signals for real-time closed-loop control of dry sorting equipment. Experiments have verified that the total time from hyperspectral image acquisition to sorting control command generation is controlled within 200ms, meeting the real-time sorting speed requirements for 13-200mm lump coal on the conveyor belt.

[0039] According to one embodiment of the present invention, the FreqMamba-UNet segmentation network includes a spatial branch and a frequency branch. The spatial branch uses convolution operations and a state-space model to extract spatial context features, and the frequency branch uses Fourier transform to extract frequency domain features. The frequency domain features are then fused with the spatial features output by the spatial branch to output a particle segmentation mask. The FreqMamba-UNet segmentation network also includes a multi-task learning branch, which is used to output edge prediction maps of coal particles. The edge prediction maps are output in parallel with the particle segmentation mask, and the edge prediction maps are supervised by Canny edge detection loss.

[0040] Specifically, such as Figure 2 As shown, the segmentation network adopts a U-shaped encoder-decoder structure, with two parallel branches set in each layer of the encoder: Spatial Feature Extraction Branch: This branch first extracts local spatial features from the hyperspectral image using standard convolutional layers (such as 3×3 convolutions) to obtain low-level visual information such as edges and textures. To further model long-range spatial context dependencies, a Selective State Space Model (also known as the Mamba module) is introduced after the convolutional layers. The Mamba module efficiently models spatial sequences of arbitrary length through a state transition mechanism for input dependencies. Its computational complexity is linear with respect to the length of the input sequence. Compared to the Transformer's self-attention mechanism (quadratic complexity), it can significantly reduce memory usage and computation time when processing high-resolution (1024×1024) hyperspectral images, while maintaining the ability to model long-range dependencies.

[0041] Frequency domain feature extraction branch: This branch transforms the spatial domain feature map to the frequency domain using a two-dimensional fast Fourier transform (2D FFT). In the frequency domain, learnable filters are used to weight and enhance or suppress global frequency components, and then the spatial domain is restored using an inverse fast Fourier transform (2D IFFT). Frequency domain features can capture the differences in global frequency distribution between coal particle regions and the background, such as the specific frequency response caused by the uneven texture of coal particle surfaces. This information is difficult to obtain directly from spatial domain convolution. Frequency domain features and spatial domain features are deeply fused through an adaptive fusion module (such as channel attention-driven weighted fusion), enabling the network to simultaneously possess the ability to perceive local details and analyze global frequencies.

[0042] Multi-task learning module: At the decoder end, in addition to outputting the segmentation mask, the network adds an edge prediction branch, which outputs a particle edge probability map. This branch uses the Canny edge detection operator to extract the true edges from the grayscale image of the original hyperspectral image (which can be generated by averaging across all bands or by a specific band) as the supervision signal. Introducing edge prediction loss into the loss function forces the network to pay special attention to the accurate localization of particle boundaries while optimizing the segmentation region.

[0043] Therefore, the Mamba module in the spatial domain branch achieves modeling of long-distance spatial dependencies with linear computational complexity, solving the problem of excessive computational resource consumption in high-resolution image segmentation by traditional Transformers; the frequency domain branch supplements the local perception limitations of spatial convolution through global frequency analysis, making the network more robust to uneven illumination and surface texture differences; the edge constraint in the multi-task learning module significantly improves the boundary adhesion problem caused by the irregular shape and mutual contact of 13-200mm coal lumps, making the edge of the segmentation mask highly consistent with the real particle contour, thereby ensuring the purity of subsequent spectral extraction.

[0044] According to an embodiment of the present invention, the construction steps of the SpectralConvTran density recognition model are as follows: A one-dimensional convolutional layer is constructed to extract local spectral features from the pure spectral information. The one-dimensional convolutional layer uses multi-scale convolutional kernels with kernel sizes including 3, 5, and 7. A Gaussian spectral coding layer is introduced to encode the band position information, and the encoded position information is fused with the convolutional output. A spectral distance sensing attention module is introduced to calculate the Euclidean distance matrix between different bands, and attention weights are generated based on the distance matrix to characterize the correlation between near and far bands. The probability of each coal particle belonging to each density level is output through a multilayer perceptron.

[0045] Specifically, such as Figure 3 As shown, the SpectralConvTran density recognition model includes the following modules: One-dimensional convolutional feature extraction module: Constructs three one-dimensional convolutional layers with kernel sizes of 7, 5, and 3, respectively. Each layer is followed by batch normalization and ReLU activation function. Multi-scale convolutional kernels can simultaneously capture broad spectral trends and local fine features. The input spectral vector (512-dimensional) is processed by convolution to output a 128-dimensional feature vector.

[0046] Gaussian spectral coding module: Calculates the Gaussian coding vector for each band position (wavelength λ_i, i=1..512): ; k=1…K, where K is the encoding dimension (set to 16), and the center of each Gaussian kernel. Uniform coverage of the 400-1000nm range, standard deviation Control the width of the Gaussian kernel. Concatenate or fuse the encoded position vector (16-dimensional) with the convolution output features (128-dimensional) to enable the model to perceive the relative position of the band in the spectral sequence.

[0047] Spectral distance-aware attention module: calculates the spectral distance matrix between different positions in the input feature sequence. ,in, (Euclidean distance or Manhattan distance). Attention weights are generated based on the distance matrix: , in This is the distance attenuation coefficient. This module enables the model to adaptively adjust the attention weights based on the physical distance between bands, assigning higher weights to near bands and lower weights to far bands, which aligns with the prior knowledge in spectral analysis that "nearby bands are more correlated."

[0048] Multilayer perceptron classification module: The features output by the attention module are flattened and input into a three-layer fully connected network (number of neurons: 256 → 128 → 3), and the predicted probability of each density level is output.

[0049] According to one embodiment of the present invention, the density grades include three categories: -1.4 g / cm³, 1.4-1.7 g / cm³, and 1.7+ g / cm³.

[0050] In other words, density levels are defined into three categories: C0 (-1.4 g / cm³) 3 C1 (1.4-1.7 g / cm³) 3 C2 (1.7+ g / cm) 3 These three density grades cover the typical product classification of 13-200mm lump coal in dry sorting.

[0051] According to one embodiment of the present invention, the training loss function of the SpectralConvTran density recognition model is a hybrid loss function, including: cross-entropy loss, used to measure the difference between the predicted density level and the true density level; label smoothing regularization term, used to prevent the model from overfitting and improve generalization ability; and order constraint loss, used to penalize the prediction misalignment between adjacent density levels. The order constraint loss is expressed as: for a sample with a true density level of i, the penalty weight for the prediction of j is |ij|.

[0052] Specifically, the training loss function of the SpectralConvTran model employs a hybrid loss strategy, such as... Figure 4 As shown: Cross-entropy loss ; in One-hot encoding of the real label. To predict probabilities.

[0053] Tag smoothing regularization: hard label Replace with smooth labels ; in is the smoothing coefficient (taken as 0.1), and K is the number of classes (3). Label smoothing can prevent the model from becoming overconfident and improve its generalization ability.

[0054] Loss due to order constraint: ; in is the misalignment penalty coefficient. This loss function encourages the model to concentrate misjudgments between adjacent density levels (penalty of 1), while avoiding misjudgments across levels (penalty of 2), which is consistent with the ordered physical characteristics of density levels.

[0055] The total loss function is: ; β is the balance coefficient (taken as 0.5).

[0056] The SpectralConvTran density recognition model was trained using the AdamW optimizer with an initial learning rate of 0.001. Cosine annealing was used for learning rate scheduling, and the training epochs were 200. An early stopping mechanism was implemented (the model stopped when the verification loss did not decrease for 20 consecutive epochs).

[0057] According to one embodiment of the present invention, the method further includes validating and evaluating the SpectralConvTran density recognition model, comprising the following steps: evaluating the performance of the SpectralConvTran density recognition model using overall accuracy, F1 score, and confusion matrix; setting up comparative experiments to compare the performance of SpectralConvTran with SVM, random forest, 1D-CNN, and Transformer; setting up ablation experiments to remove the one-dimensional convolutional layer, Gaussian spectral coding layer, and spectral distance-aware attention module respectively, and verifying the contribution of each module; selecting lignite and anthracite samples for independent validation to examine the recognition performance and generalization ability of the SpectralConvTran density recognition model under different coal types.

[0058] Specifically, after model training is completed, a system evaluation will be conducted from the following dimensions: Comparative experiments: SpectralConvTran was compared with the following methods: SVM (radial basis function kernel), random forest (100 trees), 1D-CNN (three convolutional layers + fully connected layers), and standard Transformer (without spectral encoding and distance attention). Five-fold cross-validation was used, and the evaluation metrics included overall accuracy (OA), F1 score for each category (macro-average and weighted average), and confusion matrix.

[0059] Ablation experiments: The following ablation variants were set: (a) w / o Conv: removing the one-dimensional convolutional layer and using only fully connected layers; (b) w / o Position: removing Gaussian spectral encoding; (c) w / o Distance: removing spectral distance-aware attention; (d) w / o Order: removing order constraint loss. The contribution of each module to the density recognition of 13-200mm coal lumps was verified by comparison.

[0060] Cross-coal type generalization experiment: Lignite (from a mine in Inner Mongolia, volatile matter >37%) and anthracite (from a mine in Shanxi, volatile matter <10%) were selected as independent validation sets to examine the model's recognition performance under different coalification degrees. The overall accuracy and F1 score of each density class for each coal type were recorded to analyze the impact of coal type differences on the model's generalization ability and verify the adaptability of the invention to different coal qualities.

[0061] Experimental results show that the spectral transformation recognition model proposed in this invention achieves an overall accuracy of 96.2% in the 13-200mm coal density level recognition task, which is significantly improved compared with SVM (82.1%), Random Forest (85.4%), 1D-CNN (89.7%), and standard Transformer (91.8%). Ablation experiments show that all modules contribute positively, with the spectral distance perception attention module contributing the most significantly. In cross-coal type validation, the model achieves accuracy of 93.8% and 94.5% on lignite and anthracite, respectively, indicating that this invention has good cross-coal type generalization ability.

[0062] Corresponding to the above embodiments, the present invention also proposes a visual recognition system for coal density levels.

[0063] like Figure 5 As shown, the coal density visual recognition system 100 of this embodiment may include: a hyperspectral imaging module 110, a segmentation processing module 120, a density classification module 130, and a control output module 140.

[0064] The hyperspectral imaging module 110 is used to acquire hyperspectral image data of lump coal with a particle size range of 13mm to 200mm. The hyperspectral imaging module 110 includes a hyperspectral imager, a linear array light source, and an encoder trigger module, and is installed above the belt conveyor to continuously acquire data as 13-200mm lump coal moves with the conveyor belt.

[0065] The segmentation processing module 120 is used to input hyperspectral image data into the FreqMamba-UNet segmentation network to obtain a coal particle segmentation mask, and extract the pure spectral information of each coal particle based on the coal particle segmentation mask. The segmentation processing module 120 receives a three-dimensional data cube of the hyperspectral image and outputs a binary segmentation mask.

[0066] The density classification module 130 is used to input pure spectral information into the SpectralConvTran density identification model and output the density level to which each coal particle belongs.

[0067] The control output module 140 is used to generate and output sorting control commands based on the density level of each coal particle. These commands can be displayed on a screen, output as a PLC signal, or transmitted to the sorting control system.

[0068] It should be noted that for details not disclosed in the coal density visual recognition system of this embodiment, please refer to the details disclosed in the coal density visual recognition method of this embodiment, which will not be repeated here.

[0069] Corresponding to the above embodiments, the present invention also proposes a computer device.

[0070] like Figure 6 As shown, the computer device 200 of this embodiment includes: a memory 210, a processor 220, and a coal density level visual recognition program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the coal density level visual recognition program, it implements the above-mentioned coal density level visual recognition method.

[0071] Corresponding to the above embodiments, the present invention also proposes a computer-readable storage medium.

[0072] The computer-readable storage medium of this invention stores a coal density level visual recognition program thereon, which, when executed by a processor, implements the above-described coal density level visual recognition method.

[0073] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0074] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0075] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0076] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0077] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0078] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for visual recognition of coal density levels, characterized in that, include: Acquire hyperspectral image data of lump coal with a particle size range of 13 mm to 200 mm; The hyperspectral image data is input into a pre-trained FreqMamba-UNet segmentation network to obtain a particle segmentation mask for the coal lump, and the pure spectral information corresponding to each coal particle is extracted based on the particle segmentation mask. The pure spectral information is input into the pre-trained SpectralConvTran density recognition model, which outputs the density level of each coal particle. Based on the density class of each coal particle, sorting control instructions are generated.

2. The visual recognition method for coal density levels according to claim 1, characterized in that, The hyperspectral image data covers the 400nm to 1000nm band range and contains 512 consecutive band channels.

3. The visual recognition method for coal density levels according to claim 1, characterized in that, The FreqMamba-UNet segmentation network includes a spatial branch and a frequency branch. The spatial branch uses convolution operations and a state space model to extract spatial context features, while the frequency branch uses Fourier transform to extract frequency domain features. The frequency domain features are then fused with the spatial features output by the spatial branch to output the particle segmentation mask. The FreqMamba-UNet segmentation network also includes a multi-task learning branch, which is used to output edge prediction maps of coal particles. The edge prediction maps are output in parallel with the particle segmentation mask, and the edge prediction maps are supervised by Canny edge detection loss.

4. The visual recognition method for coal density levels according to claim 1, characterized in that, The construction steps of the SpectralConvTran density recognition model are as follows: A one-dimensional convolutional layer is constructed to extract local spectral features from the pure spectral information. The one-dimensional convolutional layer uses multi-scale convolutional kernels with kernel sizes including 3, 5, and 7. A Gaussian spectral coding layer is introduced to encode the band position information, and the encoded position information is fused with the convolution output; A spectral distance sensing attention module is introduced to calculate the Euclidean distance matrix between different bands, and attention weights are generated based on the distance matrix to characterize the correlation between near and far bands; The multilayer perceptron outputs the probability of each coal particle belonging to each density level.

5. The visual recognition method for coal density levels according to claim 4, characterized in that, The density grades include three categories: -1.4 g / cm³, 1.4-1.7 g / cm³, and 1.7+ g / cm³.

6. The visual recognition method for coal density levels according to claim 4, characterized in that, The training loss function of the SpectralConvTran density recognition model is a hybrid loss function, including: Cross-entropy loss is used to measure the difference between the predicted density level and the actual density level. Label smoothing regularization is used to prevent model overfitting and improve generalization ability; The order constraint loss is used to penalize prediction misalignment between adjacent density levels. The order constraint loss is expressed as: for a sample with true density level i, the penalty weight for prediction j is |ij|.

7. The visual recognition method for coal density levels according to claim 1, characterized in that, The method also includes verifying and evaluating the SpectralConvTran density identification model, including the following steps: The performance of the SpectralConvTran density recognition model was evaluated using overall accuracy, F1 score, and confusion matrix. A comparative experiment was set up to compare the performance of SpectralConvTran with SVM, Random Forest, 1D-CNN, and Transformer. An ablation experiment was set up to remove the one-dimensional convolutional layer, the Gaussian spectral coding layer, and the spectral distance-aware attention module respectively, to verify the contribution of each module; Lignite and anthracite samples were selected for independent validation to examine the recognition performance and generalization ability of the SpectralConvTran density recognition model under different coal types.

8. A visual recognition system for coal density levels, characterized in that, include: The hyperspectral imaging module is used to acquire hyperspectral image data of lump coal with a particle size range of 13mm to 200mm; The segmentation processing module is used to input the hyperspectral image data into the FreqMamba-UNet segmentation network to obtain a coal particle segmentation mask, and extract the pure spectral information of each coal particle based on the coal particle segmentation mask. The density classification module is used to input the pure spectral information into the SpectralConvTran density identification model and output the density level to which each coal particle belongs. The control output module is used to generate and output sorting control commands based on the density level of each coal particle.

9. A computer device, characterized in that, include: The system includes a memory, a processor, and a coal density level visual recognition program stored in the memory and executable on the processor. When the processor executes the coal density level visual recognition program, it implements the coal density level visual recognition method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a coal density level visual recognition program, which, when executed by a processor, implements the coal density level visual recognition method according to any one of claims 1-7.