Method for graphite ore grade detection based on improved Faster-RCNN

Through the improved Faster-RCNN model, combined with Resent50 network and feature fusion technology, the problems of high time cost and poor real-time performance in graphite ore grade detection are solved, and the detection effect is achieved with high accuracy and high efficiency.

CN115393654BActive Publication Date: 2024-11-19JIANGXI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211190164.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2024-11-19
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

The existing graphite ore grade detection methods have high time cost and poor real-time performance. Traditional methods require grinding and chemical reagent detection, and are inefficient.

Method used

Using the improved Faster-RCNN model, the Resent50 network was constructed and the RGA module was added to combine multi-scale feature fusion and color feature fusion to train the model to identify the carbon content classification of graphite ore.

Benefits of technology

High-accuracy graphite ore grade detection is achieved, and the accuracy of the test set reaches 92.0%, reducing time costs, improving detection efficiency, and improving the accuracy and real-timeness of traditional detection methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393654B_ABST
    Figure CN115393654B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting the grade of graphite ore based on improved Faster-RCNN. The method for detecting the grade of graphite ore based on improved Faster-RCNN includes the following steps: picture collection, rectangular frame annotation, picture classification, data set division, image enhancement, construction of improved Faster-RCNN model, training of improved Faster-RCNN model and picture recognition. The present invention adopts the improved Faster-RCNN model to detect the grade of graphite ore, and the accuracy of the final test set can reach 92.0%, which can greatly help the identification of graphite grade and change its traditional chemical identification method. Only by inputting the picture of graphite ore, the classification result of graphite ore grade can be obtained, without spending a lot of time cost, and the detection efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning, and more specifically, to a method for graphite ore grade detection based on improved Faster-RCNN. Background Art

[0002] In recent years, graphite mining, ore dressing and ore matching must first test the carbon content. According to industrial requirements, two or more suitable graphite ores with different contents need to be mixed. At present, the most commonly used method in industry is to grind and then use chemical reagents or laser methods for detection. This will increase the work process and time cost to a certain extent, and the real-time performance is not very good.

[0003] Machine learning is currently a hot field in the detection field because it can greatly reduce labor costs and has high detection efficiency. The Faster-RCNN algorithm is a common machine learning algorithm used for detection. Improving the Faster-RCNN algorithm and using it for graphite ore grade detection is a way to solve the shortcomings of high time cost and poor real-time performance in existing graphite ore grade detection. Summary of the invention

[0004] In order to overcome the shortcomings of high time cost and poor real-time performance in the existing graphite ore grade detection, the present invention provides a method for graphite ore grade detection based on improved Faster-RCNN.

[0005] In order to solve the above technical problems, the following technical solution is adopted, which is a method for graphite ore grade detection based on improved Faster-RCNN, including the following steps:

[0006] S1: Image Collection

[0007] Collect pictures of graphite mines to form a data set;

[0008] S2: Image Enhancement

[0009] Preprocess the graphite mine images in the dataset to increase the number of images in the dataset;

[0010] S3: Rectangular box annotation

[0011] The graphite ore inside all graphite ore images in the data set is labeled with the image annotation tool Labelme for the cut graphite, and the coordinates of the corresponding rectangular box of the corresponding graphite ore are recorded;

[0012] S4: Image Classification

[0013] Determine the fixed carbon content of the graphite ore corresponding to each graphite ore picture, and classify the graphite ore according to the fixed carbon content, including 0-5% fixed carbon content, 5%-10% fixed carbon content, 10%-15% fixed carbon content and 15%-20% fixed carbon content;

[0014] S5: Dataset Partitioning

[0015] The data set is divided into 6:2:2 parts according to the ratio of training set: validation set: test set.

[0016] S6: Building an improved Faster-RCNN model

[0017] The Resent50 network is used as the original classification network. The Resent50 network includes 1 preprocessing layer, 4 blocks, 1 average pooling layer, 1 fully connected layer and 1 softmax layer. The average pooling layer, 1 fully connected layer and 1 softmax layer are removed from the Resent50 network. An RGA module is added after each block to obtain a feature extraction layer, which is then embedded in an RPN layer, a ROI layer and a Classification layer. The Classification layer includes 1 fully connected layer and 1 softmax layer to obtain an improved Faster-RCNN model.

[0018] S7: Training and improving the Faster-RCNN model

[0019] Input the graphite ore images and the corresponding rectangular frame coordinates in the training set into the improved Faster-RCNN model, train the improved Faster-RCNN model through the alternating optimization algorithm, obtain the trained improved Faster-RCNN model, and test the trained improved Faster-RCNN model through the test set;

[0020] S8: Image recognition

[0021] The graphite mine image to be identified is input into the trained improved Faster-RCNN model, and the type and location of the graphite mine are output.

[0022] Specifically, the image enhancement methods include line flipping, contrast enhancement, mosaic, scaling, and mirroring.

[0023] Specifically, the improved Faster-RCNN model in S8 recognizes the input image in the following steps:

[0024] S8.1: The input image passes through the preprocessing layer, which performs two preprocessing operations on the input image. The first preprocessing performs Conv, FRN and Relu operations on the input image, where the Conv operation uses 64 7×7 convolution kernels to perform convolution operations on the input image; the second preprocessing performs Maxpool operation on the input image, and the kernel of the Maxpool operation is 3×3;

[0025] S8.2: Input the feature map obtained in step S8.1 into 4 blocks for processing. The output of each block will be processed by the RGA module as the input of the next block to obtain the image feature map F1;

[0026] S8.3: Input the image feature map F1 into the RPN layer to obtain the candidate box information;

[0027] S8.4: Map the candidate box information to the image feature map F1 to obtain the candidate region, and then perform a maximum pooling operation through the ROI layer to obtain a feature map F2 of a specified size;

[0028] S8.5: Send the feature map F2 to the Classification layer to output the type and location of the graphite mine.

[0029] Specifically, the Block includes two categories, namely Conv-Block and Identity-Block. Conv-Block consists of three operations. The first operation processes the input through two "Conv+FRN+Relu" and then through one "Conv+FRN". The second operation processes the input through "Conv+FRN" at the same time. The third operation adds the outputs obtained from the above two operations and normalizes the added output through one Relu operation. Identity-Block consists of two operations. The first operation processes the input through two "Conv+FRN+Relu" and then through one "Conv+FRN". The second operation adds the input entering the first operation and the output obtained from the first operation, and then normalizes the added output through one Relu operation.

[0030] Specifically, the four blocks are respectively recorded as Block1, Block2, Block3 and Block4, Block1 consists of 1 Conv-Block and 2 Identity-Blocks, Block2 consists of 1 Conv-Block and 3 Identity-Blocks, Block3 consists of 1 Conv-Block and 5 Identity-Blocks, and Block4 consists of 1 Conv-Block and 2 Identity-Blocks.

[0031] Specifically, the training of the improved Faster-RCNN model in step S7 specifically includes the following steps:

[0032] S7.1: Input the graphite ore images and corresponding rectangular frame coordinates in the training set into the RPN layer, train the weights in the RPN layer, and obtain candidate frame information;

[0033] S7.2: Remove the RPN layer from the improved Faster-RCNN model to obtain the Fast-RCNN model, and train the Fast-RCNN model using the candidate box information obtained in step S7.1 and the graphite mine images in the training set;

[0034] S7.3: The Fast-RCNN model obtained in step S7.2 is embedded into the RPN layer again, the RPN layer is initialized, the parameters of the feature extraction layer are controlled to remain unchanged, and the RPN layer is trained with the graphite ore images and the corresponding rectangular box coordinates in the training set to obtain the candidate box information;

[0035] S7.4: Keep the parameters of the feature extraction layer unchanged, use the candidate box information obtained in step S7.3 and the graphite mine pictures in the training set to train the parameters of the ROI layer and the Classification layer, and obtain the trained improved Faster-RCNN model;

[0036] S7.5: Test the trained improved Faster-RCNN model using the test set.

[0037] Specifically, the feature extraction layer uses multi-scale feature fusion, and the operation of the multi-scale feature fusion includes the following steps:

[0038] T1: Upsample the feature map F3 output after processing by Block4 and RGA module once, and then add it to the feature map F4 output after processing by Block3 and RGA module to obtain feature map F5;

[0039] T2: Upsample the feature map F5 once, and then add it to the feature map F6 output after processing by Block2 and RGA module to obtain the feature map F7;

[0040] T3: The feature map F7 is upsampled once, and then added to the feature map F8 output after processing by Block1 and RGA module to obtain the feature map F9. The feature map F9 is the feature map output by the feature extraction layer after multi-scale feature fusion.

[0041] Specifically, the improved Faster-RCNN model adds color feature fusion, and the operation of color feature fusion includes the following steps:

[0042] A1: Process the graphite ore image in grayscale to form a single-channel graphite ore image;

[0043] A2: Number all the pixels of the graphite mine image as 1, 2, 3...N, where N is the total number of pixels in the graphite mine image;

[0044] A3: Let k = 0, x m =0, where m=1, 2, 3, ..., 256;

[0045] A4: Let n=1, where n represents the number corresponding to the pixel point;

[0046] A5: Determine “G n =k” holds true, where G n is the gray value of the pixel corresponding to number n, if "G n =k” is not true, go to A6; if “G n =k" holds, let x m =x m +1, enter A6;

[0047] A6: Determine whether "n≤N" holds. If so, set n=n+1 and return to A5. If not, proceed to A7.

[0048] A7: Determine whether "k≤255" is true. If so, set k=k+1 and proceed to A4. If not, proceed to A8.

[0049] A8: Replace x1, x2, x3... 256 The 1×256 color feature vector is concatenated with the fully connected layer of the Classification layer in the improved Faster-RCNN model.

[0050] The present invention has the following advantages:

[0051] 1. The present invention adopts the improved Faster-RCNN model to detect the grade of graphite ore. The accuracy of the final test set can reach 92.0%, which can greatly help the identification of graphite grade and change its traditional chemical identification method. Only by inputting the picture of graphite ore, the classification result of graphite ore grade can be obtained, without spending a lot of time cost, and the detection efficiency is high.

[0052] 2. The improved Faster-RCNN model in the present invention adopts the Resent50 network as the original classification network. The Resent50 network adopts more convolutional layers to increase the depth of feature extraction. In addition, the existence of residual blocks avoids the algorithm degradation problem caused by excessive feature extraction depth.

[0053] 3. The present invention adopts an RGA module in the feature extraction layer. The RGA module adopts a global correlation attention mechanism, retains the interaction of global spatial channels, and performs in-depth feature extraction on areas of interest from both spatial and channel aspects, thereby improving the accuracy of the algorithm.

[0054] 4. This embodiment adds a feature pyramid network (FPN) to the feature extraction layer, and finally integrates high-level and low-level features in the feature map, which brings a more ideal effect on the detailed texture and small target recognition of the graphite mine image and improves the accuracy of the algorithm.

[0055] 5. The present invention improves the accuracy of graphite ore grade detection by fusion of color features and embedding the improved Faster-RCNN model to increase the weight of color features.

[0056] 6. By introducing the FRN layer, the present invention performs better than the BN layer for small batch training such as graphite ore detection, and can further improve the accuracy of graphite ore grade detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 The figure is a flow chart of the method for graphite ore grade detection based on the improved Faster-RCNN of the present invention.

[0058] Figure 2 It is a schematic diagram of the structure of the pretreatment layer of the present invention.

[0059] Figure 3 This is a schematic diagram of the structure of the improved Faster-RCNN model of the present invention.

[0060] Figure 4 It is a schematic diagram of the structure of Conv-Block of the present invention.

[0061] Figure 5 It is a schematic diagram of the structure of Identity-Block of the present invention.

[0062] Figure 6 Schematic diagram of the structure of the improved Faster-RCNN model for multi-scale feature fusion of the present invention.

[0063] Figure 7 Schematic diagram of the process of color feature fusion operation of the present invention.

[0064] Figure 8 Samples of graphite ore were collected for the present invention.

[0065] Fig. 9 It is a schematic diagram of predictions of different models in the comparative examples of the present invention.

[0066] Fig.10 It is a schematic diagram of the results of graphite ore picture prediction in the present invention. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0068] Example 1

[0069] In order to solve the above technical problems, the following technical solutions are adopted, namely, a method for graphite ore grade detection based on improved Faster-RCNN: Figure 1 As shown, the following steps are included:

[0070] S1: Image Collection

[0071] By collecting flotation graphite ore from graphite mines, taking and collecting a large number of graphite ore pictures, sample pictures such as Figure 8 As shown, a data set is formed;

[0072] S2: Image Enhancement

[0073] The graphite mine images in the training set and the test set were preprocessed, and the image enhancement methods included row flipping, contrast enhancement, mosaic, scaling, mirroring, and segmentation; the number of images in the training set and the test set was expanded to obtain a total of 1,300 images. The enhanced data set enables the improved algorithm to recognize more detailed features to increase its generalization ability;

[0074] S3: Rectangular box annotation

[0075] The graphite inside all graphite mine images in the data set is located by using the image annotation tool Labelme for the cut graphite, and the coordinates of the corresponding rectangular box of the graphite mine are recorded for subsequent training of candidate boxes;

[0076] S4: Image Classification

[0077] The fixed carbon content of the graphite ore corresponding to each graphite ore picture is determined by high-frequency infrared absorption method, and the graphite ore is classified according to the fixed carbon content. The carbon content of the graphite ore generally does not exceed 20%, so the types include 0-5% fixed carbon content, 5%-10% fixed carbon content, 10%-15% fixed carbon content and 15%-20% fixed carbon content;

[0078] S5: Dataset Partitioning

[0079] The dataset was divided into 6:2:2 parts: training set: validation set: test set for subsequent training to improve the Faster-RCNN model.

[0080] S6: Building an improved Faster-RCNN model

[0081] like Figure 3 As shown in the figure, the improved Faster-RCNN model uses the Resent50 network as the original classification network. The Resent50 network uses more convolutional layers to increase the depth of feature extraction, and the existence of residual blocks avoids the algorithm degradation problem caused by excessive feature extraction depth. The Resent50 network includes 1 preprocessing layer, 4 Blocks, 1 average pooling layer, 1 fully connected layer and 1 softmax layer. The Resent50 network removes the 1 average pooling layer, 1 fully connected layer and 1 softmax layer at the back, and adds an RGA module after each Block to obtain the feature extraction layer. The RGA module uses a global correlation attention mechanism to retain the interaction of global spatial channels and improve the accuracy of the algorithm. Then the RPN layer, ROI layer and Classification layer are embedded. The RPN layer is used to generate candidate box information where the target exists. The Classification layer includes 1 fully connected layer and 1 softmax layer to obtain the improved Faster-RCNN model.

[0082] Specifically, the Block includes two categories, namely Conv-Block and Identity-Block. Figure 4As shown in the figure, Conv-Block consists of three operations. The first operation processes the input through two "Conv+FRN+Relu", where Conv represents convolution calculation, FRN represents filter response normalization, including FRN and TLU. For small batch training, its performance is better than BN layer. Relu represents the activation function, which is used to make nonlinear changes to the data and increase the robustness of the algorithm. Then it is processed through one "Conv+FRN". The second operation processes the input through "Conv+FRN" at the same time. The third operation adds the outputs of the above two operations, and then normalizes the output after addition through one Relu operation; as shown in the figure, Figure 5 As shown in the figure, Identity-Block consists of two operations. The first operation processes the input through two "Conv+FRN+Relu" and then through one "Conv+FRN". The second operation adds the input entering the first operation and the output obtained by the first operation, and then normalizes the output after addition through one Relu operation.

[0083] Specifically, the four blocks are respectively recorded as Block1, Block2, Block3 and Block4, Block1 consists of 1 Conv-Block and 2 Identity-Blocks, Block2 consists of 1 Conv-Block and 3 Identity-Blocks, Block3 consists of 1 Conv-Block and 5 Identity-Blocks, Block4 consists of 1 Conv-Block and 2 Identity-Blocks, and the first Identity-Block in each Block performs a downsampling operation on the input feature map.

[0084] S7: Training and improving the Faster-RCNN model

[0085] Input the graphite ore images and the corresponding rectangular frame coordinates in the training set into the improved Faster-RCNN model, train the improved Faster-RCNN model through the alternating optimization algorithm, obtain the trained improved Faster-RCNN model, and test the trained improved Faster-RCNN model through the test set;

[0086] Specifically, the training of the improved Faster-RCNN model in S7 specifically includes the following steps:

[0087] S7.1: Input the graphite ore images and corresponding rectangular frame coordinates in the training set into the RPN layer, train the weights in the RPN layer, and obtain candidate frame information;

[0088] S7.2: Remove the RPN layer from the improved Faster-RCNN model to obtain the Fast-RCNN model, and train the Fast-RCNN model using the candidate box information obtained in step S7.1 and the graphite mine images in the training set;

[0089] S7.3: The Fast-RCNN model obtained in step S7.2 is embedded into the RPN layer again, and the RPN layer is initialized. At this time, the Fast-RCNN model and the RPN layer share a feature extraction layer, and the parameters of the feature extraction layer are controlled to remain unchanged. The graphite ore images in the training set and the corresponding rectangular box coordinates are used to train the RPN layer to obtain the candidate box information;

[0090] S7.4: Keep the parameters of the feature extraction layer unchanged, and use the candidate box information obtained in step S7.3 and the graphite mine pictures in the training set to train the parameters of the ROI layer and the Classification layer. At this time, the parameters of the ROI layer and the Classification layer are fine-tuned to obtain the trained improved Faster-RCNN model;

[0091] S7.5: The trained improved Faster-RCNN model is tested on the test set, and the final accuracy of the test set can reach 92.0%, which can greatly help the identification of graphite taste and change its traditional chemical identification method.

[0092] S8: Image recognition

[0093] The graphite mine images to be identified are input into the trained improved Faster-RCNN model, and the type and location of the graphite mine are output. The prediction results of some graphite mine images are as follows: Fig.10 As shown;

[0094] Specifically, the improved Faster-RCNN model in S8 recognizes the input image in the following steps:

[0095] S8.1: If Figure 2 As shown in the figure, the input image passes through the preprocessing layer, and the preprocessing layer preprocesses the input image twice. The first preprocessing performs Conv, FRN and Relu operations on the input image, where the Conv operation uses 64 7×7 convolution kernels to perform convolution operations on the input image; the second preprocessing performs Maxpool operation on the input image, and the Kernel of the Maxpool operation is 3×3;

[0096] S8.2: Input the feature map obtained in step S8.1 into 4 blocks for processing. The output of each block will be processed by the RGA module as the input of the next block to obtain the image feature map F1;

[0097] S8.3: Input the image feature map F1 into the RPN layer to obtain the candidate box information;

[0098] S8.4: Map the candidate box information to the image feature map F1 to obtain the candidate region, and then perform a maximum pooling operation through the ROI layer to obtain a feature map F2 of a specified size;

[0099] S8.5: Send the feature map F2 to the Classification layer to output the type and location of the graphite mine.

[0100] Example 2

[0101] like Figure 6 As shown, the feature extraction layer uses multi-scale feature fusion, and the operation of multi-scale feature fusion includes the following steps:

[0102] T1: Perform a 1×1 convolution operation on the feature map F3 output after being processed by the Block4 and RGA modules, and then perform an upsampling operation to obtain a feature map F31. Perform a 1×1 convolution operation on the feature map F4 output after being processed by the Block3 and RGA modules to obtain a feature map F41. Add the feature maps F31 and F41 to obtain a feature map F5.

[0103] T2: Upsample the feature map F5 once to obtain the feature map F51, then perform a 1×1 convolution operation on the feature map F6 output after processing by the Block2 and RGA modules to obtain the feature map F61, and add the feature map F51 and the feature map F61 to obtain the feature map F7;

[0104] T3: Upsample the feature map F7 once to obtain the feature map F71, perform a 1×1 convolution operation on the feature map F8 output after processing by the Block1 and RGA modules, and obtain the feature map F81. Add the feature map F71 and the feature map F81 to obtain the feature map F9. The feature map F9 is the feature map output by the feature extraction layer after multi-scale feature fusion.

[0105] Image features are continuously extracted under deep convolutional neural networks. After layers of convolution, the image will gradually lose some detail information, which will cause the model to predict small objects and details inaccurately. This embodiment adds a feature pyramid network (FPN) to the feature extraction layer, and finally integrates high-level and low-level features in the feature map, which brings a more ideal effect on the recognition of detailed textures and small targets of graphite mine images; 1×1 convolution operation is performed on the four feature extraction convolution blocks of the ResNet50 network, so that the number of channels of each convolution layer can be the same to facilitate subsequent operations.

[0106] Example 3

[0107] like Figure 7 As shown, the improved Faster-RCNN model adds color feature fusion, and the operation of color feature fusion includes the following steps:

[0108] A1: Process the graphite ore image in grayscale to form a single-channel graphite ore image;

[0109] A2: Number all the pixels of the graphite mine image as 1, 2, 3...N, where N is the total number of pixels in the graphite mine image;

[0110] A3: Let k = 0, x m =0, where m=1, 2, 3, ..., 256;

[0111] A4: Let n=1, where n represents the number corresponding to the pixel point;

[0112] A5: Determine “G n =k” holds true, where G n is the gray value of the pixel corresponding to number n, if "G n =k” is not true, go to A6; if “G n =k" holds true, let x m =x m +1, enter A6;

[0113] A6: Determine whether "n≤N" holds. If so, set n=n+1 and return to A5. If not, proceed to A7.

[0114] A7: Determine whether "k≤255" is true. If so, set k=k+1 and proceed to A4. If not, proceed to A8.

[0115] A8: Replace x1, x2, x3... 256 The 1×256 color feature vector is concatenated with the fully connected layer of the Classification layer in the improved Faster-RCNN model.

[0116] Since the fixed carbon content in graphite ore is closely related to its apparent color, this embodiment increases the weight of color features by embedding color feature fusion into the improved Faster-RCNN model, thereby improving the accuracy of graphite ore grade detection.

[0117] Comparative Example 1

[0118] The trained FasterR-CNN model (the feature extraction network is replaced by resnet50), FasterRCNN+FPN model, Faster R-CNN+RGA model, Faster R-CNN+RGA+FPN model and the algorithm of the present invention are used to detect the same batch of graphite ore pictures, and the average accuracy (AP), mean average precision (mAP) and recall (Recall) of different types are calculated respectively. Fig. 9 As shown, it is shown that the algorithm of the present invention has a good improvement effect.

[0119] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention. Parts not described in detail in this specification belong to the prior art known to those skilled in the art.

Claims

1. Method for graphite ore grade detection based on improved Faster-RCNN, It is characterized in that The method comprises the following steps: S1: Image Collection Collect pictures of graphite mines to form a data set; S2: Image Enhancement Preprocess the graphite mine images in the dataset to increase the number of images in the dataset; S3: Rectangular box annotation The graphite ore inside all graphite ore images in the data set is labeled with the image annotation tool Labelme for the cut graphite, and the coordinates of the corresponding rectangular box of the corresponding graphite ore are recorded; S4: Image Classification Determine the fixed carbon content of the graphite ore corresponding to each graphite ore picture, and classify the graphite ore according to the fixed carbon content, including 0-5% fixed carbon content, 5%-10% fixed carbon content, 10%-15% fixed carbon content and 15%-20% fixed carbon content; S5: Dataset Partitioning The data set is divided into 6:2:2 parts according to the ratio of training set: validation set: test set. S6: Building an improved Faster-RCNN model The Resent50 network is used as the original classification network. The Resent50 network includes 1 preprocessing layer, 4 blocks, 1 average pooling layer, 1 fully connected layer and 1 softmax layer. The Resent50 network is removed with 1 average pooling layer, 1 fully connected layer and 1 softmax layer, add an RGA module after each Block to obtain a feature extraction layer, and then embed the RPN layer, ROI layer and Classification layer. The Classification layer includes 1 fully connected layer and 1 softmax layer to obtain an improved Faster-RCNN model; S7: Training and improving the Faster-RCNN model Input the graphite ore images and the corresponding rectangular frame coordinates in the training set into the improved Faster-RCNN model, train the improved Faster-RCNN model through the alternating optimization algorithm, obtain the trained improved Faster-RCNN model, and test the trained improved Faster-RCNN model through the test set; S8: Image recognition Input the graphite mine image to be identified into the trained improved Faster-RCNN model, and output the type and location of the graphite mine; The data preprocessing includes flipping, increasing contrast, mosaic, scaling, mirroring and segmentation; The improved Faster-RCNN model in S8 specifically includes the following steps for recognizing the input image: S8.1: The input image passes through the preprocessing layer, which performs two preprocessing operations on the input image. The first preprocessing performs Conv, FRN and Relu operations on the input image, where the Conv operation uses 64 7×7 convolution kernels to perform convolution operations on the input image; the second preprocessing performs Maxpool operation on the input image, and the kernel of the Maxpool operation is 3×3; S8.2: Input the feature map obtained in step S8.1 into 4 blocks for processing. The output of each block will be processed by the RGA module as the input of the next block to obtain the image feature map F1; S8.3: Input the image feature map F1 into the RPN layer to obtain the candidate box information; S8.4: Map the candidate box information to the image feature map F1 to obtain the candidate region, and then perform the maximum pooling operation through the ROI layer to obtain the feature map F2 of a specified size; S8.5: Send the feature map F2 to the Classification layer to output the type and location of the graphite mine; The Block includes two categories, namely Conv-Block and Identity-Block. Conv-Block consists of three operations. The first operation processes the input through two "Conv+FRN+Relu" and then through one "Conv+FRN". The second operation processes the input through "Conv+FRN" at the same time. The third operation adds the outputs obtained from the above two operations and then normalizes the added output through a Relu operation. Identity-Block consists of two operations. The first operation processes the input through two "Conv+FRN+Relu" and then through one "Conv+FRN". The second operation adds the input entering the first operation and the output obtained from the first operation and then normalizes the added output through a Relu operation. The four blocks are respectively denoted as Block1, Block2, Block3 and Block4, Block1 consists of 1 Conv-Block and 2 Identity-Blocks, Block2 consists of 1 Conv-Block and 3 Identity-Blocks, Block3 consists of 1 Conv-Block and 5 Identity-Blocks, and Block4 consists of 1 Conv-Block and 2 Identity-Blocks; The training of the improved Faster-RCNN model in S7 specifically includes the following steps: S7.1: Input the graphite ore images and corresponding rectangular frame coordinates in the training set into the RPN layer, train the weights in the RPN layer, and obtain candidate frame information; S7.2: Remove the RPN layer from the improved Faster-RCNN model to obtain the Fast-RCNN model, and train the Fast-RCNN model using the candidate box information obtained in step S7.1 and the graphite mine images in the training set; S7.3: The Fast-RCNN model obtained in step S7.2 is embedded into the RPN layer again, the RPN layer is initialized, the parameters of the feature extraction layer are controlled to remain unchanged, and the RPN layer is trained with the graphite ore images and the corresponding rectangular box coordinates in the training set to obtain the candidate box information; S7.4: Keep the parameters of the feature extraction layer unchanged, use the candidate box information obtained in step S7.3 and the graphite mine pictures in the training set to train the parameters of the ROI layer and the Classification layer, and obtain the trained improved Faster-RCNN model; S7.5: Testing the trained improved Faster-RCNN model using a test set; the feature extraction layer uses multi-scale feature fusion, and the multi-scale feature fusion operation includes the following steps: T1: Upsample the feature map F3 output after processing by Block4 and RGA module once, and then add it to the feature map F4 output after processing by Block3 and RGA module to obtain feature map F5; T2: Upsample the feature map F5 once, and then add it to the feature map F6 output after processing by Block2 and RGA module to obtain the feature map F7; T3: Upsample the feature map F7 once, and then add it to the feature map F8 output after processing by Block1 and RGA module to obtain the feature map F9. The feature map F9 is the feature map output by the feature extraction layer after multi-scale feature fusion; The improved Faster-RCNN model adds color feature fusion, and the operation of color feature fusion includes the following steps: A1: Process the graphite ore image in grayscale to form a single-channel graphite ore image; A2: Number all the pixels of the graphite mine image as 1, 2, 3...N, where N is the total number of pixels in the graphite mine image; A3: Let k = 0, x m =0, where m=1, 2, 3, ..., 256; A4: Let n=1, where n represents the number corresponding to the pixel point; A5: Determine "G n =k” holds true, where G n is the gray value of the pixel corresponding to number n, if "G n =k" is not true, go to A6; if "G n =k" holds true, let x m =x m +1, enter A6; A6: Determine whether "n≤N" holds. If so, set n=n+1 and return to A5. If not, go to A7. A7: Determine whether "k≤255" is true. If so, set k=k+1 and proceed to A4. If not, proceed to A8. A8: x 1 , x 2 , x 3 ······x 256 The 1×256 color feature vector is concatenated with the fully connected layer of the Classification layer in the improved Faster-RCNN model.