Raw ore classification method, device and equipment
By introducing overlapping IoU loss function and other optimization techniques in the YOLOv8 model, the identification of sycamotungsten ore is solved, and the problem of insufficient identification accuracy and speed in the prior art is achieved, and high-precision and fast ore classification are achieved.
Patent Information
- Application Number
- CN202510275249.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, when the grayscale difference in X-ray transmission images of sedrat ore raw ore is small and the contrast is not obvious, there is a bottleneck in the identification accuracy and speed of ore and waste stone, which is difficult to meet the dual requirements of the ore sorting system for real-time and accuracy.
The YOLOv8 model with overlapping IoU loss function is used to train and verify the syringe tungsten ore limescale image dataset to optimize the recognition performance of the model, and improve the recognition accuracy and speed through image data augmentation, Inner-SIoU loss function, scale weighted enhancement attention mechanism, hyperparameter automation optimization and lightweight convolution technology.
It improves the accuracy and speed of automatic identification of raw ore, meets the dual requirements of real-time and accuracy of the ore sorting system, and realizes high-precision classification of sycamotungsten ore and waste stone.
Smart Images

Figure CN120107693A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mineral processing engineering, and in particular to a method, device and equipment for classifying raw ore. Background Art
[0002] At present, the development of scheelite faces problems such as low grade of raw ore, fine embedded particle size leading to complex mineral processing technology and high cost. To meet these challenges, pre-selection and discarding technology can be adopted, which mainly includes heavy medium method and X-ray transmission (XRT) intelligent sorting method. Among them, XRT intelligent sorting method combined with automated equipment can achieve pre-enrichment of raw ore while reducing the amount of grinding and dressing, thereby improving the grade of selected ore, increasing the economic benefits of mining companies, and providing support for the high-quality and sustainable development of the industry.
[0003] The process of sorting scheelite ore by XRT intelligent sorting is as follows: First, the ore is transported to the vibrating feeding system. During this process, the ore needs to be crushed or screened in advance to ensure that its particle size meets the requirements. When the ore passes through the crawler conveyor, the light source and sensor capture the XRT image information of the ore in real time as the basis for subsequent analysis. The captured image data is transmitted to the data calculation controller, and the various characteristics of the ore are analyzed and identified in detail using image processing technology and deep learning algorithms. Based on the analysis results, the controller will make intelligent decisions to determine whether the ore meets the preset standards. After completing the ore classification, the sorting mechanism uses air jet technology to accurately separate ore and waste rock in the separation bin according to instructions.
[0004] One of the core technologies of XRT intelligent sorting is ore identification algorithm. Although the existing ore identification algorithm has been successfully applied to industrial production, due to the similar physical properties of ore and waste rock in scheelite ore (scheelite ore XRT image is shown in Figure 2), the ore identification algorithm is still not suitable for industrial production. Figure 1 As shown in the figure, the grayscale difference of the X-ray transmission image of the raw ore is small and the contrast is not obvious, which increases the difficulty of recognition. The existing recognition algorithm still has bottlenecks in accuracy and speed, and the performance needs to be further optimized. Summary of the invention
[0005] The present application proposes a method, device and equipment for raw ore classification, which can solve one of the problems existing in the background technology.
[0006] In order to achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a method for classifying raw ore is provided, the method comprising:
[0008] Obtaining the pre-processed raw ore image to be processed; and,
[0009] The trained raw ore classification model is used to process the raw ore image to obtain the classification results of ore and waste rock, wherein the raw ore classification model adopts the YOLOv8 model with an overlap IoU loss function defined, and the overlap IoU loss function is used to measure the matching degree of position and scale between the prediction box and the target box.
[0010] Based on the above technical scheme, through training and verification of raw ore image datasets, especially the scheelite limescale image dataset, and setting the overlap IoU loss function to measure the degree of matching between the predicted box and the target box in position and scale, the recognition performance of the YOLOv8 model is optimized, the accuracy and speed of automatic recognition of raw ore are improved, and the dual requirements of the ore sorting system for real-time and accuracy are met.
[0011] In a possible design manner of the first aspect, the overlap IoU loss function is provided with: a standard SIoU loss for measuring the overlap between the target box and the prediction box, an inner layer IoU loss for measuring the overlap between the target box and the inner layer box, and a scale adjustment loss for measuring the scale difference.
[0012] In a possible design manner of the first aspect, the overlap IoU loss function is expressed by the inner layer IoU loss and a scale adjustment coefficient.
[0013] In a possible design manner of the first aspect, the YOLOv8 model adds a channel attention mechanism and a spatial attention mechanism.
[0014] In a possible design manner of the first aspect, the preprocessing includes:
[0015] Normalizing the pixel values of the original raw ore image to obtain a first image, wherein the pixel value range of the first image is between 0 and 255; and
[0016] The areas in the first image whose pixel values are lower than a preset threshold are replaced with white to highlight the ore features.
[0017] In a possible design manner of the first aspect, the preprocessing further includes: contrast-limited adaptive histogram equalization.
[0018] In a possible design manner of the first aspect, the method further includes: using the Optuma automated hyperparameter optimization framework to find the optimal hyperparameters for the YOLOv8 training process.
[0019] In a possible design manner of the first aspect, the raw ore classification model adopts lightweight grouped deep separable convolution.
[0020] In a second aspect, a raw ore classification device is provided, the device comprising:
[0021] An acquisition unit, used to obtain the pre-processed raw ore image to be processed; and
[0022] A classification unit is used to process the raw ore image to be processed by using the trained raw ore classification model to obtain classification results of ore and waste rock, wherein the raw ore classification model adopts a YOLOv8 model with an overlap IoU loss function defined, and the overlap IoU loss function is used to measure the degree of matching between the prediction box and the target box in position and scale.
[0023] In a third aspect, an electronic device is provided, comprising: a processor, and a memory coupled to the processor, the memory being used to store a computer program; the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method as any possible implementation in the first aspect.
[0024] In a fourth aspect, a computer-readable storage medium is provided, comprising a computer program or instructions, which, when executed on a computer, enables the computer to execute the method of any possible implementation of the first aspect.
[0025] In a fifth aspect, a computer program product is provided, comprising: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method of any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 It is the XRT image of the original scheelite ore in the prior art;
[0028] Figure 2 It is a schematic diagram of the YOLOv8 algorithm network architecture provided in an embodiment of the present application;
[0029] Figure 3 It is the technical roadmap provided by the embodiments of this application;
[0030] Figure 4 1 is a comparison diagram of the threshold operation provided in the embodiment of the present application: (a) before the threshold operation; (b) after the threshold operation;
[0031] Figure 5 It is a comparison diagram of grayscale images before and after the CLAHE operation provided in the embodiment of the present application: (a) before the operation; (b) after the operation;
[0032] Figure 6 The Inner-SIoU loss function principle diagram provided in the embodiment of the present application [5] is as follows: (a) The scaling result when the ratio of the target box to the prediction box is less than 1; (b) The scaling result when the ratio of the target box to the prediction box is greater than 1;
[0033] Figure 7 It is a schematic diagram of the scale-weighted enhanced attention mechanism provided in an embodiment of the present application;
[0034] Figure 8 This is a network architecture diagram of the GSConv module provided in an embodiment of the present application;
[0035] Fig. 9 : This is a comparison chart before and after lightweighting provided by the embodiment of the present application: (a) mAP change; (b) F1 change; (c) FPS change; (d) reasoning time change;
[0036] Fig.10 This is a visualization software interface diagram provided by an embodiment of the present application;
[0037] Fig.11 This is a result diagram of YOLOv8-Miner algorithm recognition provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0041] Before introducing the embodiments of the present application, a brief description of the current technical research of the present application is given:
[0042] YOLOv8 (You Only Look Once version 8) is a new version of the YOLO series of target detection algorithms. It further improves the accuracy and robustness of detection while maintaining high efficiency.
[0043] The basic framework of YOLOv8 continues the consistent style of the YOLO series, that is, end-to-end object detection. It mainly includes the following parts: input image preprocessing, feature extraction network (Backbone), feature fusion network (Neck), and detection head (Head). After preprocessing, the input image is sent to the feature extraction network for feature extraction, and then passed through the feature fusion network for multi-scale feature fusion, and finally the detection head performs object detection and classification.
[0044] The feature extraction network in YOLOv8 usually uses efficient convolutional neural networks (CNN), such as CSPNet (CrossStage PartialNetworks) or its improved versions. These networks gradually extract feature information from the image by stacking convolutional layers, pooling layers and other structures. The design goal of the feature extraction network is to minimize the amount of calculation and memory usage while ensuring the feature extraction capability. The neck part of YOLOv8 usually uses PAFPN (Path Aggregation Network) or its improved version for feature fusion. PAFPN achieves effective fusion of features of different scales through bottom-up path enhancement and top-down path enhancement. This fusion method helps to improve the model's detection ability for small targets while maintaining the detection accuracy for large targets.
[0045] The head part of YOLOv8 is responsible for converting the fused feature map into the final detection result. It usually uses anchor boxes and prediction heads to achieve this goal. Anchor boxes are a set of predefined rectangular boxes of different scales and aspect ratios used to match the real bounding box of the target object. The prediction head is responsible for outputting the confidence, category probability and bounding box offset of each anchor box. In YOLOv8, the prediction head is usually implemented using a convolutional layer, which outputs a multidimensional tensor containing confidence, category probability and bounding box offset. Then, the final detection target is filtered out from the prediction results through post-processing algorithms such as non-maximum suppression (NMS).
[0046] The main improvements of YOLOv8 in algorithm principle include:
[0047] More efficient feature extraction network: YOLOv8 adopts a more advanced feature extraction network structure, such as an improved version of CSPNet, which further improves the efficiency and accuracy of feature extraction.
[0048] More powerful feature fusion mechanism: By introducing a more complex feature fusion network (such as an improved version of PAFPN), YOLOv8 achieves effective fusion of features of different scales and improves the model's ability to detect small targets.
[0049] More sophisticated prediction head design: YOLOv8 optimizes the prediction head and adopts a more sophisticated anchor box matching strategy and loss function design to further improve the accuracy of object detection and classification.
[0050] In summary, YOLOv8 has made a number of improvements in the algorithm principle, which further improves the accuracy and robustness of target detection while maintaining high efficiency.
[0051] The following is an exemplary description of the raw ore classification method of the embodiment of the present application.
[0052] The image processing technology and deep learning algorithm performance used by the XRT intelligent ore dressing machine are the key to whether the raw ore can be separated accurately and quickly. At present, there are still omissions and misselections in the sorting process. To address this problem, this study proposed a recognition algorithm specifically for scheelite grayscale images based on the YOLOv8 single-stage deep learning algorithm and named it YOLOv8-Miner, aiming to improve the accuracy and speed of automatic ore identification. Through the training and verification of the scheelite grayscale image dataset, the recognition performance of the YOLOv8 model was optimized to meet the dual requirements of the ore sorting system for real-time and accuracy.
[0053] The network architecture diagram of the YOLOv8 algorithm is as follows Figure 2 As shown in the figure, the YOLOv8 algorithm is a mature target detection algorithm in the YOLO series. Its network structure consists of three main parts: the backbone network (Backbone), the neck network (Neck) and the head network (Head), and different versions of algorithm models are provided to meet the needs of different application scenarios.
[0054] This embodiment optimizes YOLOv8 by using image data enhancement, Inner-SIoU loss function, scale-weighted enhanced attention mechanism, hyperparameter automatic optimization and lightweight convolution technology to improve the accurate identification ability of ore and waste rock. In the classification task, the optimized algorithm has an mAP value of 0.969 for the ore category, an F1 value of 0.87, an inference speed of 12.86 frames per second, and a single image inference time of 2.78 milliseconds.
[0055] In order to objectively evaluate the performance of the model, this study selected four key performance indicators: mAP, F1, FPS, and inference speed, and named the improved YOLOv8-s algorithm model YOLOv8-Miner.
[0056] The calculation formulas for mAP and F1 values are as follows:
[0057]
[0058] Where P represents the recognition accuracy, R represents the recall rate, TP represents the number of samples of ore categories that are correctly identified, FP represents the number of samples of ore categories that are incorrectly identified, and FN represents the number of correct ore categories that are not identified.
[0059]
[0060] Where F1 is the harmonic mean of recognition precision and recall.
[0061]
[0062] Where AP represents the integral of the PR curve constructed with P as the horizontal axis and R as the vertical axis, that is, the size of the area under the curve. mAP represents the average AP of all categories, k is the number of recognized categories, and the value of k in this study is 2.
[0063] The four key performance indicators in this study are briefly described as follows:
[0064] (1) mAP represents the mean of the average precision of all categories, which can be used to measure the overall detection performance of the model while evaluating the accuracy of target positioning and classification.
[0065] (2) F1 is the harmonic mean of the algorithm model’s precision and recall, which can help optimize the detection threshold and find the best detection result.
[0066] (3) The unit of FPS is frames per second, which indicates the number of grayscale image frames iterated by the algorithm model per second. It is an important indicator for measuring the speed of model inference.
[0067] (4) Inference time: refers to the time required for the algorithm to infer a single grayscale image, measured in milliseconds, reflecting the processing efficiency of the model.
[0068] This study also developed visualization software to intuitively demonstrate the application effect of the optimization algorithm in ore identification, providing a new technical solution for the realization of intelligent scheelite beneficiation. Figure 3 shown.
[0069] According to the technical roadmap of the present invention, the specific implementation steps of the YOLOv8-Miner algorithm are as follows:
[0070] 1. Threshold Operation
[0071] When using Labelimg annotation software to annotate the raw ore into two categories, ore and waste rock, the image dataset annotated by the naked eye is somewhat random and imprecise due to the small grayscale difference and unclear contrast of XRT images, which will lead to unsatisfactory algorithm performance indicators and inability to achieve industrial application. In order to solve this problem, this study regenerates the grayscale dataset after thresholding all raw ore grayscale images to ensure that the Txt file generated by Labelimg annotation software is accurate.
[0072] The threshold operation can effectively highlight the characteristics of dark mineral spots, make the grayscale image annotation file accurate, and improve the algorithm performance indicators. The specific idea is to first convert the original 16-bit image into an 8-bit image, so as to normalize the pixel value range to between 0 and 255. The setting of the threshold is based on the critical difference in pixel values between ore and waste rock in the image. When the pixel value is lower than 85, the area is identified as ore, and the relevant pixel value will be replaced with white to highlight the characteristics of the ore; when the pixel value is higher than 85, the area is regarded as waste rock, and the original pixel value remains unchanged. Comparison of grayscale images before and after the threshold operation Figure 4 shown.
[0073] 2. Image Data Enhancement
[0074] In order to enhance the local contrast of the image while avoiding excessive noise enhancement, this study adopts the contrast-limited adaptive histogram equalization preprocessing method, referred to as CLAHE. The specific steps of this method are as follows:
[0075] (1) Import OpenCV library and operating system library;
[0076] (2) Set the input and output folders;
[0077] (3) Create an output folder;
[0078] (4) Create a CLAHE processing object;
[0079] (5) Traverse all images in the input folder;
[0080] (6) Filter files that are not in TIFF format;
[0081] (7) Reading XRT grayscale image;
[0082] (8) Check whether the image is read successfully;
[0083] (9) Application of CLAHE for contrast enhancement;
[0084] (10) Save the enhanced image;
[0085] (11) Print summary information after processing is completed.
[0086] After this step, the grayscale image of the original ore is compared before and after. Figure 5 shown.
[0087] 3. Inner-SIoU loss function
[0088] Traditional IoU loss function: Traditional IoU loss function = 1-IoU, where IoU is equal to the intersection of the target box and the prediction box divided by the union, also called the intersection-over-union ratio, which mainly focuses on the overlap between the prediction box and the true target box. However, in complex ore recognition tasks, these methods may not fully reflect the matching degree between the prediction box and the target box, thus affecting the performance indicators of the model. This study introduces a new Inner-SIoU loss function, the principle diagram of which is shown in the figure below. Figure 6 shown.
[0089] The Inner-SIoU loss function combines the standard SIoU loss, the inner IoU loss, and the scale adjustment loss. The three parts work together to optimize the matching of position, scale, and shape between the target box and the predicted box.
[0090] The specific calculation formula is shown below.
[0091]
[0092] In the above formula, Loss SIoU It is the standard SIoU loss. IoU measures the overlap between the target box and the predicted box. inner is the overlap between the target box and the inner box. Δ and Ω are adjustment coefficients for scale differences, which make the loss not only consider the overlap of the bounding box, but also measure the matching degree in scale. The specific definition is as follows: p is the width of the prediction box, w g is the width of the target box, h p is the height of the prediction box, h g is the height of the target box.
[0093]
[0095] In the above formula and Respectively represent the left and right boundary positions of the target box, Represents the horizontal center coordinate of the real box, w gt Indicates the width of the target box, and ratio is a proportional coefficient used to adjust the aspect ratio of the target box.
[0096]
[0097] In the above formula and Respectively represent the upper and lower boundary positions of the target box, Indicates the vertical center coordinate of the target box, h gt Indicates the height of the target box, and ratio is a proportional coefficient used to adjust the aspect ratio of the target box.
[0098]
[0099] In the above formula, b l and b r Respectively represent the left and right boundary positions of the prediction box, x c represents the horizontal center coordinate of the prediction box, and w represents the width of the prediction box.
[0100]
[0101] In the above formula, b t and b b Respectively represent the upper and lower boundary positions of the prediction box, y c It represents the vertical center coordinate of the prediction box, and h represents the height of the prediction box.
[0102]
[0103] In the above formula, inter represents the overlapping area between the target box and the prediction box.
[0104] union=((w gt +h gt )×(ratio) 2 )+(w×h)×(ratio) 2 -inter (14)
[0106] In the above formula, union represents the union of the total area of the target box and the prediction box minus the intersection.
[0107]
[0108] In the above formula, IoU inner Measures the overlap between the target box and the inner boxes.
[0109] 4. Attention Mechanism
[0110] The attention mechanism is a commonly used technology in target detection. It allows the YOLOv8 algorithm to focus on the original ore features that are most relevant to the current ore identification task, while reducing attention to irrelevant features. The scale-weighted enhanced attention mechanism (SEAM) used in this study is integrated into the Backbone and Neck parts of YOLOv8. SEAM has the following characteristics:
[0111] (1) Serial attention calculation: The SEAM module performs weighted processing on channel attention and spatial attention in sequence to further enhance the expressiveness of features.
[0112] (2) Gradually optimize features: The SEAM module not only screens key feature channels through channel attention, but also focuses on the target area with the help of spatial attention, thereby enhancing the algorithm model's ability to perceive spatial context.
[0113] (3) Efficient feature fusion: The SEAM module obtains global context information through global pooling operations and weights the features through convolution calculations and activation functions.
[0114] The principle diagram of the scale-weighted enhanced attention mechanism is as follows Figure 7 shown.
[0115] The specific steps of SEAM are as follows:
[0116] (1) Input: refers to the input. The input of SEAM is the feature map extracted by YOLOv8.
[0117] (2) CSMM: refers to the cross-scale multimodal attention mechanism, where patch = 6 or 7 refers to the convolution kernel size. Its function is to extract local information at different scales and enhance the model's ability to recognize objects of different sizes.
[0118] (3) Addition: refers to the addition operation. This step adds and fuses the CSMM calculation results of different scales.
[0119] (4) Average Pooling: refers to average pooling. Global average pooling of the added features can reduce the amount of calculation.
[0120] (5)Global Feature Embeddings: refers to global feature embedding, which maps the pooled features to the global feature space to learn richer contextual information.
[0121] (6) Channel Expansion: Channel expansion of global features can make the features have richer information expression capabilities. Since the grayscale image has only one channel, this study uses 1×1 convolution to expand the channel to adapt it to the subsequent channel attention calculation.
[0122] (7) Multiplication: refers to attention weighting, which enhances important features through weight multiplication, while irrelevant or low-weight features are suppressed.
[0123] 5. Hyperparameter Optimization
[0124] In the ore identification task of this study, the choice of hyperparameters has a crucial impact on the performance indicators of YOLOv8. However, manually adjusting hyperparameters is not only time-consuming and laborious, but also difficult to ensure the optimality of the results. To this end, this study uses the Optuma automated hyperparameter optimization framework to find the optimal hyperparameters for the YOLOv8 training process in a more efficient and comprehensive way.
[0125] This study searches for multiple configurations in the process of hyperparameter optimization for the global training process through the Optuna framework and evaluates them on some key indicators. Based on the results of hyperparameter optimization, this study studies several key parameters in the training process. The key parameter settings are shown in Table 1.
[0126] Table 1 Hyperparameter settings during training
[0127]
[0128] 6. Lightweight convolution
[0129] The main purpose of performing lightweight convolution in the scheelite ore recognition task is to reduce the number of parameters while maintaining the performance of the model as much as possible. The lightweight grouped depth-separable convolution used in this study is referred to as GSConv in English. Its network architecture is as follows: Figure 8 As shown in the figure, Cin represents the number of input channels, Cout represents the number of output channels, SConv represents standard convolution, Concat represents channel concatenation operation, DSConv represents depth-separable convolution, and Shuffle represents channel shuffling.
[0130] The design goal of GSConv is to improve the efficiency of the model by reducing the computational complexity and the number of parameters. Figure 8 It can be seen that its basic strategy is to first process the input channels using standard convolution, then perform depth-wise separable convolution, then concatenate the feature maps and further process them through grouped convolution, and finally optimize the information exchange between channels through channel shuffling to obtain the output feature map.
[0131] The parameter calculation formula for depth-wise separable convolution is as follows, where k represents the size of the convolution kernel.
[0132] C in ×k 2 +C out ×k 2 (16)
[0134] The parameter calculation formula for grouped convolution is as follows, where G represents the number of groups.
[0135]
[0136] Comparison of algorithm performance indicators before and after using GSConv Fig. 9 shown.
[0137] Algorithm optimization results
[0138] This experiment needs to test the impact of using each module in sequence on the recognition performance index of the ore category, so an ablation experiment is set up. The experimental results are summarized as shown below, where √ indicates the use of this method. The YOLO series of algorithms are known for their fast recognition speed and are suitable for scenarios with high real-time requirements.
[0139] Table 2 Ablation experiment
[0140]
[0141] The ablation experiment shows that by gradually adding modules such as CLAHE, SIoU, SEAM, Optuma and GSConv, the accuracy and robustness of the YOLOv8 model have been significantly improved. Although the inference speed has decreased, the overall performance has been greatly improved, making it suitable for real-time task scenarios with high accuracy requirements.
[0142] In order to objectively evaluate the performance of the model and reflect the advantages of YOLOv8-Miner, this study trained and verified YOLOv8-Miner and the original algorithm models of YOLOv3, YOLOv5-n, YOLOv5-s, YOLOv8-n, and YOLOv8-s on the same original grayscale image dataset, and the performance indicators are compared as shown below.
[0143] Table 3 Comparative experiments of YOLOv8-Miner and other algorithms
[0144]
[0145] YOLOv8-Miner performs best in terms of accuracy, significantly better than other YOLO versions, especially in terms of accuracy of ore identification. Although the FPS has dropped slightly, it still remains at a high level and is suitable for application scenarios with high real-time requirements. Overall, YOLOv8-Miner has the strongest comprehensive performance and is suitable for ore automatic identification tasks.
[0146] Among them, the significant improvement of mAP and F1 is mainly due to:
[0147] (1) Image data enhancement: This makes the targets in the XRT image clearer and improves the model’s ability to distinguish targets.
[0148] (2) Inner-SIoU loss: makes the predicted box closer to the true target box, improving the positioning accuracy.
[0149] (3) Scale-weighted enhanced attention mechanism: enables the model to pay more attention to the key feature areas of the ore, ignore background noise, and improve the classification accuracy.
[0150] (4) Automatic hyperparameter optimization: This helps the overall training process find the optimal parameter combination and improve model performance.
[0151] (5) Lightweight convolution: Mainly optimizes FPS, reduces the amount of calculation, and improves inference speed. It contributes less to mAP and F1.
[0152] Algorithm visualization results
[0153] This study developed a visualization software based on the YOLOv8-Miner ore identification algorithm. The software has an intuitive and easy-to-use user interface, which can provide a convenient visualization operation platform for ore identification in static images and dynamic videos. Specifically, the software enables users to easily view and analyze the identification results by realizing real-time processing and visualization of images and videos, providing efficient support for the application of ore beneficiation systems. The visualization software interface is as follows Fig.10 shown.
[0154] (1) Interface design and operation functions: By creating a user-friendly interface, the software can automatically load input images and videos and call the YOLOv8-Miner ore recognition algorithm for processing. The processed images and videos will be displayed in real time in the interface, making it easy for users to view the classification and recognition results of ore and waste rock, helping to optimize the recognition algorithm and data.
[0155] (2) Modular architecture and data processing: The software uses the PySide framework for graphical interface development and the OpenCV library for image processing and loading to ensure smooth operation and efficient image processing. At the same time, the YOLOv8-Miner ore recognition algorithm is executed using the PyTorch framework, and the image recognition results are displayed in combination with the Matplotlib library. This architecture effectively combines ore recognition with real-time data display, providing users with more intuitive and accurate feedback.
[0156] (3) Historical data storage and analysis: The software supports the storage of historical identification data for subsequent review, analysis and optimization. During the identification process, users can selectively store the identification results for further performance evaluation and trend analysis. In addition, the software supports the selection of different identification model weight files according to user needs to cope with a variety of ore identification scenarios, ensuring the flexibility and scalability of the model.
[0157] (4) Customizability and scalability: The visualization software is also highly customizable. Users can adjust image processing parameters, optimize algorithm settings, and select the most suitable recognition model based on on-site working conditions according to specific needs. In this way, the software can meet the needs of various ore types and their characteristic differences, greatly improving the accuracy and efficiency of ore identification.
[0158] In summary, this visualization software can not only help users achieve efficient ore identification in the real-time ore beneficiation process, but also has storage, review and analysis functions, providing strong support for the continuous optimization and application of ore identification technology.
[0159] In the test set of the data set, three grayscale images of raw ore are randomly selected and processed using the YOLOv8-Miner ore recognition algorithm. The recognition results are as follows: Fig.11 This figure shows the significant features and advantages of visualization software in performing ore identification, as follows:
[0160] (1) Clear target annotation: In each test image, the YOLOv8-Miner algorithm successfully added a rectangular box annotation to each ore target and accurately classified the ore and waste rock. The classification label and corresponding confidence score are displayed above each rectangular box, ensuring that users can quickly identify each target category and the credibility of its classification. This annotation method greatly facilitates users to understand and analyze the targets in the image.
[0161] (2) Multi-target recognition capability: The YOLOv8-Miner algorithm has a powerful multi-target recognition capability and can simultaneously identify multiple ore and waste rock targets in the same image or video frame. Whether it is an ore-dense area or an image with a complex background, the algorithm can accurately identify and distinguish multiple targets, meeting the needs of efficient multi-target processing tasks in industrial applications.
[0162] (3) Confidence score: A confidence score is displayed on the rectangular box of each identified target, reflecting the reliability of the target classification result. The confidence score provides an important basis for subsequent screening, data analysis and model optimization, helping users to judge the stability and accuracy of the algorithm during the recognition process. Through the display of confidence, users can more effectively determine which recognition results need further verification or optimization.
[0163] (4) Contrasting color design: To further enhance the intuitiveness and readability of image recognition results, the ore and waste rock targets in the image are marked with blue and cyan rectangular frames, respectively. This color distinction not only makes the two types of targets clearly visible in the image, but also helps users quickly understand the classification results through visual contrast, especially in complex ore images, effectively avoiding confusion between different targets.
[0164] Through these characteristics and advantages, the YOLOv8-Miner ore identification algorithm provides a high-precision and high-efficiency ore identification solution. Its visual output makes the operation process more intuitive and easy to understand, while greatly improving the accuracy and reliability of the ore sorting process. The algorithm is not only suitable for processing a single image, but also can efficiently handle multi-target recognition tasks in video streams, showing its wide application potential in the ore beneficiation industry.
[0165] Advantages of this study
[0166] Based on the YOLOv8-Miner optimization algorithm, this study proposes an efficient and accurate ore identification method for the problem of XRT grayscale image recognition of scheelite. Through the innovative optimization of the YOLOv8 model, the algorithm has the following advantages:
[0167] (1) High-precision recognition: By applying multiple technologies such as image data enhancement (CLAHE), a new loss function (Inner-SIoU), an attention mechanism (SEAM), automatic hyperparameter optimization (Optuma), and lightweight convolution (GSConv), YOLOv8-Miner has achieved significant performance improvement in the classification of scheelite ore and waste rock, with the mAP value increased to 0.969 and the F1 value reaching 0.87, demonstrating its high precision in automatic ore recognition.
[0168] (2) Fast reasoning and high efficiency: The optimized YOLOv8-Miner model not only improves accuracy, but also performs well in reasoning speed. The reasoning time for a single image is only 2.78 milliseconds, and the number of image frames per second reaches 12.86, meeting the dual requirements of real-time performance and computing efficiency in the ore beneficiation process.
[0169] (3) Adaptability to complex ore images: The algorithm can effectively process complex grayscale images of scheelite, especially when the physical properties of ore and waste rock are similar, the grayscale difference is small, and the contrast is not obvious. It can still accurately distinguish between ore and waste rock, thus having high practical value in actual industrial applications.
[0170] (4) Optimized algorithm structure: By introducing a new loss function (Inner-SIoU) and an optimized network structure (GSConv, SEAM), the YOLOv8-Miner algorithm significantly reduces the amount of computation and model complexity, making the model not only more accurate, but also able to run efficiently in resource-limited environments.
[0171] (5) Flexible hyperparameter optimization: The Optuna automated hyperparameter optimization framework can dynamically adjust hyperparameters according to different training tasks, thereby further improving model performance, optimizing the model training process, and enhancing the adaptability and stability of the algorithm in various scenarios.
[0172] (6) Support for industrial applications: The algorithm integrates visualization software to intuitively display the optimized recognition results and provide classification labels and confidence information, which facilitates users to quickly understand and subsequently analyze the ore identification results. It has broad industrial application potential.
[0173] In summary, the YOLOv8-Miner algorithm has high precision, high speed and high efficiency in the task of identifying scheelite ore. It not only optimizes the shortcomings of traditional ore identification methods, but also provides a technical solution with practical application value for the development of intelligent ore dressing machines.
[0174] The present application also provides a raw ore classification device, the device comprising:
[0175] An acquisition unit, used to obtain the pre-processed raw ore image to be processed; and
[0176] A classification unit is used to process the raw ore image to be processed by using the trained raw ore classification model to obtain classification results of ore and waste rock, wherein the raw ore classification model adopts a YOLOv8 model with an overlap IoU loss function defined, and the overlap IoU loss function is used to measure the degree of matching between the prediction box and the target box in position and scale.
[0177] An embodiment of the present application also provides an electronic device, comprising: a processor, and a memory coupled to the processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, so that the electronic device executes a method as described in any one of the above embodiments.
[0178] The electronic device may be a computing device such as a desktop computer, a notebook, a palmtop computer, a cloud server, etc. The electronic device may include, but is not limited to, a processor and a memory.
[0179] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and various interfaces and lines are used to connect various parts of the entire device.
[0180] The memory may be used to store the computer program, and the processor implements various functions of the electronic device by running or executing the computer program stored in the memory and calling the data stored in the memory.
[0181] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the mobile phone, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0182] The embodiment of the present application also provides a storage medium, the storage medium is a computer-readable storage medium, the computer program is stored in the computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of each of the above-mentioned method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0183] An embodiment of the present application further provides a computer program product, including: a computer program or instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned possible implementation methods.
[0184] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.
Claims
1. A method for classifying raw ore, characterized in that: The method comprises: Obtaining the pre-processed raw ore image to be processed; and, The trained raw ore classification model is used to process the raw ore image to obtain the classification results of ore and waste rock, wherein the raw ore classification model adopts the YOLOv8 model with an overlap IoU loss function defined, and the overlap IoU loss function is used to measure the matching degree of position and scale between the prediction box and the target box.
2. The method according to claim 1, characterized in that The overlap IoU loss function is provided with: a standard SIoU loss for measuring the overlap between the target box and the prediction box, an inner layer IoU loss for measuring the overlap between the target box and the inner layer box, and a scale adjustment loss for measuring the scale difference.
3. The method according to claim 1, characterized in that The overlap IoU loss function is expressed by the inner layer IoU loss and the scale adjustment coefficient.
4. The method according to claim 1, characterized in that The YOLOv8 model adds channel attention mechanism and spatial attention mechanism.
5. The method according to claim 1, characterized in that The pre-processing comprises: Normalizing the pixel values of the original ore image to obtain a first image, wherein the pixel value range of the first image is between 0 and 255; and The areas in the first image whose pixel values are lower than a preset threshold are replaced with white to highlight the ore features.
6. The method according to claim 5, characterized in that The preprocessing also includes: contrast limited adaptive histogram equalization.
7. The method according to claim 1, characterized in that The method also includes: using the Optuma automated hyperparameter optimization framework to find the optimal hyperparameters for the YOLOv8 training process.
8. The method according to claim 1, characterized in that The raw ore classification model adopts lightweight grouped deep separable convolution.
9. A raw ore classification device, characterized in that: The device comprises: An acquisition unit, used to obtain the pre-processed raw ore image to be processed; and A classification unit is used to process the raw ore image to be processed by using the trained raw ore classification model to obtain classification results of ore and waste rock, wherein the raw ore classification model adopts a YOLOv8 model with an overlap IoU loss function defined, and the overlap IoU loss function is used to measure the degree of matching between the prediction box and the target box in position and scale.
10. An electronic device, characterized in that: The electronic device comprises: a processor, and a memory coupled to the processor, The memory is used to store a computer program; and The processor is configured to execute the computer program stored in the memory so that the electronic device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
High body seriola quinqueradiata detection method based on YOLOv8 network structure
CN118279935A
Coal gangue multi-scale detection method and system based on YOLOv8 network
CN119295953A
Target detection method in mining belt conveying system
CN119339322A
Lithium mineral component detection method based on improved YOLOv8
CN119495372A
Method for detecting infrared ship target based on improved yolov7
US20250078541A1
Cited By
Preselected waste throwing raw ore waste throwing rate calculation method based on YOLO series algorithm
CN121258975A
Ore XRT image instance segmentation optimization method and system based on YOLOv11-seg
CN121527434A