CN112200222A - Model training apparatus - Google Patents

Model training apparatus Download PDF

Info

Publication number
CN112200222A
CN112200222A CN202011001707.6A CN202011001707A CN112200222A CN 112200222 A CN112200222 A CN 112200222A CN 202011001707 A CN202011001707 A CN 202011001707A CN 112200222 A CN112200222 A CN 112200222A
Authority
CN
China
Prior art keywords
image
sample
pox
probability
sample 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
CN202011001707.6A
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.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia Intelligent Technology 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 Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202011001707.6A priority Critical patent/CN112200222A/en
Publication of CN112200222A publication Critical patent/CN112200222A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a model training device. The model training equipment acquires a sample data set, wherein the sample data set comprises a plurality of sample images belonging to different pox types; acquiring a standard image corresponding to each pox type, wherein the standard image is used for representing the pox pattern of the pox type; calculating a class probability label of each sample image, wherein the class probability label comprises similarity information between the sample image and each standard image; training a classification network model based on the sample images and the class probability labels corresponding to the sample images to obtain a vaccinia type identification model.

Description

Model training apparatus
Technical Field
The invention relates to the technical field of computer vision, in particular to model training equipment.
Background
With the rapid development of mobile communication technology and the improvement of the living standard of people, various intelligent terminals are widely applied to daily work and life of people, so that people are more and more accustomed to using terminal application programs, the APP requirements of functions of beautifying, self-timer, photographing and skin measurement are more and more, the analysis on the face pockmarks condition is greatly required, and a skin improvement scheme can be pertinently proposed or inquired according to the types of the pockmarks.
However, the area of the vaccinia is small, and the distinguishable characteristics among different classes are not obvious, so that the accuracy of recognizing the vaccinia types is low at present.
Disclosure of Invention
The application provides a model training device to solve the technical problem that identification of the pox types is inaccurate in the prior art.
A model training device is provided that includes a memory and one or more processors to execute one or more computer programs stored in the memory; the one or more computer programs are stored in the memory; the one or more processors, when executing the one or more computer programs, perform the steps of:
acquiring a sample data set, wherein the sample data set comprises a plurality of sample images belonging to different pox types;
acquiring a standard image corresponding to each pox type, wherein the standard image is used for representing the pox pattern of the pox type;
calculating a class probability label of each sample image, wherein the class probability label comprises a similarity probability between the sample image and each standard image;
training a classification network model based on the sample images and the class probability labels corresponding to the sample images to obtain a vaccinia type identification model.
The technical scheme has the following beneficial effects:
the method comprises the steps of obtaining a sample data set, obtaining a standard image corresponding to each pox type, obtaining a category probability label of each sample image, wherein the standard image is used for representing the pox type of the pox type, calculating the category probability label of each sample image, the category probability label comprises similarity information between the sample image and each standard image, training a classification network model based on each sample image and the category probability label corresponding to each sample image, obtaining a pox type identification model, and accurately identifying the pox type. In the traditional classification label mode, the classification accuracy is not high, and in the application, the similarity information between the sample image and each standard image is adopted for labeling during model training, so that the similarity degree between the types can be reflected on the label, the probability of the pox type label is realized, the model can learn the similar characteristics between the pox types, and the recognition accuracy of the pox type is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a hardware structure diagram of a model training device according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a training method of a pox recognition model according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a method for training a pox type recognition model according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, 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 only a part of the embodiments of the present application, and not all of the embodiments. 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.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Neural Networks (NN) referred to in the embodiments of the present application are complex network systems formed by widely interconnecting a large number of simple processing units (called neurons), reflect many basic features of human brain functions, and are highly complex nonlinear dynamical learning systems. The neural network has the capabilities of large-scale parallel, distributed storage and processing, self-organization, self-adaptation and self-learning, and is particularly suitable for processing inaccurate and fuzzy information processing problems which need to consider many factors and conditions simultaneously.
Convolutional Neural Networks (CNN) are a class of feed forward Neural Networks (fed forward Neural Networks) that contain convolution computations and have a deep structure, and are one of the representative algorithms for deep learning (deep learning).
The embodiments of the present application will be described below with reference to the drawings.
Referring to fig. 1, fig. 1 is a hardware structure diagram of a model training device according to an embodiment of the present disclosure, wherein the model training device 100 may be any type of electronic device with computing capability, for example: smart phones, computers, palmtop computers, tablet computers, and the like.
Specifically, as shown in FIG. 1, the model training apparatus 100 includes one or more processors 102 and memory 104. One processor 102 is illustrated in fig. 1. The processor 102 and the memory 104 may be connected by a bus or other means, such as by a bus in FIG. 1.
The memory 104 is a non-volatile computer readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer executable programs, and modules, such as programs, instructions, and modules corresponding to the training method of the vaccinia type recognition model. The processor 102 executes various functional applications and data processing of the electronic device by executing non-volatile software programs, instructions, and modules stored in the memory 104.
The memory 104 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the model training apparatus, and the like. Further, the memory 104 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 104 optionally includes memory located remotely from processor 102, which may be connected to the model training device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The model training device in the embodiment of the invention is used for training the pox type recognition model to obtain a model for detecting the pox type in the image. The memory 104 is used for storing a computer implemented program of the training method of the vaccinia type recognition model, and the processor 102 is used for reading and executing computer readable instructions. In particular, processor 102 may be configured to invoke a computer-implemented program of a training method for a vaccinia type recognition model stored in memory 104 and execute instructions contained in the computer-implemented program to perform method steps related to the training method for the vaccinia type recognition model. The method steps of the training method for the pox recognition model executed by the processor 102 can be referred to the following description of fig. 2 or fig. 3.
Referring to fig. 2, fig. 2 is a schematic flow chart of a training method for a pox recognition model according to an embodiment of the present application. The method can comprise the following steps:
201. and acquiring a sample data set, wherein the sample data set comprises a plurality of sample images belonging to different pox types.
Specifically, the sample data set may be constructed first. The sample data set may include sample images of different application scenarios, different shooting qualities, and different pox types. The acne may be acne, erythema, inflammatory papule, pustule, nodule, cyst, etc.
In one embodiment, the method comprises:
acquiring a plurality of image data containing pox, wherein the pox belongs to different categories;
and carrying out normalization processing on the plurality of image data to obtain a plurality of sample images with preset sizes, and obtaining the sample data set.
Because the pox image is small, normalization operation can be firstly carried out on image data, and the size of the image is set to be a preset size so as to accurately carry out subsequent processing.
202. And acquiring a standard image corresponding to each vaccinia type, wherein the standard image is used for representing the vaccinia pattern of the vaccinia type.
Specifically, one standard image corresponding to each pox type may be set in advance. Optionally, the standard image may be selected from the collected data set of the pox types, and the standard image may be used as a representative pattern image corresponding to the pox types and as a contrast reference image for classifying other processed images.
For example, the pox types can include six types of acne, post-comma erythema, inflammatory papules, pustules, nodules, and cysts, and then standard six pox type images are selected, which can be expressed as:
Figure BDA0002694561710000051
203. calculating a class probability label of each sample image, wherein the class probability label includes similarity information between the sample image and each standard image.
Specifically, similarity measurement can be performed on any sample image and a standard image to generate a class probability label of the sample image, wherein similarity information can consider similarity of characteristics such as image brightness, contrast, structure and the like, similarity evaluation values of all aspects can be calculated according to a preset calculation rule and integrated into a probability value, and the probability that a sample image belongs to a pox type corresponding to the standard image can be reflected.
In one embodiment, the step 203 may include:
calculating a similarity probability between the sample image and each of the standard images for any one of the sample images;
acquiring an artificial label of the sample image, wherein the artificial label is used for marking the pox type of the sample image;
and generating the category probability label of the sample image according to the artificial label of the sample image and the similarity probability.
The artificial label of the sample image may be the result of artificial calibration, and the probability value in the artificial label is 1 or 0, which indicates whether the sample image belongs to a certain vaccinia type: 1 means belonging, and 0 means not belonging. For example, the pox type includes six types of acne, post-comma erythema, inflammatory papule, pustule, nodule, and cyst, and the categories in the artificial label are also arranged in this order, and assuming that the sample image x artificial label is determined as inflammatory papule, the artificial label may be represented as Ta ═ 0,0,1,0, 0.
In the embodiment of the application, because many same characteristics exist among vaccinia types, when setting the label, the artificial label and the similarity probability can be combined to set a new class probability label of the sample image.
204. And training a classification network model based on the sample images and the class probability labels corresponding to the sample images to obtain a pox type identification model.
After the class probability labels of the sample images are determined, the constructed classification network model can be trained according to the sample data set labeled by the class probability labels until a preset loss function is converged, and the pox type identification model is obtained.
In an alternative embodiment, the classification network model may be constructed as follows:
the feature extraction structure in the model mainly comprises a convolutional layer, an upsampling layer, a full connection layer and a softmax layer, and the network structure is shown in table 1:
Layer Input Operator c s
1 56*56*3 Conv2d(3*3) 32 2
2 28*28*32 Conv2d(3*3) 32 1
3 28*28*32 Up_downing 32 1
4 56*56*32 Conv2d(3*3) 64 1
5 56*56*64 Conv2d(3*3) 128 2
7 28*28*128 Conv2d(3*3) 256 2
9 14*14*256 Conv2d(3*3) 256 2
10 7*7*256 Conv2d(1*1) 512 1
11 7*7*512 FC - -
13 1*1*n softmax - _
TABLE 1
In Table 1 above, c represents the number of channels outputted, s represents the step size, and n represents the number of vaccinia types.
The effect of the convolution layers of the network structures 1, 2 and 4-10 layers is to extract features; the 3 rd layer is an upper sampling layer and mainly expands the size of the features, so that the network structure can be deepened, and the network can further extract deep semantic features; the 11 th layer is a full-connection layer, and is mainly used for integrating the features in the image feature map passing through a plurality of convolution layers and pooling layers, acquiring the high-level meaning of the image features and then classifying the images. In the convolutional neural network, the fully-connected layer maps the feature map generated by the convolutional layer into a feature vector with a fixed length (generally, the number of image categories in the input image data set), the feature vector contains the combination information of all features of the input image, and although the position information of the image is lost, the vector reserves the image features with the most features in the image, thereby completing the image classification task. Through the combination of above-mentioned convolution layer, upper sampling layer and full articulamentum, can fully and rationally extract image feature at training process and identification process to help obtaining the model of accurate discernment smallpox, help promoting the precision of smallpox discernment.
Optionally, the classification network model structure may be replaced by a proposed feature extraction structure, for example, a mobiline structure, a VGG structure, or the like, which may be set as needed, and this is not limited in this embodiment of the present application.
Further optionally, the method further comprises:
acquiring an pox image to be processed;
processing the pox image to be processed by adopting the pox type identification model to obtain the probability that the pox image to be processed belongs to different pox types; determining the pox type corresponding to the pox image to be processed according to the probability;
and outputting the pox types corresponding to the pox images to be processed.
The above steps may be performed after step 204, and the trained pox type recognition model may be obtained through the above steps 201 to 204, and then applied to the above processing steps. I.e. the model obtained after training, may also be used in other devices to perform the above processing steps, which is not limited herein.
The image of the pox to be processed can be a shot image containing the pox, and can be any skin image containing the pox, such as a face image containing the pox. The acquired image can be preprocessed by clipping and the like to obtain the standardized pox image to be processed so as to identify the type of the pox.
In the embodiment of the application, the obtained pox type recognition model can be used for processing the pox image to be processed. Specifically, the probability that the to-be-processed pox image belongs to different pox types can be obtained through prediction, the pox type with the maximum probability is determined to be the pox type corresponding to the to-be-processed pox image, and then the pox type corresponding to the to-be-processed pox image is output.
According to the identification method and the identification device, a sample data set is obtained, the sample data set comprises a plurality of sample images belonging to different pox types, a standard image corresponding to each pox type is obtained, the standard image is used for representing the pox type of one pox type, the class probability label of each sample image is calculated, the class probability label comprises the similarity probability between the sample image and each standard image, a classification network model is trained on the basis of the class probability labels corresponding to the sample images and the sample images, the pox type identification model is obtained, and the pox types can be identified more accurately. In the traditional classification label mode, the classification accuracy is not high, and in the application, the similarity probability between the sample image and each standard image is adopted for labeling during model training, so that the similarity degree between the types can be reflected on the label, the probability of the pox type label is realized, the model can learn the similar characteristics between the pox types, and the recognition accuracy of the pox type is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart of another training method for a vaccinia type recognition model according to an embodiment of the present application. As shown in fig. 3, the method may specifically include:
301. and acquiring a sample data set, wherein the sample data set comprises a plurality of sample images belonging to different pox types.
302. And acquiring a standard image corresponding to each vaccinia type, wherein the standard image is used for representing the vaccinia pattern of the vaccinia type.
Step 301 and step 302 may refer to step 201 and step 202 in the embodiment shown in fig. 1, respectively, and are not described herein again.
303. And acquiring a brightness evaluation value, a contrast evaluation value and a structure evaluation value between the sample image and any one of the standard images.
Specifically, for any sample image x, the luminance evaluation value, the contrast evaluation value, and the structure evaluation value between the sample image x and each standard image y may be calculated respectively to obtain a structure similarity value representing the structural similarity between the two images.
The Structural SIMilarity (SSIM) involved in the embodiments of the present application is an index for measuring the SIMilarity between two images. The structural similarity ranges from 0 to 1, with SSIM equal to 1 when the two images are identical.
As an implementation of the structural similarity theory, the structural similarity index defines structural information from the perspective of image composition as being independent of brightness and contrast, reflects attributes of object structures in a scene, and models distortion as a combination of three different factors of brightness, contrast, and structure. The mean can be used as an estimate of the luminance, the standard deviation as an estimate of the contrast, and the covariance as a measure of the degree of structural similarity.
Specifically, the luminance evaluation value r, the contrast evaluation value c, and the structure evaluation value s between the sample image x and any one of the standard images y can be obtained according to the following formulas:
Figure BDA0002694561710000081
Figure BDA0002694561710000082
Figure BDA0002694561710000083
wherein, muxIs the mean value, mu, of the pixel values of the pixels of the sample image xyIs the mean value, sigma, of pixel values of each pixel point of the standard image yxIs the variance value, sigma, of the pixel values of the pixels of the sample image xyIs the variance value, sigma, of the pixel values of each pixel point of the standard image yxyThe covariance value of the pixel values of the sample image x and the standard image y; c. C1=(k1·L)2,c2=(k2·L)2L is the range of pixel values in the sample image, k1And k above2Is a preset constant.
The brightness evaluation value, the contrast evaluation value, and the texture evaluation value referred to in the SSIM indicate differences in brightness, contrast, and texture of two images, respectively, and the similarity is closer as the evaluation values are larger, and the similarity is closer as the SSIM is larger.
304. And obtaining a structural similarity value between the sample image and the any one of the standard images based on the brightness evaluation value, the contrast evaluation value, and the structural evaluation value to obtain a structural similarity value between the sample image and each of the standard images.
In one embodiment, the structural similarity value SSIM between the sample image x and the standard image y can be expressed as:
SSIM(x,y)=r(x,y)×c(x,y)×s(x,y);
the structural similarity value may indicate the similarity between the sample image x and the standard image to some extent. The larger the SSIM value, the smaller the difference between the images x, y.
305. And obtaining the ratio of the structural similarity value between the sample image and each standard image in the total structural similarity value as the similarity probability between the sample image and each standard image.
After the structural similarity values of the sample picture x and each standard image are calculated respectively, the occupation ratio Tbi of the structural similarity value corresponding to each category in the total structural similarity value can be calculated.
Specifically, it can be expressed as:
Figure BDA0002694561710000091
wherein n represents the number of the above mentioned vaccinia types.
The ratio Tbi of each category may be used as a probability distribution in the category probability labels, and the category probability label corresponding to the sample image is obtained, for example, when there are 6 pox types, n is 6, and then the available category probability labels Tb is [ Tb1, Tb2, Tb3, Tb4, Tb5, Tb6 ].
Because the traditional classification label mode is not enough to reflect the similarity degree between images of different pox types, more information with obvious attention characteristics is trained by the model, and the accuracy of model identification is low, the probability of the pox type label is changed by the SSIM structure similarity algorithm, the similarity degree between the image and each type can be reflected from the label, and then the loss function is adopted for training, so that the model can better learn the similar characteristics between different types in the training process, and the aim of improving the accuracy of the pox type identification is fulfilled.
306. And acquiring an artificial label of the sample image, wherein the artificial label is used for marking the pox type of the sample image.
The manual label of the sample image is a result of manual calibration, and may be a label carried in the existing sample data set. The probability value in the artificial label is 1 or 0, which indicates whether the artificial label belongs to a certain vaccinia type: 1 means belonging, and 0 means not belonging. For example, the pox type includes six types of acne, post-comma erythema, inflammatory papule, pustule, nodule, and cyst, and the categories in the artificial label are also arranged in this order, and assuming that the sample image x artificial label is determined as inflammatory papule, the artificial label may be represented as Ta ═ 0,0,1,0, 0.
307. And generating the category probability label of the sample image according to the artificial label of the sample image and the similarity probability.
In an optional implementation manner, the artificial label of the sample image and the similarity probability may be weighted according to a preset weight, so as to obtain the category probability label of the sample image.
Specifically, the class probability label of the sample image may be set in a probability distribution manner. The probability distribution of the class probability labels can be composed of two parts, one part is an artificial label Ta of an artificial calibration result, the other part is a similarity probability Tb adopting a structural similarity value, the preset weights can be set as a and b (a and b are both greater than 0 and less than 1 and can be the same), and the probability distribution in the class probability labels of the sample images is T ═ a × Ta + b @. For example, if the weight values of Ta and Tb are both 0.5, T is 0.5Ta +0.5 Tb. Assuming that Ta is [0,0,1,0,0,0],
tb ═ 0.12,0.2,0.48,0.1,0.1,0.1], then:
T=0.5*[0,0,1,0,0,0]+0.5*[0.12,0.2,0.48,0.1,0.1,0.1]
=[0.06,0.1,0.74,0.05,0.05]。
through the steps, the category probability label corresponding to each sample image can be obtained.
308. And training a classification network model based on the sample images and the class probability labels corresponding to the sample images to obtain a pox type identification model.
Step 308 may refer to step 204 in the embodiment shown in fig. 2, which is not described herein again.
In the embodiment of the present application, for tag probabilistic, an SSIM structural similarity algorithm is used for calculation, and in an optional implementation, other calculation manners capable of achieving the same purpose may be used, that is, the similarity information may set a calculation rule as needed, which is not limited in the embodiment of the present application.
Specifically, the step 308 includes:
inputting each sample image and the class probability label corresponding to each sample image into the classification network model, and outputting a prediction classification result of the sample image;
and calculating the prediction classification result of each sample image and the loss value of the class probability label by adopting a loss function, and adjusting the network parameters of the classification network model according to the loss value until the classification network model converges to obtain the pox type identification model.
In one embodiment, a KL divergence loss function may be employed as the loss function described above.
The KL divergence (Kullback-Leibler divergence), which is a relative entropy (information entropy), referred to as information divergence, involved in the embodiments of the present application is an asymmetry measure of the difference between two probability distributions.
Specifically, the KL divergence loss function used in the embodiment of the present application may be:
Figure BDA0002694561710000111
wherein, T is the class probability label, and P is the predicted classification result of the softmax layer of the classification network model; z represents the number of the sample images, and n represents the number of the types of vaccinia. For example, assuming that n is 6, the probability distribution in the prediction classification result output by the softmax layer may be represented as P ═ P1,P2,P3,P4,P5,P6]And the probability distribution of the true class probability label is represented as T ═ T1,T2,T3,T4,T5,T6]And substituting P and T into the KL divergence loss function to calculate a loss value, adjusting network parameters according to the loss value, and repeatedly executing the steps until the model is converged to finish training.
Further optionally, the classification network model may select an optimization algorithm of the model according to needs, for example, an Adam algorithm is used to optimize model parameters. Iteration times limit convergence conditions can be set, that is, iteration training can be performed according to preset parameters such as iteration times, learning rate and weight attenuation, so that the loss function is converged, and a trained pox type recognition model is obtained after training is completed. For example, the number of iterations may be set to 500, the initial learning rate may be set to 0.001, and the weight attenuation may be set to 0.0005, and the learning rate may be attenuated to 1/10 every 50 iterations.
By adopting the KL divergence loss function, the probability advantages of the labels can be better utilized, so that the model can better learn the similar characteristics among different categories.
According to the training method of the vaccinia type recognition model in the embodiment of the application, the used vaccinia type recognition model combines the class probability label of the sample image and the artificially labeled information as the label, the class probability label is generated according to the similarity probability of the sample image and each standard image, the similarity degree between the classes can be reflected on the label, the vaccinia type label is subjected to probability instead of simple judgment on which class is the class or not, so that the model can learn the similar characteristics between the vaccinia types, and the vaccinia type corresponding to the image can be recognized more accurately in application.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the division of the module is only one logical division, and other divisions may be possible in actual implementation, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. The shown or discussed mutual coupling, direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some interfaces, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a read-only memory (ROM), or a Random Access Memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a Digital Versatile Disk (DVD), or a semiconductor medium, such as a Solid State Disk (SSD).

Claims (7)

1. A model training apparatus comprising memory and one or more processors to execute one or more computer programs stored in the memory; the one or more computer programs are stored in the memory; the one or more processors, when executing the one or more computer programs, perform the steps of:
acquiring a sample data set, wherein the sample data set comprises a plurality of sample images belonging to different pox types;
acquiring a standard image corresponding to each pox type, wherein the standard image is used for representing the pox pattern of the pox type;
calculating a class probability label of each sample image, wherein the class probability label comprises similarity information between the sample image and each standard image;
training a classification network model based on the sample images and the class probability labels corresponding to the sample images to obtain a vaccinia type identification model.
2. The apparatus according to claim 1, wherein the processor, in performing the step of calculating the class probability label of each of the sample images, specifically performs the following steps:
calculating the similarity probability between any sample image and each standard image;
obtaining an artificial label of the sample image, wherein the artificial label is used for marking the pox type of the sample image;
and generating the category probability label of the sample image according to the artificial label of the sample image and the similarity probability.
3. The apparatus according to claim 2, wherein the processor, in performing the step of calculating the similarity probability between the sample image and each of the standard images, specifically performs the following steps:
acquiring a brightness evaluation value, a contrast evaluation value and a structure evaluation value between the sample image and any one of the standard images;
obtaining a structural similarity value between the sample image and the any one standard image according to the brightness evaluation value, the contrast evaluation value and the structural evaluation value to obtain a structural similarity value between the sample image and each standard image;
and acquiring the ratio of the structural similarity value between the sample image and each standard image in the total structural similarity value as the similarity probability between the sample image and each standard image.
4. The apparatus of claim 2, wherein the processor, during the step of generating the class probability label of the sample image according to the artificial label of the sample image and the similarity probability, specifically performs the following steps:
and weighting the artificial label of the sample image and the similarity probability according to a preset weight to obtain the category probability label of the sample image.
5. The device according to any one of claims 1 to 4, wherein the processor, in performing the step of training a classification network model based on the sample images and the class probability labels corresponding to the sample images to obtain a vaccinia type identification model, specifically performs the following steps:
inputting each sample image and the class probability label corresponding to each sample image into the classification network model, and outputting a prediction classification result of the sample image;
and calculating the prediction classification result of each sample image and the loss value of the class probability label by adopting a loss function, and adjusting the network parameters of the classification network model according to the loss value until the classification network model converges to obtain the vaccinia type identification model.
6. The device according to any of claims 1-4, wherein said processor, during said step of obtaining a sample data set, is further configured to perform the following steps:
acquiring a plurality of image data containing pockmarks, the pockmarks belonging to different categories;
and carrying out normalization processing on the plurality of image data to obtain a plurality of sample images with preset sizes, and obtaining the sample data set.
7. The apparatus of claim 1, wherein the processor is further configured to perform the steps of:
acquiring an pox image to be processed;
processing the pox image to be processed by adopting the pox type identification model to obtain the probability that the pox image to be processed belongs to different pox types; determining the pox type corresponding to the pox image to be processed according to the probability;
and outputting the pox types corresponding to the pox images to be processed.
CN202011001707.6A 2020-09-22 2020-09-22 Model training apparatus Pending CN112200222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011001707.6A CN112200222A (en) 2020-09-22 2020-09-22 Model training apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001707.6A CN112200222A (en) 2020-09-22 2020-09-22 Model training apparatus

Publications (1)

Publication Number Publication Date
CN112200222A true CN112200222A (en) 2021-01-08

Family

ID=74015843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001707.6A Pending CN112200222A (en) 2020-09-22 2020-09-22 Model training apparatus

Country Status (1)

Country Link
CN (1) CN112200222A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733849A (en) * 2021-01-11 2021-04-30 浙江智慧视频安防创新中心有限公司 Model training method, image rotation angle correction method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733849A (en) * 2021-01-11 2021-04-30 浙江智慧视频安防创新中心有限公司 Model training method, image rotation angle correction method and device

Similar Documents

Publication Publication Date Title
CN109543627B (en) Method and device for judging driving behavior category and computer equipment
WO2020228446A1 (en) Model training method and apparatus, and terminal and storage medium
CN110197146B (en) Face image analysis method based on deep learning, electronic device and storage medium
CN108960090B (en) Video image processing method and device, computer readable medium and electronic equipment
CN108280477B (en) Method and apparatus for clustering images
CN107679466B (en) Information output method and device
CN115410050B (en) Tumor cell detection equipment based on machine vision and method thereof
CN113919442B (en) Tobacco maturity state identification method based on convolutional neural network
CN110705489B (en) Training method and device for target recognition network, computer equipment and storage medium
CN111126481A (en) Training method and device of neural network model
CN112052868A (en) Model training method, image similarity measuring method, terminal and storage medium
CN113449704B (en) Face recognition model training method and device, electronic equipment and storage medium
CN107590460A (en) Face classification method, apparatus and intelligent terminal
CN113065525A (en) Age recognition model training method, face age recognition method and related device
CN111340213B (en) Neural network training method, electronic device, and storage medium
CN113034514A (en) Sky region segmentation method and device, computer equipment and storage medium
CN110738702B (en) Three-dimensional ultrasonic image processing method, device, equipment and storage medium
CN110503148B (en) Point cloud object identification method with scale invariance
CN112052730A (en) 3D dynamic portrait recognition monitoring device and method
CN111507288A (en) Image detection method, image detection device, computer equipment and storage medium
CN112287957A (en) Target matching method and device
CN114359787A (en) Target attribute identification method and device, computer equipment and storage medium
CN113780145A (en) Sperm morphology detection method, sperm morphology detection device, computer equipment and storage medium
CN114219936A (en) Object detection method, electronic device, storage medium, and computer program product
CN112200222A (en) Model training apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210108