CN116051966A - Pen and stone image recognition method based on deep learning network and model training method thereof - Google Patents

Pen and stone image recognition method based on deep learning network and model training method thereof Download PDF

Info

Publication number
CN116051966A
CN116051966A CN202111265976.8A CN202111265976A CN116051966A CN 116051966 A CN116051966 A CN 116051966A CN 202111265976 A CN202111265976 A CN 202111265976A CN 116051966 A CN116051966 A CN 116051966A
Authority
CN
China
Prior art keywords
stone
pen
image
classification
stone image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111265976.8A
Other languages
Chinese (zh)
Inventor
刘洪林
王红岩
赵群
张介辉
孙莎莎
刘德勋
邹辰
邱振
张朝
周尚文
张琴
李晓波
梅珏
计玉冰
蒋立伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Petrochina Co Ltd
Original Assignee
Petrochina Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Petrochina Co Ltd filed Critical Petrochina Co Ltd
Priority to CN202111265976.8A priority Critical patent/CN116051966A/en
Publication of CN116051966A publication Critical patent/CN116051966A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a pen and stone image recognition method based on a deep learning network and a model training method thereof. The method comprises the following steps: acquiring a penstock image with category and species classification information, and constructing a penstock image category data set which comprises a penstock image category data set and a penstock image category data set; inputting the classification data set of the pencil stone image genus into the classification of the pencil stone image genus for training to obtain a classification model of the pencil stone image genus and parameters of the classification model of the pencil stone image genus; and migrating the parameters of the classification model of the pencil stone image to the classification model of the pencil stone image, inputting the classification data set of the pencil stone image into the classification model of the pencil stone image for training, and obtaining the classification model of the pencil stone image. The EfficientNet-b9 model created by the invention has the advantages of better accuracy, moderate algorithm complexity and short response time, can reduce the experience dependence on geological science and technology personnel, and realizes more accurate and rapid identification of the pen and stone image.

Description

Pen and stone image recognition method based on deep learning network and model training method thereof
Technical Field
The invention relates to the technical field of geology and image recognition, in particular to a pen and stone image recognition method based on a deep learning network and a model training method thereof.
Background
Accurate identification of drill cores and field geological layering without separating pencils. The ancient fossil research has great specialty, and the general identification method is to describe and compare the characteristics of the pen stone body, the residual body type and the like, and then determine the generic type. However, the existing pen and stone identification and recognition depend on experiences of geological science and technology personnel, mainly adopt a manual comparison mode, have low query speed and low precision, are easy to make mistakes for geological science and technology personnel with insufficient experiences, and are not accurate enough in classification.
The prior art mainly adopts a Support Vector Machine (SVM) method, a PCA algorithm based on nearest neighbor principle image recognition, convolutional neural network models RCNN, YOLO and the like for artificial intelligent recognition, and the method has the defects that firstly, fossil description and identification content are not standardized, so that fossil identification and classification accuracy is insufficient; secondly, the fossil is not subjected to surface treatment, so that the resolution of the photo is low, the contrast image is poor, the collected image is generally collected without enhancement pretreatment, a single photo has a plurality of fossils, the existing recognition technology and method cannot process the recognition problem of the fossils in the same visual field or photo, the recognition is wrong, and finally the training and recognition effects are poor; third, as the resolution of the acquired photographs increases, deeper image features cannot be network extracted for the genus and middle distribution of fossil respectively, and the network width cannot be increased to obtain finer granularity features.
At present, the domestic fossil identification is applied to the micro fossil, is not applied to the field of the pen stone shale, and lacks a better identification technology.
Disclosure of Invention
The present invention has been made in view of the above-mentioned problems, and it is an object of the present invention to provide a method and apparatus for training a pen-stone image recognition model based on a deep learning network, which overcomes or at least partially solves the above-mentioned problems.
In a first aspect, an embodiment of the present invention provides a training method for a pen-stone image recognition model based on a deep learning network, including:
acquiring a penstock image with category and species classification information, and constructing a penstock image category data set which comprises a penstock image category data set and a penstock image category data set;
inputting the classification data set of the pencil stone image genus into the classification of the pencil stone image genus for training to obtain a classification model of the pencil stone image genus and parameters of the classification model of the pencil stone image genus;
and migrating the parameters of the classification model of the pencil stone image to the classification of the pencil stone image, inputting the classification data set of the pencil stone image into the classification of the pencil stone image, and training to obtain a classification model of the pencil stone image, wherein the classification model of the pencil stone image is a recognition model of the pencil stone image.
In some alternative embodiments, the penstone image belongs to a classification model and the penstone image species classification model is an EfficientNet-b9 model including a residual structure;
the Efficient Net-b9 model includes: modules 1 to 9;
module 1 comprises a convolution layer of convolution kernel size 3x3, said convolution layer comprising a normalization layer and an activation function Swish;
the modules 2-8 comprise a plurality of MB convolution structures and MBConvBlock structures;
the block 9 comprises a common convolution kernel 1x1 convolution layer comprising a normalization layer and an activation function Swish, an averaging pooling layer and a full connection layer.
In some alternative embodiments, the MB convolution structure comprises:
a convolution layer of 1x1 with convolution kernel of one dimension, which contains normalized layer processing and Swish activation function;
a convolution layer of 3×3 or 5×5, comprising a normalization layer and an activation function Swish, a compression-excitation module;
a convolution layer of 1×1, which functions as a dimension reduction, comprising a normalization layer;
the MBConvBlock convolution structure includes:
a convolution layer of 1×1 of convolution kernel with one dimension, comprising a normalization layer and a Swish activation function; a convolutional kernel 3x3 or 5x5 DWConv convolutional layer comprising a normalization layer and an activation function Swish;
a compression-excitation module, which comprises a pooling layer, a full-connection layer, a swish activation layer, a full-connection layer and a sigmoid activation layer;
a convolution layer of 1x1 functioning as a dimension reduction, comprising a normalization layer process;
a random inactive Dropout layer.
In some optional embodiments, the acquiring the pen-stone image with genus and species classification information includes:
classifying each stone according to the shape, the cell tube type and the initial development type of the stone, and recording the genus and species classification information of each stone;
performing white decoration treatment on the classified pen stone fossil;
and acquiring the classified fossil images of the pen stones to obtain images of the fossil of each pen stone with genus and species classification information.
In some optional embodiments, after acquiring the pen-stone image with the genus and species classification information, the method further comprises:
dividing the acquired pen-stone image with genus and species classification information into a pen-stone body, a pen-stone residue and an image with wrong marks, and removing the pen-stone residue and the image with wrong marks contained in the image;
processing the removed pen-stone residues and the marked wrong pen-stone images by any one or more of the following steps: the method comprises the steps of adopting boundary expansion, rotation, size scaling, center cutting, random overturning and random translation;
the removed pen and stone residues, the marked error pen and stone images and the processed images form a pen and stone image category data set.
In some alternative embodiments, the parameter migration includes:
substituting classification parameters generated by the source classification model into a next target classification model to be trained according to a preset migration learning framework, wherein the classification parameters comprise a feature space, marginal probability and a target function.
In a second aspect, an embodiment of the present invention provides a method for identifying a pen-stone image based on a deep learning network, including:
collecting a pen and stone image to be measured;
inputting the pen and stone image to be tested into a trained pen and stone image recognition model to obtain a classification result of the pen and stone image to be tested;
the pen-stone image recognition model is obtained by training the pen-stone image recognition model training method based on the deep learning network.
In some alternative embodiments, the classification result of the pen-stone image to be measured includes:
and classifying results with preset quantity of classification accuracy of the pen and the stone types to be detected from high to low.
In a third aspect, an embodiment of the present invention provides a training device for a pen-stone image recognition model based on a deep learning network, including:
the first stone image acquisition module is used for acquiring stone images with genus and species classification information and constructing a stone image genus and species data set, wherein the data set comprises a stone image genus classification data set and a stone image species classification data set;
the classification model training module is used for inputting the classification data set of the pencil stone image genus, inputting the classification of the pencil stone image genus for training to obtain classification parameters of the pencil stone genus, transferring the classification parameters of the pencil stone genus to the classification model of the pencil stone image genus, inputting the classification data set of the pencil stone image genus to the classification model of the pencil stone image genus for training to obtain the classification model of the pencil stone image genus and classification model parameters of the pencil stone image genus, transferring the classification model parameters of the pencil stone image genus to the classification model of the pencil stone image species, and inputting the classification data set of the pencil stone image species to the classification model of the pencil stone image species for training to obtain the classification model of the pencil stone image species.
In a fourth aspect, an embodiment of the present invention provides a pen-stone image recognition device based on a deep learning network, including:
the second pen-stone image acquisition module is used for acquiring a pen-stone image to be detected;
the to-be-tested pen-stone image recognition module is used for inputting the to-be-tested pen-stone image into the trained pen-stone image recognition model to obtain a classification result of the to-be-tested pen-stone image; the pen-stone image recognition model is obtained by training the pen-stone image recognition model training method based on the deep learning network.
In some alternative embodiments, the classification result of the pen-stone image to be measured includes:
and classifying results with preset quantity of classification accuracy of the pen and the stone types to be detected from high to low.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the training method of the pen and stone image recognition model based on the deep learning network or the pen and stone image recognition method based on the deep learning network when executing the program.
In a sixth aspect, an embodiment of the present invention provides a computer storage medium, where computer executable instructions are stored, where the computer executable instructions when executed by a processor implement the above-mentioned training method for a deep learning network-based pen-stone image recognition model or the above-mentioned method for a deep learning network-based pen-stone image recognition model.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
in view of the theoretical research results of image recognition by using a deep learning network in the prior art, the method with high accuracy and high reliability is possibly provided for the identification of the pen stone fossil,
therefore, the invention relies on the geological big data, combines the accurate and standard scientific research data with the machine learning technology, realizes the automatic classification of fossil images, can effectively assist fossil identification work and improves the working efficiency. The EfficientNet-b9 model created by the invention has the advantages of better accuracy, moderate algorithm complexity and short response time, can reduce the experience dependence on geological science and technology personnel, and realizes more accurate and rapid identification of the pen and stone image.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of a training method for a pen-stone image recognition model in an embodiment of the invention;
FIG. 2 is a graph of accuracy versus typical network classification model for an embodiment of the present invention;
FIG. 3 is a diagram of the Efficient Net-b9 model in one embodiment of the invention;
FIG. 4 is a diagram of two convolution constructions in an embodiment of the present invention;
FIG. 5 is a flow chart of constructing a set of penstone image genus data in an embodiment of the present invention;
FIG. 6 is a diagram showing classification of the shape of a pen and stone in the identification of the pen and stone in an embodiment of the present invention;
FIG. 7 is a diagram of classification of cell and tube types in the identification of a penstone in an embodiment of the invention;
FIG. 8 is a graph of initial developmental classification of pencils in pencils identification in an embodiment of the invention;
FIG. 9 is a graph of enhancement processing results of a pen stone image in an embodiment of the present invention;
FIG. 10 is a flowchart of a pen stone image recognition in an embodiment of the invention;
FIG. 11 is a block diagram of a training apparatus for a pen-stone image recognition model in an embodiment of the present invention;
fig. 12 is a block diagram of a pen-stone image recognition apparatus in an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the problems that the existing pen and stone identification and recognition are mainly performed in a manual comparison mode, the query speed is low, the precision is low, and the experience of geological science and technology personnel is depended, and the error is easy to occur for geological science and technology personnel with insufficient experience, and the classification is not accurate enough, the embodiment of the invention provides a pen and stone image recognition model training method based on a deep learning network.
Embodiment one:
the embodiment of the invention provides a training method for a pen-stone image recognition model based on a deep learning network, which is shown in a figure 1 and comprises the following steps:
step S1: acquiring a penstock image with category and species classification information, and constructing a penstock image category data set which comprises a penstock image category data set and a penstock image category data set;
step S2: inputting the classification data set of the pencil stone image genus into the classification of the pencil stone image genus for training to obtain a classification model of the pencil stone image genus and parameters of the classification model of the pencil stone image genus;
the process of selecting the classification of the pencil stone image is carried out in a large number of experiments, innovation and improvement are carried out on the basis of the existing model, and a model which is more in line with the expected purpose of the invention is created. In order to achieve the aim of achieving the highest accuracy of pen-stone image identification and avoiding excessive complexity of algorithms, a large number of experiments and billions of operations are carried out on a plurality of image classification algorithm models with representative convolutional neural network migration learning at home and abroad, data reflecting the performance of each model are obtained, and after comprehensive comparison, the EfficientNet network model is improved to an EfficientNet-b9 model comprising a residual structure, so that a better model is created. The application effect and the advancement of the deep learning network model can be evaluated from the average classification accuracy, the number of deep network parameters and the floating point operation times. Average classification accuracy: comparing the accuracy of the identification result of the fossil image of the penstone with the expert identification result, and taking an average; deep network parameters: the sum of the parameters of the model convolution layer (Paramyconv) and full join layer (Paramfc),
Paramconv=(kernel×kernel)×channelinput×channeloutput
Paramfc=weightin×weightout
wherein kernel×kernel represents the size of the convolution kernel; channelinput, channeloutput each represents the number of input and output channels of the convolutional layer; weightin, weightout each represents the number of input and output channels of the fully connected layer. Floating point operations times (FLOPs): the calculation complexity of the model is measured, and the number of times of calculating floating point operations is actually the number of times of multiplication and addition in the calculation model. The data representing the performance of each model obtained by a large number of experiments are shown in table 1, ACC is the average classification accuracy, in percentage, parameters is the number of deep network parameters, in million, FLOPs is the number of floating point operations, in billions, and the larger the parameters and FLOPs, the higher the complexity of the representative algorithm. Referring to Table 1, the average classification accuracy of the Efficient Net-b9 model is highest in each model and reaches 92.73%, and meanwhile, the depth network parameters are smaller, and the floating point operation times are moderate. In addition, the average classification accuracy of the classification of the stone fossil is shown as a box diagram in fig. 2, and the horizontal lines on each box in the box diagram respectively display the group of data from top to bottom: maximum, upper quartile, median, lower quartile, and minimum. As can be seen from fig. 2, since the network width, depth and resolution of the afflicientnet model are obtained by compound scaling, the performance is outstanding when the fine-grained classification problem such as the classification of the fossil images of the penstones is solved, and particularly, the accuracy of the afflicientnet-b 9 is better.
In conclusion, after a large number of experimental comparisons and improvement of the existing model, the Efficient Net-b9 model created by the invention has better accuracy and moderate algorithm complexity, and the expected purpose of the invention is achieved.
Table 1 the present invention compares the evaluation index with a typical image classification algorithm model
Name ACC(%) Params(M) FLOPs(B)
AlexNet 82.42 57 0.7
VGGNet-11 84.65 129 7.6
VGGNet-16 88.28 134 15.5
ResNet-18 89.09 11 1.8
ResNet-101 91.31 43 7.9
DenseNet-121 90.30 7 0.6
DenseNet-201 90.91 20 2.8
EfficientNet-b0 91.52 4 0.4
EfficientNet-b3 91.72 12 1.8
EfficientNet-b9 92.73 30 9.9
Besides the EfficientNet-b9 model, the models listed in the table 1 have strong representativeness in the convolutional neural network transfer learning image classification algorithm model, the pen-stone image recognition can be realized by using any model, and the comparison of a plurality of representative strong models and the EfficientNet-b9 model enhances the comparability of data and has a larger reference value for model selection. Of course, the pen-stone image can be identified using other models than those listed in table 1, but the comparability is not strong, and the model selection reference value is limited. The invention is not limited to the preferred model after comprehensively comparing the reference amounts such as accuracy, algorithm complexity, response time and the like under the condition that the model listed in the table 1 is used for identifying the pen-stone image and the EfficientNet-b9 model is the priority of accuracy.
In practice, the classification dataset of the pen-stone image is input into the EfficientNet-b9 model for training, and referring to FIG. 3, the module 1 is entered to perform a convolution layer with a convolution kernel size of 3x3 on the input data, including a normalization layer and Swish activation, and then the obtained features are sent to the next layer for another convolution operation. The combined action of the modules 2-8 is to train model parameters and restrict the similarity between the pen and the corresponding image in the library, so as to obtain advanced retrieval characteristics. Modules 2-8 are all in a repeating stacked MB convolution structure, with the multiples on the right of the MB convolution structure representing the number of times the MB convolution structure is repeated. The 2 convolution modules (MBConv and MBConvBlock) in fig. 4 are mainly used for extracting image features, and are formed by combining a conventional convolution layer (Conv), a compression-excitation layer (SE) and a spatial convolution layer (DWConv) according to a certain sequence, and in particular, MBConvBlock adds a residual structure in order to alleviate the problem of gradient disappearance common in deep networks. With reference to fig. 4, the MBConv convolution structure mainly consists of a 1x1 convolution layer (with up-dimension effect, including normalization layer and Swish activation function), a (3 x 3) or (5 x 5) convolution layer (including normalization layer and activation function Swish), a compression-excitation (SE) module, and a 1x1 convolution layer (with down-dimension effect, including normalization layer). The MBConvBlock convolution structure mainly consists of a 1x1 convolution layer (dimension-increasing effect, comprising a normalization layer and a Swish activation function), a (3 x 3) or (5 x 5) DWConv convolution layer (comprising a normalization layer and an activation function Swish), a compression-excitation (SE) module (comprising a pooling layer, a full-connection layer, a Swish activation layer, a full-connection layer, a sigmoid activation layer), a 1x1 convolution layer (dimension-decreasing effect, comprising a normalization layer), and a random inactivation (Dropout) layer. The module 9 consists of a common 1x1 convolutional layer (comprising the normalization layer and the activation function Swish), an averaging pooling layer and a fully connected layer.
The data is passed through a module 9 to obtain the classification parameters of the penstone genus and the classification of the penstone image genus. Wherein, the classification parameters of the stroke genus comprise a feature space, marginal probability and target parameters.
Wherein the penstone image belongs to a classification model which is an EfficientNet-b9 model comprising a residual structure;
the EfficientNet-b9 model includes:
module 1 comprises a convolution layer of convolution kernel size 3x3, said convolution layer comprising a normalization layer and an activation function Swish;
the modules 2-8 comprise a plurality of MB convolution structures and MBConvBlock structures;
the block 9 comprises a common convolution kernel 1x1 convolution layer comprising a normalization layer and an activation function Swish, an averaging pooling layer and a full connection layer.
The improved EfficientNet-b9 model provided by the embodiment of the invention is added with a residual structure, namely an MBConvBlock structure, compared with the existing EfficientNet model. Referring to fig. 3, the MBConvBlock structure is specifically provided in the modules 2 to 8. The improvement can achieve the following effects: the number of layers is increased to improve the accuracy, and the residual error structure is increased to solve the problem of gradient disappearance in the iterative process.
Wherein the Efficient Net-b9 model contains composite Scaling (Compound Scaling) that uniformly scales the network Width (Width), depth (Depth) and Resolution (Resolution) using a composite coefficient φ:
Depth:d=αφ
Width:w=βφ
Resolution:r=γφ
s.t.α·β 2 =2
α≥1,β≥1,γ≥1
where α, β, γ are constants that are searched out using a grid, indicating how to adjust the depth, width, and resolution of the network, s.t. represents constraints. The effect of the compound scaling is to limit all layers to be uniformly scaled according to a constant proportion, so that the highest accuracy is achieved on the premise that the occupied memory and the parameter quantity are smaller than the target threshold value. Because the network width, depth and resolution of the EfficientNet-b9 model are obtained by compound scaling, the EfficientNet-b9 accuracy is better when the fine granularity classification problems such as the classification of the stone fossil images are solved. Referring to the box diagram shown in fig. 2, the horizontal lines on each box in the box diagram show the set of data from top to bottom: maximum, upper quartile, median, lower quartile, and minimum. As can be seen from FIG. 2, the average accuracy of the Efficient Net-b9 model is highest.
Specific structures of the MB structure and the MBConvBlock structure, as shown in fig. 4, specifically, the MB structure includes: a convolution layer of 1x1 with convolution kernel of one dimension, which contains normalized layer processing and Swish activation function; a convolution layer of 3×3 or 5×5, comprising a normalization layer and an activation function Swish, a compression-excitation module; a convolution layer of 1x1 functioning as a dimension reduction, comprising a normalization layer process;
the MBConvBlock structure includes: a convolution layer of 1×1 of convolution kernel with one dimension, comprising a normalization layer and a Swish activation function; a convolutional kernel 3x3 or 5x5 DWConv convolutional layer comprising a normalization layer and an activation function Swish; a compression-excitation module, which comprises a pooling layer, a full-connection layer, a swish activation layer, a full-connection layer and a sigmoid activation layer; a convolution layer of 1x1 functioning as a dimension reduction, comprising a normalization layer process; a random inactive Dropout layer.
Step S3: and migrating the parameters of the classification model of the pencil stone image to the classification model of the pencil stone image, inputting the classification data set of the pencil stone image into the classification model of the pencil stone image for training, and obtaining the classification model of the pencil stone image.
Wherein, the classification model of the penstock image is an EfficientNet-b9 model comprising a residual structure, and the detailed structure of the classification model of the penstock image refers to the description about the EfficientNet-b9 model in the step 2.
In specific implementation, the transfer learning theory in the prior art is applied, the parameters of the classification model of the pen-stone image are substituted into the classification model of the pen-stone image, then the classification data set of the pen-stone image is input into the classification model of the pen-stone image for training, 9 modules entering the EfficientNet-b9 model are trained in sequence, and the parameters of the classification model of the pen-stone image are output by the modules 9, so that the classification model of the pen-stone image is obtained.
The parameter migration step in the step S3 is that: substituting classification parameters generated by the source classification model into a next target classification model to be trained according to a preset migration learning framework, wherein the classification parameters comprise feature space, marginal probability, target function and the like.
The preset migration learning framework refers to a framework for describing migration learning by using fields, tasks and marginal probabilities. The content of the migration learning framework is "a field D can be defined as a tuple comprising two elements, one element being a feature space X and the other element being a marginal probability P (X), where X represents a sample data point. "
X={x 1 ,x 2 ,...,x n X, where x i Represents a particular vector and X e X. Thus, there is the formula:
D={x,P(X)}
a task T may be defined as a tuple comprising two elements, one of which is the feature space γ and the other of which is the objective function f. The objective function may be expressed as P (γ|x). Thus, there is the formula:
T={γ,P(γ|X)}
using this framework, the migration learning can be defined as a process, targeting the utilization of D S T in the field S Knowledge of source task, promotion of target field D T An objective function f in (a) T (or target task T) T ). For example, using the classification of the genus of the pencils image as a source classification model, the classification model parameters of the genus of the pencils image including feature space, marginal probability, objective function, etc. are generated. According to a preset migration learning framework, substituting the generated classification model parameters of the pencil stone image into the classification model of the pencil stone image, namely the target classification model.
Testing for preset times, comparing the classification result of each pen-stone image dataset with the category classification information corresponding to the pen-stone category expert dataset to obtain the accuracy of the category classification result, and calculating and recording the average accuracy of pen-stone image identification of the pen-stone image dataset; and regarding the average accuracy of the identification of the pencil stone image dataset as the average accuracy of the identification of the pencil stone image of the model.
Step S11: referring to fig. 5, the steps for collecting the pen-stone image with the category information are as follows:
classifying each stone according to the shape, the cell tube type and the initial development type of the stone, and recording the genus and species classification information of each stone;
in the concrete implementation, as much as possible of the stone fossil is collected, and a stone sample can be collected by using a geological section or a rock core; and acquiring information such as measurement parameters required by the characteristics of the pencils and stones as references, and classifying the pencils and stones according to the shape classification of the pencils and stones, the classification of the cell type and the classification of the initial development type. For example, the pencil stones are classified according to the pencil stone body shape, the cell tube type, the initial development type, and the like, respectively, and referring to fig. 6, the pencil stone body shape classification includes: double fork, multiple fork, shan Zhi type tubular branching, rake, straight pipe, tower, screw, etc.; referring to fig. 7, the cell type classification includes: equal division stone type, single-stone type, roll-up stone type, half-rake type, fine stone type, pencil stone type, tumor stone type, chinese stone type, etc.; referring to fig. 8, the originating developmental type classification includes: h, I, J, etc. And the pen and stone expert judges according to the information such as the shape type, the cell tube type, the initial development type and the like of the pen and stone body of the specific pen and stone, and obtains and records the genus and species classification information of the specific pen and stone. Through collecting a large number of stone stones and judging by a stone expert, genus and species classification information corresponding to each stone is obtained, so that a large number of stone samples with genus and species classification information are obtained, and a stone genus and species expert data set is constructed from the samples.
Step S12: and (5) performing white decoration treatment on the classified pen stone fossil. For example, white stone is decorated by a method of heating and gasifying ammonium chloride and then recrystallizing the decorated white stone. Wherein, the method for heating and gasifying the ammonium chloride to decorate the albite belongs to the prior art. The effect of the white decoration treatment is that fossils are decorated after white decoration, and the contrast and brightness of the photo obtained by photographing are higher, thereby being beneficial to improving the accuracy of image recognition. Besides the method of heating and gasifying the ammonium chloride to decorate white fossil, other treatment methods with the effect of decorating white pen stone can be adopted.
Step S13: and acquiring the classified fossil images of the pen stones to obtain images of the fossil of each pen stone with genus and species classification information. For example, a photographing mode can be adopted to collect images of the stone fossils, and then the images of the stone fossils with the category information and the species classification information are obtained according to the category information and the species information in the expert data set of the stone category. When shooting, the pen and stone sample shooting at different scenes, different weather conditions, different light rays and different angles can be selected, and various conditions possibly occurring when shooting the pen and stone sample to be detected are simulated, so that the diversity of the acquired pen and stone sample is improved, the pen and stone image recognition model is facilitated to extract more accurate pen and stone image characteristics, and the practicability of the pen and stone image recognition model and the accuracy of pen and stone image recognition are improved.
In one embodiment, after the step S13, step S14 may be further performed:
dividing the acquired pen-stone image with genus and species classification information into a pen-stone body, a pen-stone residue and an image with wrong marks, and removing the pen-stone residue and the image with wrong marks contained in the image; by removing the images with the pen and stone residues and the wrong marks, the quality of samples is improved, the more accurate pen and stone image characteristics are extracted by the pen and stone image recognition model, invalid calculation is avoided, and the calculated amount is reduced.
Step S15: processing the removed pen-stone residues and the marked wrong pen-stone images by any one or more of the following steps: including boundary expansion, rotation, size scaling, center clipping, random flipping, random translation. The removed pen and stone residues, the marked error pen and stone images and the processed images form a pen and stone image category data set.
For example, referring to fig. 9, where fig. a is an original image, fig. b is an image after boundary expansion, fig. c is an image after rotation, fig. d is an image after size scaling, fig. e is an image after center cropping, fig. f is an image after random inversion, and fig. g is an image after random translation. Boundary expansion means that the outermost pixel value around the image is selected, and the boundary expansion is carried out according to the widths of 50, 100, 150 and 200 pixels respectively; rotation means that the image is rotated once every 15 degrees in the range of 0 to 360 degrees; the size scaling means that one shorter value of the length and the width of an input image is set to 256 pixels, and the other value is scaled according to the original aspect ratio; center clipping refers to clipping 224×224 center images with the center point of the input image as the center; the random overturn refers to horizontally overturn the input image with 50% probability and then vertically overturn with 50% probability; random translation refers to the input image, horizontally: randomly translating left and right to limit 5% of the image width; in the vertical direction: to limit 5% of the image height, randomly translate up and down. According to the operation, the sample images can be processed into the uniform size, the subsequent processing is convenient, in addition, photos of various positions of the same pen-stone image are provided, the sample space is increased, more samples are provided for model training, and the possibility that the model extracts more accurate features of the pen-stone image is increased. For example, referring to table 2, in the pen stone image genus species data set of 22 genera and 51 species and the number of samples thereof in one experiment, the pen stone names of the marks are genus names, and the others are species names. Taking the sharpening pen stone as an example, through the operation, the sharpening pen stone is increased to 5250 samples from 42 original samples, so that the sample space is greatly improved, more samples are provided for model training, more samples are selectable, and more accurate characteristics are facilitated to be extracted.
TABLE 2 22 genus 51 species in the stone image genus data set
Figure BDA0003327004270000141
Figure BDA0003327004270000151
Example two
The embodiment of the invention provides a pen and stone image identification method based on a deep learning network, which has a flow shown in a figure 10 and comprises the following steps:
step S4: the step of collecting the image of the pen and the stone to be measured, specifically shooting and processing the pen and the stone can refer to the first embodiment, and is not repeated here.
Step S5: inputting the pen and stone image to be tested into a trained pen and stone image recognition model to obtain a classification result of the pen and stone image to be tested;
the method comprises the steps of dividing a to-be-detected pen and stone image into a plurality of pen and stone samples, and manually selecting any one of the plurality of pen and stone samples as an image to be identified. The image to be identified is input into a pen stone image identification model, a generic identification result and the average accuracy of the result are output, and a plurality of results with higher average accuracy can be output if necessary. For example, in the case of outputting a plurality of results, there is a higher possibility that the correct recognition result is included in the plurality of results, and the recognition result is manually selected, one of the results being selected as the final pen-stone image recognition result. For example, referring to table 3, statistics of identification results show that 28 groups of fossil stones in the database are randomly extracted for identification accuracy and response time experiments (the name of the marked fossil is a generic name, and the rest is a species name), the model is tested by using a test set image, and compared with expert identification results (table 3), TOP1 represents a single result, the identification accuracy of the single result is more than 98.89%, TOP1+2+3 represents the first three results with highest average accuracy, the accuracy of the correct result included in the first three results reaches more than 99.43%, and the relatively accurate identification degree is achieved; the response time is less than 0.02ms, and the recognition efficiency is high.
TABLE 3 statistics of the results of identifying the stones
Figure BDA0003327004270000161
Figure BDA0003327004270000171
Example III
The embodiment of the invention provides a training device of a pen-stone image recognition model based on a deep learning network, which is shown by referring to fig. 11 and comprises the following components:
a first stone image acquisition module 101, configured to acquire stone images with category and species classification information, and construct a stone image category data set, where the data set includes a stone image category data set and a stone image category data set;
the classification model training module 102 is configured to input a classification data set of the class of the pen-stone image, perform training on the classification of the class of the pen-stone image, obtain classification parameters of the class of the pen-stone, migrate the classification parameters of the class of the pen-stone to the classification model of the class of the pen-stone image, input the classification data set of the class of the pen-stone image to the classification model of the class of the pen-stone image for training, obtaining a classification model of the penstock image genus and a classification model parameter of the penstock image genus, transferring the classification model parameter of the penstock image genus to the classification model of the penstock image species, inputting the classification data set of the penstock image species into the classification model of the penstock image species for training, and obtaining the classification model of the penstock image species.
Example IV
The embodiment of the invention provides a pen and stone image recognition device based on a deep learning network, which is shown by referring to fig. 12 and comprises the following components:
a second stone image acquisition module 111, configured to acquire a stone image to be measured;
the to-be-tested pen-stone image recognition module 112 is configured to input a pen-stone image to be tested into a trained pen-stone image recognition model, to obtain a classification result of the pen-stone image to be tested, where the pen-stone image recognition model is trained by using the training method of the pen-stone image recognition model based on the deep learning network as described above; the classification result of the pen and stone image to be detected comprises the following steps: and outputting classification results with preset quantity of classification accuracy of the pen and the stone to be detected from high to low.
Example five
An embodiment of the present invention provides an electronic device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the training method of the pen and stone image recognition model based on the deep learning network or the pen and stone image recognition method based on the deep learning network when executing the program.
Example six
The embodiment of the invention provides a computer storage medium, which is characterized in that computer executable instructions are stored in the computer storage medium, and the computer executable instructions realize the training method of the pen and stone image recognition model based on a deep learning network or the pen and stone image recognition method based on the deep learning network when being executed by a processor.
It should be understood that the specific order or hierarchy of steps in the processes disclosed are examples of exemplary approaches. Based on design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not meant to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus the following claims are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate preferred embodiment of this invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The foregoing description includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, as used in the specification or claims, the term "comprising" is intended to be inclusive in a manner similar to the term "comprising," as interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean "non-exclusive or".

Claims (13)

1. A training method of a pen-stone image recognition model based on a deep learning network is characterized by comprising the following steps:
acquiring a penstock image with category and species classification information, and constructing a penstock image category data set which comprises a penstock image category data set and a penstock image category data set;
inputting the classification data set of the pencil stone image genus into the classification of the pencil stone image genus for training to obtain a classification model of the pencil stone image genus and parameters of the classification model of the pencil stone image genus;
and migrating the parameters of the classification model of the pencil stone image to the classification of the pencil stone image, inputting the classification data set of the pencil stone image into the classification of the pencil stone image, and training to obtain a classification model of the pencil stone image, wherein the classification model of the pencil stone image is a recognition model of the pencil stone image.
2. The method of claim 1, wherein the penstone image belongs to a classification model and the penstone image species classification model is an EfficientNet-b9 model including a residual structure;
the Efficient Net-b9 model includes: modules 1 to 9;
module 1 comprises a convolution layer of convolution kernel size 3x3, said convolution layer comprising a normalization layer and an activation function Swish;
the modules 2-8 comprise a plurality of MB convolution structures and MBConvBlock structures;
the block 9 comprises a common convolution kernel 1x1 convolution layer comprising a normalization layer and an activation function Swish, an averaging pooling layer and a full connection layer.
3. The method of claim 2, wherein the MB convolution structure comprises:
a convolution layer of 1x1 with convolution kernel of one dimension, which contains normalized layer processing and Swish activation function;
a convolution layer of 3×3 or 5×5, comprising a normalization layer and an activation function Swish, a compression-excitation module;
a convolution layer of 1×1, which functions as a dimension reduction, comprising a normalization layer;
the MBConvBlock convolution structure includes:
a convolution layer of 1×1 of convolution kernel with one dimension, comprising a normalization layer and a Swish activation function; a convolutional kernel 3x3 or 5x5 DWConv convolutional layer comprising a normalization layer and an activation function Swish;
a compression-excitation module, which comprises a pooling layer, a full-connection layer, a swish activation layer, a full-connection layer and a sigmoid activation layer;
a convolution layer of 1x1 functioning as a dimension reduction, comprising a normalization layer process;
a random inactive Dropout layer.
4. The method of claim 1, wherein the acquiring of the stone image with genus and species classification information comprises:
classifying each stone according to the shape, the cell tube type and the initial development type of the stone, and recording the genus and species classification information of each stone;
performing white decoration treatment on the classified pen stone fossil;
and acquiring the classified fossil images of the pen stones to obtain images of the fossil of each pen stone with genus and species classification information.
5. The method of claim 1, wherein after acquiring the pen-stone image with the genus and species classification information, further comprising:
dividing the acquired pen-stone image with genus and species classification information into a pen-stone body, a pen-stone residue and an image with wrong marks, and removing the pen-stone residue and the image with wrong marks contained in the image;
processing the removed pen-stone residues and the marked wrong pen-stone images by any one or more of the following steps: the method comprises the steps of adopting boundary expansion, rotation, size scaling, center cutting, random overturning and random translation;
the removed pen and stone residues, the marked error pen and stone images and the processed images form a pen and stone image category data set.
6. The method of claim 1, wherein the parameter migration comprises:
substituting classification parameters generated by the source classification model into a next target classification model to be trained according to a preset migration learning framework, wherein the classification parameters comprise a feature space, marginal probability and a target function.
7. A pen and stone image recognition method based on a deep learning network is characterized by comprising the following steps:
collecting a pen and stone image to be measured;
inputting the pen and stone image to be tested into a trained pen and stone image recognition model to obtain a classification result of the pen and stone image to be tested;
the pen-stone image recognition model is trained by the training method of the pen-stone image recognition model based on the deep learning network according to any one of claims 1-6.
8. The method of claim 7, wherein the classification of the pen-stone image to be measured comprises:
and classifying results with preset quantity of classification accuracy of the pen and the stone types to be detected from high to low.
9. Training device of pen stone image recognition model based on deep learning network, characterized by comprising:
the first stone image acquisition module is used for acquiring stone images with genus and species classification information and constructing a stone image genus and species data set, wherein the data set comprises a stone image genus classification data set and a stone image species classification data set;
the classification model training module is used for inputting the classification data set of the pencil stone image genus, inputting the classification of the pencil stone image genus for training to obtain classification parameters of the pencil stone genus, transferring the classification parameters of the pencil stone genus to the classification model of the pencil stone image genus, inputting the classification data set of the pencil stone image genus to the classification model of the pencil stone image genus for training to obtain the classification model of the pencil stone image genus and classification model parameters of the pencil stone image genus, transferring the classification model parameters of the pencil stone image genus to the classification model of the pencil stone image species, and inputting the classification data set of the pencil stone image species to the classification model of the pencil stone image species for training to obtain the classification model of the pencil stone image species.
10. A pen-stone image recognition device based on a deep learning network, comprising:
the second pen-stone image acquisition module is used for acquiring a pen-stone image to be detected;
the to-be-tested pen-stone image recognition module is used for inputting the to-be-tested pen-stone image into the trained pen-stone image recognition model to obtain a classification result of the to-be-tested pen-stone image; the pen-stone image recognition model is trained by the training method of the pen-stone image recognition model based on the deep learning network according to any one of claims 1-6.
11. The method of claim 10, wherein the classification of the pen-stone image to be measured comprises:
and classifying results with preset quantity of classification accuracy of the pen and the stone types to be detected from high to low.
12. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the deep learning network based pen-stone image recognition model training method according to any one of claims 1-6 or a deep learning network based pen-stone image recognition method according to claim 7 when executing the program.
13. A computer storage medium having stored therein computer executable instructions which when executed by a processor implement the deep learning network based pen-stone image recognition model training method of any one of claims 1-6 or the deep learning network based pen-stone image recognition method of claim 7.
CN202111265976.8A 2021-10-28 2021-10-28 Pen and stone image recognition method based on deep learning network and model training method thereof Pending CN116051966A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111265976.8A CN116051966A (en) 2021-10-28 2021-10-28 Pen and stone image recognition method based on deep learning network and model training method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111265976.8A CN116051966A (en) 2021-10-28 2021-10-28 Pen and stone image recognition method based on deep learning network and model training method thereof

Publications (1)

Publication Number Publication Date
CN116051966A true CN116051966A (en) 2023-05-02

Family

ID=86124369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111265976.8A Pending CN116051966A (en) 2021-10-28 2021-10-28 Pen and stone image recognition method based on deep learning network and model training method thereof

Country Status (1)

Country Link
CN (1) CN116051966A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116824306A (en) * 2023-08-28 2023-09-29 天津大学 Training method of pen stone fossil image recognition model based on multi-mode metadata

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116824306A (en) * 2023-08-28 2023-09-29 天津大学 Training method of pen stone fossil image recognition model based on multi-mode metadata
CN116824306B (en) * 2023-08-28 2023-11-17 天津大学 Training method of pen stone fossil image recognition model based on multi-mode metadata

Similar Documents

Publication Publication Date Title
CN110533084B (en) Multi-scale target detection method based on self-attention mechanism
CN109145830B (en) Intelligent water gauge identification method
CN112232391B (en) Dam crack detection method based on U-net network and SC-SAM attention mechanism
CN110111345B (en) Attention network-based 3D point cloud segmentation method
CN109509187B (en) Efficient inspection algorithm for small defects in large-resolution cloth images
CN111582093A (en) Automatic small target detection method in high-resolution image based on computer vision and deep learning
CN111860570B (en) Cloud particle image extraction and classification method
CN111652273B (en) Deep learning-based RGB-D image classification method
CN113610024B (en) Multi-strategy deep learning remote sensing image small target detection method
Chen et al. A new process for the segmentation of high resolution remote sensing imagery
CN112836614A (en) High-resolution remote sensing image classification method based on residual error network and transfer learning
CN113628180A (en) Semantic segmentation network-based remote sensing building detection method and system
CN114219049B (en) Fine-grained curbstone image classification method and device based on hierarchical constraint
CN112991370A (en) Rock core CT crack identification and segmentation method
CN117611485B (en) Three-dimensional core permeability prediction method based on space-time diagram neural network
CN116051966A (en) Pen and stone image recognition method based on deep learning network and model training method thereof
CN104331711B (en) SAR image recognition methods based on multiple dimensioned fuzzy mearue and semi-supervised learning
CN105844299B (en) A kind of image classification method based on bag of words
CN116863134A (en) Method and system for detecting and dividing length and width of tunnel lining crack
CN112084941A (en) Target detection and identification method based on remote sensing image
CN113971427B (en) Improved model-based rock debris identification method
CN111191617B (en) Remote sensing scene classification method based on hierarchical structure
CN117496162B (en) Method, device and medium for removing thin cloud of infrared satellite remote sensing image
CN116630790B (en) Classification result optimization method based on edge precision evaluation
CN114648074B (en) Loess cave-trapping object-oriented extraction method integrating topographic features

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination