Granite rock identification method, system, device and equipment based on multiple features
By using a multi-feature recognition method to perform multi-level feature labeling and model training on granite rocks, the problem of granite rock identification relying on professional knowledge is solved, and efficient and accurate rock identification is achieved.
Patent Information
- Application Number
- CN202411652626.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Identification of granite rocks relies on the experience and knowledge of professionals, which is time-consuming and inefficient.
A multi-feature recognition method is adopted to obtain the rock images to be trained, perform multi-level feature annotation, build an initial model and train the target model, and identify the features of the rock images to be identified in turn.
It improves the accuracy and efficiency of granite rock identification and reduces the dependence on professional knowledge.
Smart Images

Figure CN119762905B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a method, system, device and equipment for identifying granite rocks based on multiple features. Background Art
[0002] Granitoids is a general term for granite, referring to granite and its closely associated mineral components, which are intermediate-acidic intrusive rocks dominated by quartz (>5%) and feldspar. Common granite rocks include: alkali feldspar granite, potassium feldspar granite, monzonitic granite, granodiorite, and plagioclase granite.
[0003] Lithology identification is a routine task in geological work. Traditionally, this task is primarily performed by geologists, relying on their experience to comprehensively identify rock characteristics such as color, texture, structure, and grain size. The main drawbacks of this approach are that it is time-consuming and labor-intensive, and requires a high level of expertise from geologists. Summary of the Invention
[0004] In view of this, the present invention provides a multi-feature based granite rock identification method, system, device and equipment, which can solve the technical problem that the identification of granite rocks relies on the experience and knowledge of professionals, is time-consuming and inefficient.
[0005] According to a first aspect of the present invention, a method for identifying granite rocks based on multiple features is provided, the method comprising:
[0006] Acquire a rock image to be trained, and perform multi-level feature labeling on the rock image to be trained to obtain a labeled rock image;
[0007] Constructing an initial model corresponding to each level of feature recognition, and using the annotated rock images to train and test the initial model, thereby obtaining a target model corresponding to each level of feature recognition;
[0008] A rock image to be identified is acquired, and the rock image to be identified is identified in sequence according to the target model corresponding to the feature level sequence to obtain target multi-level features of the rock image to be identified.
[0009] Preferably, the step of labeling the rock image to be trained with multi-level features to obtain a labeled rock image includes:
[0010] Determining multi-level features, wherein the multi-level features include: rock and non-rock as a first-level feature, igneous rock and non-igneous rock as a second-level feature, granite and non-granite as a third-level feature, and granite lithology as a fourth-level feature;
[0011] The rock image to be trained is labeled with features step by step to obtain a labeled rock image.
[0012] Preferably, the constructing of an initial model corresponding to each level of feature recognition includes:
[0013] constructing a first initial model for identifying rocks and non-rocks;
[0014] constructing a second initial model for distinguishing igneous rocks from non-igneous rocks;
[0015] Constructing a third initial model for identifying granitoids and non-granitoids;
[0016] constructing a fourth initial model for identifying lithology of granitic rocks;
[0017] The first initial model, the second initial model, the third initial model and the fourth initial model are used as initial models corresponding to each level of feature recognition.
[0018] Preferably, the initial model is trained and tested using the annotated rock image to obtain a target model corresponding to each level of feature recognition, including:
[0019] Using the labeled rock image to train and test the first initial model, a first target model corresponding to identifying the first-level features is obtained;
[0020] Deleting the image whose first-level feature is non-rock in the labeled rock image to obtain a first deleted image;
[0021] Using the first deleted image to train and test the second initial model, to obtain a second target model corresponding to recognizing the second-level features;
[0022] Deleting the image whose second-level feature is non-igneous rock from the first deleted image to obtain a second deleted image;
[0023] Using the second deleted image to train and test the third initial model, to obtain a third target model corresponding to the recognition of the third level characteristics;
[0024] Deleting the image whose third-level feature is non-granite from the second deleted image to obtain a third deleted image;
[0025] Using the third deleted image to train and test the fourth initial model, to obtain a fourth target model corresponding to the fourth level feature recognition;
[0026] The first target model, the second target model, the third target model and the fourth target model are used as target models corresponding to each level of features.
[0027] Preferably, the target model corresponding to the feature level sequence sequentially identifies the rock image to be identified to obtain target multi-level features of the rock image to be identified, including:
[0028] Identify the rock image to be identified according to the first target model to obtain an image of a target rock and an image of a target non-rock in the rock image to be identified;
[0029] recognizing the image of the target rock according to the second target model to obtain an image of a target igneous rock and an image of a target non-igneous rock in the image of the target rock;
[0030] Identify the target igneous rock image according to the third target model to obtain a target granite image and a target non-granite image in the target igneous rock image;
[0031] identifying the target granite image according to the fourth target model to obtain target lithology of the target granite image;
[0032] The target multi-level features of the rock image to be identified are obtained according to the image of the target rock, the image of the target non-rock, the image of the target igneous rock, the image of the target non-igneous rock, the image of the target granite, the image of the target non-granite and the target lithology.
[0033] According to a second aspect of the present invention, a granite rock identification system based on multiple features is provided, the system comprising:
[0034] Rock image management module, recognition module, and model management module to be trained;
[0035] The to-be-trained rock image management module is configured to perform corresponding management operations on the to-be-trained rock images in response to a user's request for a management operation on the to-be-trained rock images, wherein the management operation request includes setting the number and type of the to-be-trained rock images, and adding, deleting, modifying, and querying the to-be-trained rock images;
[0036] The recognition module is used to receive the rock image to be recognized, and recognize the rock image to be recognized in sequence according to the target model corresponding to the feature level sequence, to obtain the target multi-level features of the rock image to be recognized;
[0037] The model management module is used to re-train the target model when the number of rock images to be trained newly added or modified by the user is greater than a preset threshold, and during training, receive hyperparameters or automatically search for the hyperparameters to obtain an updated target model, so that the recognition model receives the rock images to be recognized, and recognizes the rock images to be recognized in turn according to the updated target models corresponding to the feature level order, to obtain updated target multi-level features of the rock images to be recognized.
[0038] According to a third aspect of the present invention, a granite rock identification device based on multiple features is provided, the device comprising:
[0039] An acquisition module is used to acquire a rock image, label the rock image with multi-level features, and obtain a labeled rock image;
[0040] A training module is used to construct an initial model corresponding to each level of feature recognition, and to train and test the initial model using the annotated rock image to obtain a target model corresponding to each level of feature recognition;
[0041] The application module is used to obtain the rock image to be identified, identify the rock image to be identified in sequence according to the target model corresponding to the feature level sequence, and obtain the target multi-level features of the rock image to be identified.
[0042] Preferably, the acquisition module includes a determination unit and a marking unit;
[0043] The determining unit is configured to determine a multi-level feature, wherein the multi-level feature includes: rock and non-rock as a first-level feature, igneous rock and non-igneous rock as a second-level feature, granite and non-granite as a third-level feature, and lithology of granite as a fourth-level feature;
[0044] The labeling unit is used to label the features of the rock image to be trained step by step to obtain a labeled rock image.
[0045] According to a fourth aspect of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the multi-feature-based granite rock identification method is implemented.
[0046] According to the fifth aspect of the present application, a computer device is provided, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein when the processor executes the program, the multi-feature-based granite rock identification method is implemented.
[0047] By means of the above technical solution, the present invention provides a method, system, device and equipment for granite rock recognition based on multiple features. First, a rock image to be trained is obtained, and the rock image to be trained is labeled with multi-level features to obtain a labeled rock image. Then, an initial model corresponding to each level of feature recognition is constructed. The initial model is trained and tested using the labeled rock image to obtain a target model corresponding to each level of feature recognition. Finally, a rock image to be recognized is obtained, and the rock image to be recognized is sequentially recognized according to the target model corresponding to the feature level order to obtain the target multi-level features of the rock image to be recognized. By means of the technical solution of the present invention, the rock image to be trained is labeled with multi-level features, fully considering the geological characteristics of the rock itself. For each level of feature, an initial model is trained to obtain a target model. The target model is used to specifically recognize the features of the rock image to be recognized at that level, thereby improving the recognition accuracy and improving the recognition efficiency compared to manual recognition.
[0048] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation on the local application. In the drawings:
[0050] Figure 1 A schematic flow chart of a method for identifying granite rocks based on multiple features provided by an embodiment of the present invention is shown;
[0051] Figure 2 A schematic flow chart of another method for identifying granite rocks based on multiple features provided by an embodiment of the present invention is shown;
[0052] Figure 3 A schematic structural diagram of a granite rock identification device based on multiple features provided by an embodiment of the present invention is shown;
[0053] Figure 4 A schematic structural diagram of another granite rock identification device based on multiple features provided by an embodiment of the present invention is shown;
[0054] Figure 5 A schematic diagram of a process for identifying granite lithology using a target model according to an embodiment of the present invention is shown;
[0055] Figure 6 The following is an architecture diagram of a granite rock identification system based on multiple features provided by an embodiment of the present invention;
[0056] Figure 7 A functional diagram of a granite rock identification system based on multiple features provided by an embodiment of the present invention is shown;
[0057] Figure 8 An example diagram showing the accuracy (left) and error (right) of a CNN model provided by an embodiment of the present invention is shown;
[0058] Figure 9 An example diagram showing the accuracy (left) and error (right) of the target model provided by an embodiment of the present invention is shown;
[0059] Figure 10 The figure shows a model parameter management interface of a granite rock identification system based on multiple features provided by an embodiment of the present invention;
[0060] Figure 11 The figure shows a training set supplement interface of a granite rock recognition system based on multiple features provided by an embodiment of the present invention;
[0061] Figure 12 The invention shows an identification result management interface of a granite rock identification system based on multiple features provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other.
[0063] This embodiment provides a method for identifying granite rocks based on multiple features, such as Figure 1 As shown, the method includes:
[0064] 101. Obtain a rock image to be trained, and perform multi-level feature labeling on the rock image to be trained to obtain a labeled rock image.
[0065] It should be noted that there are multiple rock images to be trained, including non-rock images. To improve the accuracy of automatic recognition, a multi-level representation of geological features is required. Therefore, each rock image to be trained is labeled with multiple levels of features. In this embodiment, the basic form of labeling can be: ABCD-..., where each letter represents a level. The number of levels can be set according to the actual application scenario and is not limited here. The letters are in a certain order, called the feature level order. The features in each level are called level features, and are represented by 0, 1, 2, etc.
[0066] 102. Construct an initial model corresponding to each level of feature recognition, and use the labeled rock image to train and test the initial model to obtain a target model corresponding to each level of feature recognition.
[0067] In this embodiment, an initial model corresponds to identifying what the features in a level are. Therefore, during training and testing, a corresponding initial model is trained using the features in a level to obtain a corresponding target model.
[0068] 103. Obtain a rock image to be identified, and identify the rock image to be identified in sequence according to the target model corresponding to the feature level sequence to obtain target multi-level features of the rock image to be identified.
[0069] For this embodiment, there are multiple rock images to be identified. Since the feature levels are sequential, the rock images to be identified are identified in sequence according to the target model corresponding to the feature level order. After one identification, the first-level feature is obtained until all the rock images to be identified are identified, and the target multi-level feature of each rock image to be identified is obtained.
[0070] The present invention provides a method, system, device and equipment for granite rock recognition based on multiple features. First, a rock image to be trained is obtained, and the rock image to be trained is labeled with multi-level features to obtain a labeled rock image. Then, an initial model corresponding to each level of feature recognition is constructed, and the initial model is trained and tested using the labeled rock image to obtain a target model corresponding to each level of feature recognition. Finally, a rock image to be recognized is obtained, and the rock image to be recognized is sequentially recognized according to the target model corresponding to the feature level sequence to obtain the target multi-level features of the rock image to be recognized. Through the technical solution of the present invention, the rock image to be trained is labeled with multi-level features, fully considering the geological characteristics of the rock itself. For each level of feature, an initial model is trained to obtain a target model. The target model is used to specifically recognize the features of the rock image to be recognized at that level, thereby improving the accuracy of recognition and improving the recognition efficiency compared to manual recognition.
[0071] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another granite rock identification method based on multiple features is provided, such as Figure 2 As shown, the method includes:
[0072] 201. Obtain a rock image to be trained, determine multi-level features, and label the features of the rock image to be trained level by level to obtain a labeled rock image.
[0073] It should be noted that there are multiple rock images to be trained, including all types of rocks, namely the three typical categories of rocks: sedimentary rocks, igneous rocks and metamorphic rocks. These images can be collected from the field or captured on the Internet. In order to improve the accuracy of automatic recognition, it is necessary to express geological features at multiple levels. Therefore, each rock image to be trained is labeled with multi-level features. For this embodiment, the basic form of labeling can be: ABCD-..., one letter represents one level, and the number of levels can be set according to the actual application scenario and is not limited here. There is an order between the letters, which is called the feature level order. The features in each level are called each level features, which are represented by 0, 1, 2...
[0074] Among them, with the ultimate goal of identifying the lithology of granite, four levels can be designed, and there is a sequence between the levels, that is, the feature level sequence. Specifically, the multi-level features include:
[0075] Level 1 A: Rock and non-rock are the first-level features, where rock is represented by 1 and non-rock is represented by 0;
[0076] Level 2B: igneous rocks and non-igneous rocks are second-level features, where igneous rocks are represented by 1 and non-igneous rocks are represented by 0;
[0077] Level 3 C: Granite and non-granite are the third-level features, where granite is represented by 1 and non-granite is represented by 0;
[0078] Level 4 D: The lithology of granite is the fourth level characteristic, where the lithology is specifically represented by 1 for alkali feldspar granite, 2 for potassium feldspar granite, 3 for monzonite granite, 4 for granodiorite, and 5 for plagioclase granite.
[0079] The order of feature levels is reflected in the fact that the rocks in the first-level feature include igneous rocks and non-igneous rocks, the igneous rocks in the second-level feature include granites and non-granites, and the granites in the third-level feature include granite lithologies.
[0080] For example, the complete label for granodiorite is 1-1-1-4; the complete label for peridotite is 1-1-0-0; and the complete label for sandstone is 1-0-0-0. If different rock types appear in an image, the four-level label ABCD can be reused to represent different rock types at different locations in the same image. For example, 1-1-1-4, 1-0-0-0, indicates that two rock types appear in the image: granodiorite (1-1-1-4) and sandstone (1-0-0-0).
[0081] Preferably, after the rock image to be trained is labeled with feature labels step by step, data enhancement operations can be performed on it by translation, scaling, rotation, etc. to obtain a labeled rock image.
[0082] 202. Construct an initial model corresponding to each level of recognition features.
[0083] In this embodiment, constructing an initial model corresponding to each level of feature identification includes: constructing a first initial model for identifying rocks and non-rocks; constructing a second initial model for identifying igneous rocks and non-igneous rocks; constructing a third initial model for identifying granites and non-granites; constructing a fourth initial model for identifying the lithology of granites; and using the first initial model, the second initial model, the third initial model, and the fourth initial model as the initial models corresponding to each level of feature identification.
[0084] As an implementation method, the first initial model can be a YoloV5 model with a spatial attention mechanism. As an implementation method, the second initial model can be constructed based on transfer learning and ResNet18. Specifically, the trained ResNet18 model parameters are loaded, the convolutional layers and pooling layers of the ResNet18 model are retained, and the number of output nodes of its fully connected layer is modified to 2. As an implementation method, the third initial model can be constructed based on transfer learning and ResNet18. Specifically, the trained ResNet18 model parameters are loaded, the convolutional layers and pooling layers of the ResNet18 model are retained, and the number of output nodes of the fully connected layer is modified to 2. As an implementation method, the fourth initial model can be constructed based on transfer learning and ResNet101. Specifically, the trained ResNet101 model parameters are loaded, the convolution layer and pooling layer of the ResNet101 model are retained, and the initial output node number of the fully connected layer (+softmax) is modified to 6 (corresponding to five specific granite lithologies (i.e., alkali feldspar granite, potassium feldspar granite, monzonite granite, granodiorite, plagioclase granite) and other granite rocks). If the number of lithologies changes, it is adjusted accordingly.
[0085] 203. The initial model is trained and tested using the labeled rock image to obtain a target model corresponding to each level of feature recognition.
[0086] In this embodiment, the initial model is trained and tested using the annotated rock image to obtain a target model corresponding to each level of feature recognition, including: training and testing the first initial model using the annotated rock image to obtain a first target model corresponding to the first level of feature recognition;
[0087] The labeled rock images are named Dataset-1, and Dataset-1 is randomly divided into a training set and a test set according to a preset ratio (e.g., 8:2), which are used for training and testing the first initial model, respectively. The trained first target model is saved in .pt format.
[0088] Deleting images whose first-level features are non-rock in the labeled rock image to obtain a first deleted image; training and testing the second initial model using the first deleted image to obtain a second target model corresponding to identifying the second-level features;
[0089] Among them, Dataset 1 includes images of rocks and non-rock images. The non-rock images are deleted, and the remaining images are all rock images. It is named Dataset 2 (Dataset-2). Dataset 2 is randomly divided into training set and test set according to a preset ratio (for example, 8:2), which are used for training and testing the second initial model respectively. During the training process, the PSO algorithm is used to optimize the hyperparameters of the model, and the trained second target model is saved in .pt format.
[0090] Deleting the image whose second-level feature is non-igneous rock from the first deleted image to obtain a second deleted image; training and testing the third initial model using the second deleted image to obtain a third target model corresponding to the recognition of the third-level feature;
[0091] Among them, Dataset 2 includes images of igneous rocks and images of non-igneous rocks. The images of non-igneous rocks are deleted, and the remaining images are all igneous rocks. It is named Dataset 3 (Dataset-3). Dataset 3 is randomly divided into training set and test set according to a preset ratio (for example, 8:2), which are used for training and testing the third initial model respectively. During the training process, the PSO algorithm is used to optimize the hyperparameters of the model, and the trained third target model is saved in .pt format.
[0092] Deleting the image whose third-level feature is non-granite from the second deleted image to obtain a third deleted image; training and testing the fourth initial model using the third deleted image to obtain a fourth target model corresponding to the fourth-level feature;
[0093] Among them, Dataset 3 includes granite images and non-granite images. After deleting the non-granite images, the remaining images are all granite images, which are named Dataset 4 (Dataset-3). Dataset 4 is randomly divided into a training set and a test set according to a preset ratio (for example, 8:2), which are used for training and testing the fourth initial model respectively. During the training process, the PSO algorithm is used to optimize the hyperparameters of the model, and the trained fourth target model is saved in .pt format.
[0094] The first target model, the second target model, the third target model and the fourth target model are used as target models corresponding to each level of features.
[0095] 204. Obtain a rock image to be identified, and identify the rock image to be identified in sequence according to the target model corresponding to the feature level sequence to obtain target multi-level features of the rock image to be identified.
[0096] In this embodiment, the target model corresponding to the feature level sequence sequentially identifies the rock image to be identified to obtain the target multi-level features of the rock image to be identified, including: identifying the rock image to be identified according to the first target model to obtain an image of the target rock and an image of the target non-rock in the rock image to be identified;
[0097] Among them, the first target model is used to detect the image of the target rock and the image of the target non-rock in the rock image to be identified. If the image of the target rock does not exist, 0-0-0-0 is directly output. If the image of the target rock exists, its position is detected and the image of each target rock is automatically cropped.
[0098] recognizing the image of the target rock according to the second target model to obtain an image of a target igneous rock and an image of a target non-igneous rock in the image of the target rock;
[0099] Among them, the second target model is used to detect the image of the target igneous rock and the image of the target non-igneous rock in the image of the target rock. If the image of the target igneous rock does not exist, 1-0-0-0 is directly output. If the image of the target igneous rock exists, it is filtered out.
[0100] Identify the target igneous rock image according to the third target model to obtain a target granite image and a target non-granite image in the target igneous rock image;
[0101] Among them, the third target model is used to detect the target granite image and the target non-granite image in the target igneous rock image. If the target granite image does not exist, 1-1-0-0 is directly output. If the target granite image exists, it is filtered out.
[0102] identifying the target granite image according to the fourth target model to obtain target lithology of the target granite image;
[0103] The fourth target model is used to detect the target lithology of the target granite image, and the target lithology is marked according to the preset label number corresponding to the target lithology.
[0104] The target multi-level features of the rock image to be identified are obtained according to the image of the target rock, the image of the target non-rock, the image of the target igneous rock, the image of the target non-igneous rock, the image of the target granite, the image of the target non-granite and the target lithology.
[0105] The application process of step 204 of the embodiment is as follows: Figure 5 shown.
[0106] In summary, the recyclable multi-level label encoding scheme can be used to accurately represent complex rock images in a hierarchical manner. The problem of identifying granite lithology in complex environments is broken down step by step based on a multi-level, multi-layered intelligent recognition model (i.e., the first target model, the second target model, the third target model, and the fourth target model), improving recognition accuracy.
[0107] After all the rock images to be identified are processed, the target multi-level features of the rock images to be identified are stored. Preferably, the rock images to be identified can be stored in the labeled rock images in step 201 of the embodiment to expand the data set for training and testing, and iteratively update the first target model, the second target model, the third target model and the fourth target model.
[0108] At present, the general CNN model lacks the ability of adaptive model adjustment and parameter update, and is difficult to cope with the dynamically changing data environment. It lacks consideration of the geological characteristics of the rock itself and focuses more on general recognition technology. It lacks the intelligent lithology recognition method for granite (and its geological characteristics). Therefore, the recognition accuracy is not high. Specifically, Figure 8 、 Figure 9 The training and testing results of a general CNN model and the method of this embodiment are shown respectively. Even when the training data contains multiple categories and multiple features, the recognition accuracy of this method for granite can reach 92% during testing, while the recognition accuracy of the general CNN model can only reach 83%.
[0109] The present invention provides a method, system, device and equipment for granite rock recognition based on multiple features. First, a rock image to be trained is obtained, and the rock image to be trained is labeled with multi-level features to obtain a labeled rock image. Then, an initial model corresponding to each level of feature recognition is constructed, and the initial model is trained and tested using the labeled rock image to obtain a target model corresponding to each level of feature recognition. Finally, a rock image to be recognized is obtained, and the rock image to be recognized is sequentially recognized according to the target model corresponding to the feature level sequence to obtain the target multi-level features of the rock image to be recognized. Through the technical solution of the present invention, the rock image to be trained is labeled with multi-level features, fully considering the geological characteristics of the rock itself. For each level of feature, an initial model is trained to obtain a target model. The target model is used to specifically recognize the features of the rock image to be recognized at that level, thereby improving the accuracy of recognition and improving the recognition efficiency compared to manual recognition.
[0110] An embodiment of the present invention provides a multi-feature-based granite rock identification system, comprising: a to-be-trained rock image management module, an identification module, and a model management module; the to-be-trained rock image management module is configured to perform corresponding management operations on the to-be-trained rock images in response to a user's request for a management operation on the to-be-trained rock images, wherein the management operation request includes setting the number and type of the to-be-trained rock images, and adding, deleting, modifying, and querying the to-be-trained rock images; the identification module is configured to receive the to-be-identified rock images, sequentially identify the to-be-identified rock images according to target models corresponding to a feature level sequence, and obtain target multi-level features of the to-be-identified rock images; and the model management module is configured to retrain the target model when the number of to-be-identified rock images added or modified by the user exceeds a preset threshold, and during training, receive hyperparameters or automatically search for the hyperparameters to obtain an updated target model, so that the recognition model receives the to-be-identified rock images, sequentially identifies the to-be-identified rock images according to the updated target models corresponding to the feature level sequence, and obtains updated target multi-level features of the to-be-identified rock images.
[0111] It should be noted that Figure 6 This is a diagram of the system architecture, primarily consisting of an Android-based mobile client (frontend), a cloud server, a system backend, and a database. The frontend is responsible for the functional interface and user interaction, while the backend handles frontend requests, manages related data, models, and other resources, accesses the database in an orderly manner, and sends the corresponding results, data, and resources to the frontend. The database is responsible for storing information, including user and model information, while the cloud server provides a public IP address, forwards requests, and facilitates request delivery.
[0112] It should be noted that Figure 7 This is the system function diagram. From the perspective of logical structure, the system can be divided into six layers: App display layer, App business logic layer, cloud server layer, backend server layer and resource support layer. Figure 10-12 Shows the typical functional interface of this system.
[0113] The core functional modules of the system include: a training rock image management module, an identification module, and a model management module. Specifically, the training rock image management module provides users with an interface for adding, deleting, modifying, and querying training data in the system database, allowing users to set the quantity and type of training data. The identification module uses the Android system's photo album and camera to obtain rock images, uses http request encapsulation technology to send requests, and the back-end calls the first target model, second target model, third target model, and fourth target model to perform lithology identification and return the identification results. When the number of images added or adjusted by the user reaches a certain threshold, the model management module triggers re-training of the model. It also supports manual adjustment or PSO automatic search of model hyperparameters. This enables the model structure and parameters to be dynamically updated as the application scenario changes.
[0114] Further, as Figure 1 and Figure 2 The embodiment of the present invention provides a granite rock identification device based on multiple features, such as Figure 3 As shown, the device includes: an acquisition module 31, a training module 32, and an application module 33;
[0115] An acquisition module 31 is used to acquire a rock image, label the rock image with multi-level features, and obtain a labeled rock image;
[0116] A training module 32 is used to construct an initial model corresponding to each level of feature recognition, and to train and test the initial model using the annotated rock image to obtain a target model corresponding to each level of feature recognition;
[0117] The application module 33 is used to obtain the rock image to be identified, identify the rock image to be identified in sequence according to the target model corresponding to the feature level sequence, and obtain the target multi-level features of the rock image to be identified.
[0118] Accordingly, in order to label the rock image to be trained with multi-level features and obtain the labeled rock image, the acquisition module 31 includes a determination unit 311 and a labeling unit 312;
[0119] The determining unit 311 is specifically configured to determine a multi-level feature, wherein the multi-level feature includes: rock and non-rock as a first-level feature, igneous rock and non-igneous rock as a second-level feature, granite and non-granite as a third-level feature, and lithology of granite as a fourth-level feature;
[0120] The labeling unit 312 is specifically used to label the features of the rock image to be trained step by step to obtain a labeled rock image.
[0121] Accordingly, in order to construct an initial model corresponding to each level of feature identification, the training module 32 is specifically used to construct a first initial model for identifying rocks and non-rocks; construct a second initial model for identifying igneous rocks and non-igneous rocks; construct a third initial model for identifying granites and non-granites; construct a fourth initial model for identifying the lithology of granites; and use the first initial model, the second initial model, the third initial model and the fourth initial model as the initial models corresponding to each level of feature identification.
[0122] Accordingly, in order to use the annotated rock image to train and test the initial model respectively and obtain a target model corresponding to each level of feature recognition, the training module 32 is specifically configured to use the annotated rock image to train and test the first initial model to obtain a first target model corresponding to the first level of feature recognition; delete the images in the annotated rock image where the first level feature is non-rock to obtain a first deleted image; use the first deleted image to train and test the second initial model to obtain a second target model corresponding to the second level of feature recognition; delete the images in the first deleted image where the second level feature is non-igneous rock to obtain a second deleted image; use the second deleted image to train and test the third initial model to obtain a third target model corresponding to the third level of feature recognition; delete the images in the second deleted image where the third level feature is non-granite to obtain a third deleted image; use the third deleted image to train and test the fourth initial model to obtain a fourth target model corresponding to the fourth level of feature recognition; and use the first target model, the second target model, the third target model, and the fourth target model as target models corresponding to each level of feature recognition.
[0123] Accordingly, in order to sequentially identify the rock image to be identified according to the target models corresponding to the feature level order and obtain the target multi-level features of the rock image to be identified, the application module 33 is specifically configured to identify the rock image to be identified according to the first target model to obtain the image of the target rock and the image of the target non-rock in the rock image to be identified; identify the image of the target rock according to the second target model to obtain the image of the target igneous rock and the image of the target non-igneous rock in the image of the target rock; identify the image of the target igneous rock according to the third target model to obtain the image of the target granite and the image of the target non-granite in the image of the target igneous rock; identify the image of the target granite according to the fourth target model to obtain the target lithology of the target granite; and obtain the target multi-level features of the rock image to be identified based on the image of the target rock, the image of the target non-rock, the image of the target igneous rock, the image of the target non-igneous rock, the image of the target granite, the image of the target non-granite, and the target lithology.
[0124] It should be noted that for other corresponding descriptions of the functional units involved in the multi-feature based granite rock identification device provided in this embodiment, please refer to Figures 1 to 2 The corresponding description will not be repeated here.
[0125] Based on the above Figures 1 to 2 The method shown in FIG. 1 is a method for performing the above-mentioned operations. Accordingly, this embodiment further provides a storage medium, which may be volatile or non-volatile, and stores a computer program thereon. When the program is executed by a processor, the above-mentioned operations are performed. Figures 1 to 2 The multi-feature based granite rock identification method shown.
[0126] Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present invention.
[0127] Based on the above Figures 1 to 2 The method shown and Figure 3 、 Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the virtual device shown in the figure further provides a computer device, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 2 The multi-feature based granite rock identification method shown.
[0128] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and may optionally include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface), etc.
[0129] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0130] The storage medium may also include an operating system and network communication module. Operating systems are programs that manage the hardware and software resources of the computer device, supporting the execution of information processing programs and other software and / or programs. The network communication module facilitates communication between components within the storage medium and with other hardware and software within the information processing device.
[0131] Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform, or by hardware.
[0132] The present invention provides a method, system, device and equipment for granite rock recognition based on multiple features. First, a rock image to be trained is obtained, and the rock image to be trained is labeled with multi-level features to obtain a labeled rock image. Then, an initial model corresponding to each level of feature recognition is constructed, and the initial model is trained and tested using the labeled rock image to obtain a target model corresponding to each level of feature recognition. Finally, a rock image to be recognized is obtained, and the rock image to be recognized is sequentially recognized according to the target model corresponding to the feature level sequence to obtain the target multi-level features of the rock image to be recognized. Through the technical solution of the present invention, the rock image to be trained is labeled with multi-level features, fully considering the geological characteristics of the rock itself. For each level of feature, an initial model is trained to obtain a target model. The target model is used to specifically recognize the features of the rock image to be recognized at that level, thereby improving the accuracy of recognition and improving the recognition efficiency compared to manual recognition.
[0133] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and that the modules or processes in the accompanying drawings are not necessarily required for the implementation of the present invention. Those skilled in the art will appreciate that the modules in the devices in the implementation scenarios can be distributed in the devices of the implementation scenarios according to the implementation scenario descriptions, or can be modified accordingly and located in one or more devices different from the implementation scenarios. The modules in the above-mentioned implementation scenarios can be combined into one module, or can be further split into multiple submodules.
[0134] The serial numbers of the present invention are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosures are only a few specific implementation scenarios of the present invention, but the present invention is not limited to them. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present invention.
Claims
1. A multi-feature based granite rock identification method, characterized in that: The method comprises: Acquire a rock image to be trained, and perform multi-level feature labeling on the rock image to be trained to obtain a labeled rock image; Constructing an initial model corresponding to each level of feature recognition, and using the annotated rock images to train and test the initial model to obtain a target model corresponding to each level of feature recognition; Acquire a rock image to be identified, identify the rock image to be identified in sequence according to the target model corresponding to the feature level sequence, and obtain target multi-level features of the rock image to be identified; The step of labeling the to-be-trained rock image with multi-level features to obtain a labeled rock image includes: Determining multi-level features, wherein the multi-level features include: rock and non-rock as a first-level feature, igneous rock and non-igneous rock as a second-level feature, granite and non-granite as a third-level feature, and granite lithology as a fourth-level feature; Labeling the features of the rock image to be trained step by step to obtain a labeled rock image; The construction of the initial model corresponding to each level of feature recognition includes: constructing a first initial model for identifying rocks and non-rocks; constructing a second initial model for distinguishing igneous rocks from non-igneous rocks; Constructing a third initial model for identifying granitoids and non-granitoids; constructing a fourth initial model for identifying lithology of granitic rocks; Using the first initial model, the second initial model, the third initial model, and the fourth initial model as initial models corresponding to identifying features at each level; The initial model is trained and tested using the labeled rock image to obtain a target model corresponding to each level of feature recognition, including: Using the labeled rock image to train and test the first initial model, a first target model corresponding to identifying the first-level features is obtained; Deleting the image whose first-level feature is non-rock in the labeled rock image to obtain a first deleted image; Using the first deleted image to train and test the second initial model, to obtain a second target model corresponding to identifying the second-level features; Deleting the image whose second-level feature is non-igneous rock from the first deleted image to obtain a second deleted image; Using the second deleted image to train and test the third initial model, to obtain a third target model corresponding to the recognition of the third level features; Deleting the image whose third-level feature is non-granite from the second deleted image to obtain a third deleted image; Using the third deleted image to train and test the fourth initial model, to obtain a fourth target model corresponding to the fourth level feature recognition; The first target model, the second target model, the third target model and the fourth target model are used as target models corresponding to each level of features.
2. The method according to claim 1, characterized in that The target model corresponding to the feature level sequence sequentially identifies the rock image to be identified to obtain target multi-level features of the rock image to be identified, including: Identify the rock image to be identified according to the first target model to obtain an image of a target rock and an image of a target non-rock in the rock image to be identified; recognizing the image of the target rock according to the second target model to obtain an image of a target igneous rock and an image of a target non-igneous rock in the image of the target rock; Identify the target igneous rock image according to the third target model to obtain a target granite image and a target non-granite image in the target igneous rock image; identifying the target granite image according to the fourth target model to obtain target lithology of the target granite image; The target multi-level features of the rock image to be identified are obtained according to the image of the target rock, the image of the target non-rock, the image of the target igneous rock, the image of the target non-igneous rock, the image of the target granite, the image of the target non-granite and the target lithology.
3. A multi-feature based granite rock identification system for implementing the multi-feature based granite rock identification method according to any one of claims 1 or 2, characterized in that: The system includes: a rock image management module to be trained, a recognition module, and a model management module; The to-be-trained rock image management module is configured to perform corresponding management operations on the to-be-trained rock images in response to a user's request for a management operation on the to-be-trained rock images, wherein the management operation request includes setting the number and type of the to-be-trained rock images, and adding, deleting, modifying, and querying the to-be-trained rock images; The recognition module is used to receive the rock image to be recognized, and recognize the rock image to be recognized in sequence according to the target model corresponding to the feature level sequence, to obtain the target multi-level features of the rock image to be recognized; The model management module is used to re-train the target model when the number of rock images to be trained newly added or modified by the user is greater than a preset threshold, and during training, receives hyperparameters or automatically searches for the hyperparameters to obtain an updated target model, so that the recognition module receives the rock images to be recognized, and recognizes the rock images to be recognized in sequence according to the updated target models corresponding to the feature level sequence, to obtain updated target multi-level features of the rock images to be recognized.
4. A granite rock identification device based on multiple features, characterized in that: The device comprises: An acquisition module is used to acquire a rock image to be trained, and label the rock image to be trained with multi-level features to obtain a labeled rock image; A training module is used to construct an initial model corresponding to each level of feature recognition, and to train and test the initial model using the annotated rock image to obtain a target model corresponding to each level of feature recognition; An application module is used to obtain a rock image to be identified, identify the rock image to be identified in sequence according to the target model corresponding to the feature level sequence, and obtain target multi-level features of the rock image to be identified; The acquisition module includes a determination unit and a marking unit; The determining unit is configured to determine a multi-level feature, wherein the multi-level feature includes: rock and non-rock as a first-level feature, igneous rock and non-igneous rock as a second-level feature, granite and non-granite as a third-level feature, and lithology of granite as a fourth-level feature; The labeling unit is used to label the features of the rock image to be trained step by step to obtain a labeled rock image; The training module is used to construct a first initial model for identifying rocks and non-rocks; construct a second initial model for identifying igneous rocks and non-igneous rocks; construct a third initial model for identifying granites and non-granites; and construct a fourth initial model for identifying the lithology of granites; and use the first initial model, the second initial model, the third initial model, and the fourth initial model as initial models corresponding to identifying each level of features; The training module is configured to train and test the first initial model using the annotated rock image to obtain a first target model corresponding to the identification of the first-level features; delete images in the annotated rock image where the first-level features are non-rock to obtain a first deleted image; train and test the second initial model using the first deleted image to obtain a second target model corresponding to the identification of the second-level features; delete images in the first deleted image where the second-level features are non-igneous rocks to obtain a second deleted image; train and test the third initial model using the second deleted image to obtain a third target model corresponding to the identification of the third-level features; delete images in the second deleted image where the third-level features are non-granite to obtain a third deleted image; train and test the fourth initial model using the third deleted image to obtain a fourth target model corresponding to the identification of the fourth-level features; and use the first target model, the second target model, the third target model, and the fourth target model as target models corresponding to the identification of each level of features.
5. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-feature-based granite rock identification method according to any one of claims 1 to 2 is implemented.
6. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein: When the processor executes the computer program, the multi-feature based granite rock identification method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Rock classification constraint inheritance loss method for rock recognition deep learning model
CN111191741A
Image recognition model training method and device based on multistage labels
CN115375963A