CN112348049A - Image recognition model training method and device based on automatic coding - Google Patents

Image recognition model training method and device based on automatic coding Download PDF

Info

Publication number
CN112348049A
CN112348049A CN202011043380.9A CN202011043380A CN112348049A CN 112348049 A CN112348049 A CN 112348049A CN 202011043380 A CN202011043380 A CN 202011043380A CN 112348049 A CN112348049 A CN 112348049A
Authority
CN
China
Prior art keywords
image
training sample
sample set
image training
recognition model
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
CN202011043380.9A
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.)
Beijing Normal University
Original Assignee
Beijing Normal University
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 Beijing Normal University filed Critical Beijing Normal University
Priority to CN202011043380.9A priority Critical patent/CN112348049A/en
Publication of CN112348049A publication Critical patent/CN112348049A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The invention provides an image recognition model training method and device based on automatic coding, and relates to the technical field of image processing. The method comprises the following steps: the image training sample set is obtained, the automatic coding model is used for carrying out dimension reduction processing on the image training sample set, the problem of identifying the high-dimensional image training sample can be converted into the problem of identifying the feature expression vector, the complexity of calculation is greatly reduced, and the identification error caused by redundant information is reduced. The image training sample set after the dimensionality reduction is optimized to obtain the optimized image training sample set, so that an image recognition model capable of accurately recognizing images can be trained through the optimized image training sample set, and the accuracy of image recognition is further guaranteed. And training the initial image recognition model according to the optimized image training sample set to obtain a trained image recognition model capable of accurately recognizing.

Description

Image recognition model training method and device based on automatic coding
Technical Field
The invention relates to the technical field of image processing, in particular to an image recognition model training method and device based on automatic coding.
Background
The massive images can represent richer semantic information, and have very wide application in aspects of life, education, medical treatment, military affairs and the like. On one hand, massive images are abundant and facilitate multiple fields; on the other hand, the explosive increase of the number of images also becomes a potential burden, and how to accurately identify the target image becomes more and more meaningful work.
The traditional machine learning method can effectively identify the target image through steps of training, searching, decision making and the like. However, the conventional image recognition method needs to use a large number of training samples to train the image model. In the training process, a large number of training samples are needed, and the training speed is greatly influenced. In addition, many unreasonable, repeated, and even erroneous samples are included in the training samples, which significantly reduces the accuracy of image recognition.
Disclosure of Invention
The invention aims to provide an image recognition model training method and device based on automatic coding, which are used for solving the problem of inaccurate image recognition in the prior art.
In a first aspect, an embodiment of the present application provides an image recognition model training method based on automatic coding, where the method includes: and acquiring an image training sample set, and performing dimension reduction processing on the image training sample set by using an automatic coding model. And optimizing the image training sample set subjected to the dimensionality reduction treatment to obtain an optimized image training sample set. And training the initial image recognition model according to the optimized image training sample set to obtain a trained image recognition model.
In the implementation process, firstly, the automatic coding model is used for carrying out dimension reduction processing on the image training sample set, the problem of identifying the high-dimensional image training sample can be converted into the problem of identifying the feature expression vector, the complexity of calculation is greatly reduced, and the identification error caused by redundant information is reduced. And then, optimizing the image training sample set subjected to the dimension reduction treatment, and further ensuring that an image recognition model capable of accurately recognizing images can be trained through the optimized image training sample set, so that the accuracy of image recognition is ensured.
In some embodiments of the present invention, after the step of training the initial image recognition model according to the optimized image training sample set to obtain the trained image recognition model, the method includes: acquiring an image library to be identified; the image library to be recognized comprises a plurality of images to be recognized; and identifying the image library to be identified by using the trained image identification model, and identifying a target image from the image library to be identified.
In the implementation process, the trained image recognition model is obtained by training according to the optimized image training set, and the difference between different image training samples can be considered, so that the target image can be accurately recognized from the image library to be recognized.
In some embodiments of the present invention, the image training sample set includes a plurality of image training samples, and before the step of performing the dimension reduction processing on the image training sample set by using the automatic coding model, the method further includes: and (3) segmenting each image training sample in the image training sample set by adopting a watershed segmentation algorithm, and obtaining a segmentation map corresponding to each image training sample. And judging whether the number of the segmentation areas in the segmentation graph is larger than a preset segmentation threshold value, and if so, deleting the image training samples corresponding to the segmentation graph from the image training sample set.
In the implementation process, the image training sample set is preprocessed by using a watershed segmentation algorithm to delete redundant image training samples in the image training sample set, so that the quality of the samples in the image training sample set is ensured, and the identification accuracy of the trained image identification model is further ensured.
In some embodiments of the present invention, before the step of performing the dimension reduction processing on the image training sample set by using the automatic coding model, the method further includes: and acquiring a first image training sample set, and establishing an initial automatic coding model. And training the initial automatic coding model by using the first image training sample set to obtain a trained automatic coding model.
In some embodiments of the present invention, the image training sample set includes a plurality of image training samples, and the step of optimizing the image training sample set after the dimension reduction processing to obtain an optimized image training sample set includes: and calculating the similarity value between at least two image training samples in the image training sample set by adopting a similarity measurement method. And if the similarity value is larger than a preset similarity threshold value, deleting at least one image training sample in the plurality of image training samples.
In some embodiments of the present invention, if the similarity value is greater than the preset similarity threshold, after the step of deleting at least one image training sample of the plurality of image training samples, the method further includes: and calculating a plurality of nearest training samples of an image training sample in the image training sample set by using a nearest detection algorithm. And comparing each nearest training sample with the image training sample to obtain a comparison result. And if the comparison result shows that the image training samples have large difference with the nearest training samples, deleting the image training samples.
In a second aspect, an embodiment of the present application provides an automatic coding-based image recognition model training apparatus, where the apparatus includes: and the sample set acquisition module is used for acquiring an image training sample set. And the automatic coding dimension reduction module is used for performing dimension reduction processing on the image training sample set by using the automatic coding model. And the sample set optimization module is used for optimizing the image training sample set subjected to the dimensionality reduction processing to obtain an optimized image training sample set. And the model training module is used for training the initial image recognition model according to the optimized image training sample set so as to obtain the trained image recognition model.
In some embodiments of the invention, an apparatus comprises: the image library acquisition module is used for acquiring an image library to be identified; the image library to be recognized comprises a plurality of images to be recognized. And the recognition module is used for recognizing the image library to be recognized by utilizing the trained image recognition model and recognizing the target image from the image library to be recognized.
In some embodiments of the invention, the set of image training samples comprises a plurality of image training samples, the apparatus further comprising: and the watershed segmentation module is used for segmenting each image training sample in the image training sample set by adopting a watershed segmentation algorithm and obtaining a segmentation map corresponding to each image training sample. And the segmentation map judging module is used for judging whether the number of the segmentation areas in the segmentation map is greater than a preset segmentation threshold value, and if so, deleting the image training samples corresponding to the segmentation map from the image training sample set.
In some embodiments of the invention, the apparatus further comprises: and the automatic coding model establishing module is used for acquiring the first image training sample set and establishing an initial automatic coding model. And the automatic coding training module is used for training the initial automatic coding model by utilizing the first image training sample set so as to obtain the trained automatic coding model.
In some embodiments of the invention, the set of image training samples comprises a plurality of image training samples, and the sample set optimization module comprises: and the similarity calculation unit is used for calculating the similarity between at least two image training samples in the image training sample set by adopting a similarity measurement method. And the optimization unit is used for deleting at least one image training sample in the plurality of image training samples if the similarity value is greater than a preset similarity threshold value.
In some embodiments of the invention, the sample set optimization module further comprises: and the nearest neighbor calculation unit is used for calculating a plurality of nearest neighbor training samples of an image training sample in the image training sample set through a nearest neighbor detection algorithm. And the comparison unit is used for comparing each nearest training sample with the image training sample and obtaining a comparison result. And the second optimization unit is used for deleting the image training sample if the comparison result shows that the image training sample has a large difference with the plurality of nearest training samples.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory for storing one or more programs; a processor. The program or programs, when executed by a processor, implement the method of any of the first aspects as described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method according to any one of the first aspect described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flowchart of an image recognition model training process according to an embodiment of the present invention;
fig. 2 is a block diagram of an image recognition model training apparatus based on automatic coding according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Icon: 100-an image recognition model training device based on automatic coding; 110-a sample set acquisition module; 120-automatic coding dimension reduction module; 130-a sample set optimization module; 140-model training module; 101-a memory; 102-a processor; 103-communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the individual features of the embodiments can be combined with one another without conflict.
Referring to fig. 1, fig. 1 is a flowchart of an image recognition model training method according to an embodiment of the present invention, where the image recognition model training method based on automatic coding includes the following steps:
step S110: and acquiring an image training sample set.
Wherein, the image training sample set comprises a plurality of image training samples. In order to ensure the representativeness of each image training sample in the image training sample set, a certain amount of image training samples can be selected from a large number of training samples by a random selection method to obtain the image training sample set.
Step S120: and performing dimension reduction processing on the image training sample set by using an automatic coding model.
The image training sample set is subjected to dimensionality reduction, the problem of identifying high-dimensional image training samples can be converted into the problem of identifying characteristic expression vectors, the complexity of calculation is greatly reduced, and identification errors caused by redundant information are reduced, so that the identification precision is improved.
An automatic encoding model (AE) is an Artificial Neural network (ans) for semi-supervised learning or unsupervised learning, and functions to perform representation learning (representation learning) on input information by using the input information as a learning target. The automatic coding model comprises an encoder (encoder) and a decoder (decoder). Classified according to a learning paradigm, the automatic coding models can be classified into an implicit automatic coding model (unencoded), a regular automatic coding model (Regularized automatic encoder), and a Variational automatic coding model (VAE), in which the former two are discriminant models and the latter is a generative model. And classified according to the type of construction, the automatic coding model can be classified into a neural network of a feedforward structure or a recursive structure. The automatic coding model has a function of characterizing a learning algorithm in a general sense, and is applied to dimension reduction (dimensional reduction) and outlier detection (abnormal detection). Automatic coding models including convolutional layer construction can be applied to computer vision problems, including image denoising (image denoising), neural style transfer (neural style transfer), and the like.
Step S130: and optimizing the image training sample set subjected to the dimensionality reduction treatment to obtain an optimized image training sample set.
The image training sample set can be optimized in different modes, so that the situation that improper, unreasonable or wrong image training samples are used for training an image recognition model in the image training sample set is avoided, and the image recognition model capable of accurately recognizing images can be obtained through training.
Step S140: and training the initial image recognition model according to the optimized image training sample set to obtain a trained image recognition model.
Because the image training samples included in the optimized image training sample set are optimized, the image recognition model obtained through training of the optimized image training sample set can avoid the influence of the image training samples with overlarge differences, so that the image recognition model with high accuracy is obtained, and the accuracy of image recognition can be further ensured.
In the implementation process, firstly, the automatic coding model is used for carrying out dimension reduction processing on the image training sample set, the problem of identifying the high-dimensional image training sample can be converted into the problem of identifying the feature expression vector, the complexity of calculation is greatly reduced, and the identification error caused by redundant information is reduced. And then, optimizing the image training sample set subjected to the dimension reduction treatment, and further ensuring that an image recognition model capable of accurately recognizing images can be trained through the optimized image training sample set, so that the accuracy of image recognition is ensured.
After the steps of training the initial image recognition model according to the optimized image training sample set and obtaining the trained image recognition model are carried out, the target image can be accurately recognized from the plurality of images. For example, a library of images to be identified may be obtained first. The image library to be recognized comprises a plurality of images to be recognized. And then, identifying the image library to be identified by using the trained image identification model, and identifying a target image from the image library to be identified. The trained image recognition model is obtained by training according to the optimized image training set, and the difference between different image training samples can be considered, so that the target image can be accurately recognized from the image library to be recognized.
As another embodiment, after the trained image recognition model is used for recognizing the image library to be recognized, the trained image recognition model can be corrected according to the recognized target image, so that the accuracy of the image recognition model for recognizing the image can be further ensured. For example, the matching degree may be calculated according to the standard target image and the recognized target image, and when the calculated matching degree is too low, the recognized target image may be used as a training image to retrain the image recognition model, so as to modify the image recognition model.
In the implementation process, the trained image recognition model is obtained by training according to the optimized image training set, and the difference between different image training samples can be considered, so that the target image can be accurately recognized from the image library to be recognized.
In some embodiments of the present invention, the image training sample set includes a plurality of image training samples, and before the step of performing dimension reduction processing on the image training sample set by using the automatic coding model, the image training sample set may be preprocessed to delete redundant image training samples in the image training sample set, so as to ensure quality of samples in the image training sample set, and further ensure accuracy of identification of the trained image identification model.
For example, a watershed segmentation algorithm may be first used to segment each image training sample in the image training sample set, obtain a segmentation map corresponding to each image training sample, and then determine whether the number of segmentation regions in the segmentation map is greater than a preset segmentation threshold. If the number of the segmentation areas in the segmentation map is judged to be larger than the preset segmentation threshold, the image training samples corresponding to the segmentation map can be deleted from the image training sample set.
The watershed segmentation method is a segmentation method of mathematical morphology based on a topological theory, and the basic idea is that an image is regarded as a topological landform on geodetic science, the gray value of each point pixel in the image represents the altitude of the point, each local minimum value and an influence area of the local minimum value in the image are called as a water collecting basin, and the boundary of the water collecting basin forms a watershed. The concept and formation of watershed can be illustrated by simulating the immersion process. And (3) piercing a small hole on the surface of each local minimum value, then slowly immersing the whole model into water, wherein the influence area of each local minimum value is gradually expanded outwards along with the deepening of the immersion, and constructing a dam at the junction of two water collecting basins, namely forming a watershed.
The computation process of the watershed segmentation method is an iterative labeling process. Watershed comparison the classical calculation method is proposed by l.vincent. In this algorithm, the watershed computation takes two steps, one is a ranking process and one is a flooding process. Firstly, the gray levels of each pixel are sequenced from low to high, and then a first-in first-out (FIFO) structure is adopted to judge and mark each local minimum value in an influence domain of h-order height in the process of realizing inundation from low to high. The watershed transform obtains a catchbasin image of the input image, and boundary points between catchbasins are watershed. Clearly, the watershed represents the input image maxima points. Therefore, to obtain edge information of an image, a gradient image is usually taken as an input image. The watershed algorithm has good response to weak edges, and noise in an image and slight gray level change of the surface of an object can generate an over-segmentation phenomenon. But it should be seen that the watershed algorithm has a good response to weak edges, and is guaranteed to close continuous edges.
In some embodiments of the present invention, before the step of performing the dimension reduction processing on the image training sample set by using the automatic coding model, the automatic coding model may be obtained through sample training. For example, a first image training sample set may be obtained first, and an initial automatic coding model is established, and then the initial automatic coding model is trained by using the first image training sample set to obtain a trained automatic coding model.
When the automatic coding model is established, the neuron number of the hidden layer of the automatic coding model can be set to be smaller than that of the input layer, so that the establishment of the hidden layer can enable the change from the input layer to the hidden layer to be a dimension reduction operation essentially, the automatic coding model can try to describe original data with smaller dimensions without losing data information as much as possible, and thus, the compressed representation of the input layer can be obtained.
The image training sample set comprises a plurality of image training samples, and the image training sample set subjected to dimensionality reduction is optimized to obtain the optimized image training sample set, so that the quality of the samples in the image training sample set is guaranteed, and the accuracy of the trained image recognition model recognition is further guaranteed. An embodiment of the optimization of the image training sample set is described below.
As an embodiment, a similarity measure method may be adopted to calculate a similarity value between at least two image training samples in the image training sample set, then the similarity value is determined, and if the similarity value is greater than a preset similarity threshold, at least one image training sample in the plurality of image training samples is deleted. For example, if the similarity value between the first image training sample and the second image training sample of the image training sample set is calculated to be 0.35, the similarity value between the first image training sample and the third image training sample is calculated to be 0.25, and the preset similarity threshold is calculated to be 0.4, it is determined that the similarity values are all smaller than the preset similarity threshold, and no image is required to be deleted. For another example, if the similarity value between the first image training sample and the second image training sample of the image training sample set is calculated to be 0.5, the similarity value between the first image training sample and the third image training sample is calculated to be 0.25, and the preset similarity threshold is calculated to be 0.4, it is determined that the similarity value between the first image training sample and the second image training sample is greater than the preset similarity threshold, and the similarity value between the first image training sample and the third image training sample is smaller than the similarity threshold, and the second image training sample may be deleted from the image training sample set.
As an implementation manner, if it is determined that the similarity value is greater than the preset similarity threshold, when at least one image training sample in the plurality of image training samples is deleted, a plurality of nearest training samples of an image training sample in the image training sample set may be calculated through a nearest detection algorithm. And comparing each nearest training sample with the image training samples to obtain a comparison result, and deleting the image training samples if the comparison result shows that the image training samples have large difference with the nearest training samples.
For example, n nearest neighbor training samples of an image training sample a in the image training sample set may be calculated, where n is usually equal to 5, and then a difference between the image training sample and the n nearest neighbor training samples of the image training sample a is determined, and if there is no significant difference or only a partial difference, the image training sample a is considered to be reasonable, and may be retained in the image training sample set. If there is a significant difference between the image training sample a and the n nearest neighbor training samples of the image training sample a, the probability that the training sample is not reasonable is considered to be high, and the training sample can be deleted from the image training sample set.
Based on the same inventive concept, the present invention further provides an image recognition model training apparatus 100 based on automatic coding, please refer to fig. 2, fig. 2 is a block diagram of an image recognition model training apparatus based on automatic coding according to an embodiment of the present invention, where the image recognition model training apparatus 100 based on automatic coding includes:
a sample set obtaining module 110, configured to obtain an image training sample set.
And the automatic coding dimension reduction module 120 is configured to perform dimension reduction processing on the image training sample set by using an automatic coding model.
And the sample set optimization module 130 is configured to optimize the image training sample set subjected to the dimension reduction processing to obtain an optimized image training sample set.
And the model training module 140 is configured to train the initial image recognition model according to the optimized image training sample set to obtain a trained image recognition model.
In some embodiments of the invention, an apparatus comprises:
the image library acquisition module is used for acquiring an image library to be identified; the image library to be recognized comprises a plurality of images to be recognized.
And the recognition module is used for recognizing the image library to be recognized by utilizing the trained image recognition model and recognizing the target image from the image library to be recognized.
In some embodiments of the invention, the set of image training samples comprises a plurality of image training samples, the apparatus further comprising:
and the watershed segmentation module is used for segmenting each image training sample in the image training sample set by adopting a watershed segmentation algorithm and obtaining a segmentation map corresponding to each image training sample.
And the segmentation map judging module is used for judging whether the number of the segmentation areas in the segmentation map is greater than a preset segmentation threshold value, and if so, deleting the image training samples corresponding to the segmentation map from the image training sample set.
In some embodiments of the invention, the apparatus further comprises:
and the automatic coding model establishing module is used for acquiring the first image training sample set and establishing an initial automatic coding model.
And the automatic coding training module is used for training the initial automatic coding model by utilizing the first image training sample set so as to obtain the trained automatic coding model.
In some embodiments of the present invention, the image training sample set includes a plurality of image training samples, and the sample set optimization module 130 includes:
and the similarity calculation unit is used for calculating the similarity between at least two image training samples in the image training sample set by adopting a similarity measurement method.
And the optimization unit is used for deleting at least one image training sample in the plurality of image training samples if the similarity value is greater than a preset similarity threshold value.
In some embodiments of the present invention, the sample set optimization module 130 further comprises:
and the nearest neighbor calculation unit is used for calculating a plurality of nearest neighbor training samples of an image training sample in the image training sample set through a nearest neighbor detection algorithm.
And the comparison unit is used for comparing each nearest training sample with the image training sample and obtaining a comparison result.
And the second optimization unit is used for deleting the image training sample if the comparison result shows that the image training sample has a large difference with the plurality of nearest training samples.
Referring to fig. 3, fig. 3 is a schematic structural block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device comprises a memory 101, a processor 102 and a communication interface 103, wherein the memory 101, the processor 102 and the communication interface 103 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 101 may be used for storing software programs and modules, such as program instructions/modules corresponding to the automatic coding-based image recognition model training apparatus 100 provided in the embodiments of the present application, and the processor 102 executes the software programs and modules stored in the memory 101, so as to execute various functional applications and data processing. The communication interface 103 may be used for communicating signaling or data with other node devices.
The Memory 101 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 102 may be an integrated circuit chip having signal processing capabilities. The Processor 102 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 3 or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, the embodiment of the present application provides an image recognition model training method and apparatus based on automatic coding, and the method includes: and acquiring an image training sample set, and performing dimension reduction processing on the image training sample set by using an automatic coding model. And optimizing the image training sample set subjected to the dimensionality reduction treatment to obtain an optimized image training sample set. And training the initial image recognition model according to the optimized image training sample set to obtain a trained image recognition model. In the implementation process, firstly, the automatic coding model is used for carrying out dimension reduction processing on the image training sample set, the problem of identifying the high-dimensional image training sample can be converted into the problem of identifying the feature expression vector, the complexity of calculation is greatly reduced, and the identification error caused by redundant information is reduced. And then, optimizing the image training sample set subjected to the dimension reduction treatment, and further ensuring that an image recognition model capable of accurately recognizing images can be trained through the optimized image training sample set, so that the accuracy of image recognition is ensured.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. An image recognition model training method based on automatic coding, which is characterized by comprising the following steps:
acquiring an image training sample set;
carrying out dimension reduction processing on the image training sample set by using an automatic coding model;
optimizing the image training sample set subjected to the dimensionality reduction treatment to obtain an optimized image training sample set;
and training the initial image recognition model according to the optimized image training sample set to obtain a trained image recognition model.
2. The method of claim 1, wherein after the step of training an initial image recognition model based on the optimized set of image training samples to obtain a trained image recognition model, the method comprises:
acquiring an image library to be identified; the image library to be recognized comprises a plurality of images to be recognized;
and identifying the image library to be identified by using the trained image identification model, and identifying a target image from the image library to be identified.
3. The method of claim 1, wherein the set of image training samples includes a plurality of image training samples, and wherein prior to the step of performing the dimension reduction on the set of image training samples using the auto-coding model, the method further comprises:
segmenting each image training sample in the image training sample set by adopting a watershed segmentation algorithm, and obtaining a segmentation map corresponding to each image training sample;
and judging whether the number of the segmentation areas in the segmentation graph is larger than a preset segmentation threshold value, if so, deleting the image training samples corresponding to the segmentation graph from the image training sample set.
4. The method of claim 1, wherein prior to the step of performing the dimension reduction process on the set of image training samples using an automatic coding model, the method further comprises:
acquiring a first image training sample set, and establishing an initial automatic coding model;
and training the initial automatic coding model by using the first image training sample set to obtain a trained automatic coding model.
5. The method of claim 1, wherein the image training sample set includes a plurality of image training samples, and the step of optimizing the image training sample set after the dimension reduction processing to obtain the optimized image training sample set includes:
calculating the similarity value between at least two image training samples in the image training sample set by adopting a similarity measurement method;
and if the similarity value is larger than a preset similarity threshold value, deleting at least one image training sample in the plurality of image training samples.
6. The method of claim 5, wherein after the step of deleting at least one of the plurality of image training samples if the similarity value is greater than a preset similarity threshold, further comprising:
calculating a plurality of nearest training samples of an image training sample in the image training sample set by using a nearest detection algorithm;
comparing each nearest training sample with the image training sample to obtain a comparison result;
and if the comparison result shows that the image training samples have large difference with the nearest training samples, deleting the image training samples.
7. An automatic coding-based image recognition model training device, characterized in that the device comprises:
the sample set acquisition module is used for acquiring an image training sample set;
the automatic coding dimension reduction module is used for carrying out dimension reduction processing on the image training sample set by utilizing an automatic coding model;
the sample set optimization module is used for optimizing the image training sample set subjected to the dimensionality reduction processing to obtain an optimized image training sample set;
and the model training module is used for training the initial image recognition model according to the optimized image training sample set so as to obtain a trained image recognition model.
8. The apparatus of claim 7, wherein the apparatus comprises:
the image library acquisition module is used for acquiring an image library to be identified; the image library to be recognized comprises a plurality of images to be recognized;
and the recognition module is used for recognizing the image library to be recognized by utilizing the trained image recognition model and recognizing a target image from the image library to be recognized.
9. An electronic device, comprising:
a memory for storing one or more programs;
a processor;
the one or more programs, when executed by the processor, implement the method of any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202011043380.9A 2020-09-28 2020-09-28 Image recognition model training method and device based on automatic coding Pending CN112348049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011043380.9A CN112348049A (en) 2020-09-28 2020-09-28 Image recognition model training method and device based on automatic coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011043380.9A CN112348049A (en) 2020-09-28 2020-09-28 Image recognition model training method and device based on automatic coding

Publications (1)

Publication Number Publication Date
CN112348049A true CN112348049A (en) 2021-02-09

Family

ID=74361180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011043380.9A Pending CN112348049A (en) 2020-09-28 2020-09-28 Image recognition model training method and device based on automatic coding

Country Status (1)

Country Link
CN (1) CN112348049A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112884040A (en) * 2021-02-19 2021-06-01 北京小米松果电子有限公司 Training sample data optimization method and system, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298999A (en) * 2014-09-30 2015-01-21 西安电子科技大学 Hyperspectral feature leaning method based on recursion automatic coding
CN108256557A (en) * 2017-12-25 2018-07-06 西安电子科技大学 The hyperspectral image classification method integrated with reference to deep learning and neighborhood
CN109003267A (en) * 2017-08-09 2018-12-14 深圳科亚医疗科技有限公司 From the computer implemented method and system of the automatic detected target object of 3D rendering
CN111524600A (en) * 2020-04-24 2020-08-11 中国地质大学(武汉) Liver cancer postoperative recurrence risk prediction system based on neighbor2vec

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298999A (en) * 2014-09-30 2015-01-21 西安电子科技大学 Hyperspectral feature leaning method based on recursion automatic coding
CN109003267A (en) * 2017-08-09 2018-12-14 深圳科亚医疗科技有限公司 From the computer implemented method and system of the automatic detected target object of 3D rendering
CN108256557A (en) * 2017-12-25 2018-07-06 西安电子科技大学 The hyperspectral image classification method integrated with reference to deep learning and neighborhood
CN111524600A (en) * 2020-04-24 2020-08-11 中国地质大学(武汉) Liver cancer postoperative recurrence risk prediction system based on neighbor2vec

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HAO WU 等: "Sparse coding based few learning instances for image retrieval", 《MULTIMEDIA TOOLS AND APPLICATIONS》, vol. 78, pages 6033 - 6047, XP036754786, DOI: 10.1007/s11042-018-6301-1 *
HAO WU 等: "Weighted-learning-instance-based retrieval model using instance distance", 《MACHINE VISION AND APPLICATION》, vol. 30, pages 163 - 176, XP036710387, DOI: 10.1007/s00138-018-0988-x *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112884040A (en) * 2021-02-19 2021-06-01 北京小米松果电子有限公司 Training sample data optimization method and system, storage medium and electronic equipment
CN112884040B (en) * 2021-02-19 2024-04-30 北京小米松果电子有限公司 Training sample data optimization method, system, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109086654B (en) Handwriting model training method, text recognition method, device, equipment and medium
CN110569899A (en) Dam face defect classification model training method and device
CN111738351B (en) Model training method and device, storage medium and electronic equipment
CN110363049B (en) Method and device for detecting, identifying and determining categories of graphic elements
CN111914559B (en) Text attribute extraction method and device based on probabilistic graphical model and computer equipment
CN112966691A (en) Multi-scale text detection method and device based on semantic segmentation and electronic equipment
CN112148877A (en) Corpus text processing method and device and electronic equipment
CN113554175B (en) Knowledge graph construction method and device, readable storage medium and terminal equipment
CN115100450B (en) Intelligent traffic brand automobile big data detection method and system based on artificial intelligence
JP6892606B2 (en) Positioning device, position identification method and computer program
CN114639101A (en) Emulsion droplet identification system, method, computer equipment and storage medium
CN112348049A (en) Image recognition model training method and device based on automatic coding
CN112329810B (en) Image recognition model training method and device based on significance detection
CN112597997A (en) Region-of-interest determining method, image content identifying method and device
Freire Santana et al. Multispectral image unsupervised segmentation using watershed transformation and cross-entropy minimization in different land use
CN117009613A (en) Picture data classification method, system, device and medium
CN111177403A (en) Sample data processing method and device
CN116521899A (en) Improved graph neural network-based document-level relation extraction algorithm and system
CN111091068A (en) Density estimation model training method and device, storage medium and electronic equipment
CN116258877A (en) Land utilization scene similarity change detection method, device, medium and equipment
CN114863574A (en) Handwritten signature recognition method, device, equipment, medium and program product
CN114067314A (en) Neural network-based peanut mildew identification method and system
CN113361652A (en) Individual income prediction oriented depolarization method and device
CN113434672A (en) Text type intelligent identification method, device, equipment and medium
CN113140290A (en) Model training method and device, focus identification method and electronic equipment

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