CN110503154A - Method, system, electronic equipment and the storage medium of image classification - Google Patents

Method, system, electronic equipment and the storage medium of image classification Download PDF

Info

Publication number
CN110503154A
CN110503154A CN201910793262.0A CN201910793262A CN110503154A CN 110503154 A CN110503154 A CN 110503154A CN 201910793262 A CN201910793262 A CN 201910793262A CN 110503154 A CN110503154 A CN 110503154A
Authority
CN
China
Prior art keywords
image
classification
training
disaggregated model
training set
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
CN201910793262.0A
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.)
Ctrip Computer Technology Shanghai Co Ltd
Original Assignee
Ctrip Computer Technology Shanghai 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 Ctrip Computer Technology Shanghai Co Ltd filed Critical Ctrip Computer Technology Shanghai Co Ltd
Priority to CN201910793262.0A priority Critical patent/CN110503154A/en
Publication of CN110503154A publication Critical patent/CN110503154A/en
Pending legal-status Critical Current

Links

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/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

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

Abstract

The invention discloses a kind of method of image classification, system, electronic equipment and storage mediums, wherein method includes: acquisition target data set;It divides target data set and obtains training set and test set;The classification of image in training set is labeled;Image disaggregated model is constructed based on convolutional neural networks;It is input with the image in training set, is output, training image disaggregated model with the classification of the image in the training set of input;The accuracy rate of housebroken image classification model is tested using test set;Whether judging nicety rate is greater than preset threshold;If so, carrying out image classification using housebroken image classification model;If it is not, then utilizing training set described in the image update in the test set, and the step of going to trained described image disaggregated model.The present invention utilizes deep learning training image disaggregated model, realizes the automatic classification of image, from carrying out feature extraction manually, can be improved the efficiency of image classification.

Description

Method, system, electronic equipment and the storage medium of image classification
Technical field
The present invention relates to field of computer technology more particularly to a kind of method of image classification, system, electronic equipment and deposit Storage media.
Background technique
Image is a kind of direct, efficient ways of presentation.For example, in OTA (Online Travel Agency, online trip Row society) in industry, hotel's image has extremely important influence for user experience, order conversion, specifically, by hotel Image is classified, and user, can be according to the classification of interested hotel's image (for example, outside hotel when browsing hotel's image Sight, room facilities, Food Outlets, leisure facilities, peripheral facility, public domain etc.) the such hotel's image of online browse, to be promoted User experience simultaneously improves order conversion ratio.But is depended on by traditional classifier, is needed manually for the classification of image at present Feature is extracted, there are stronger metempirics, model generalization can be poor, and robustness is low, it is difficult to meet growing image classification Demand.
Summary of the invention
The technical problem to be solved by the present invention is to realize image point to overcome to extract based on manual feature in the prior art The defect of class provides method, system, electronic equipment and the storage medium of a kind of image classification.
The present invention is to solve above-mentioned technical problem by following technical proposals:
A kind of method of image classification, it is characterized in that, which comprises
Obtain the target data set including several images;
It divides the target data set and obtains training set and test set;
The classification of image in the training set is labeled;
Image disaggregated model is constructed based on convolutional neural networks;
It is input with the image in the training set, is output, instruction with the classification of the image in the training set of input Practice described image disaggregated model;
The accuracy rate of housebroken described image disaggregated model is tested using the test set;
Judge whether the accuracy rate is greater than preset threshold;
If so, carrying out image classification using housebroken described image disaggregated model;
If it is not, then using training set described in the image update in the test set, and go to the trained described image point The step of class model.
Preferably, the step of training set described in the image update using in the test set, includes:
The classification of the image of false negative and false positive in the test set is labeled;
The training set is added in image in the test set through marking.
Preferably, after the acquisition includes the steps that the target data set of several images, the method also includes:
The image concentrated to the target data pre-processes;
Wherein, the pretreatment includes normalized;
And/or
Before the trained described image disaggregated model the step of, the method also includes:
Operation is changed to the image in the training set through marking;
The training set is added in the altered obtained image that operates;
Wherein, the change operation include addition noise, it is Random-Rotation, affine transformation, flip horizontal, flip vertical, bright At least one of degree variation, contrast variation;
And/or
It is described based on convolutional neural networks building image disaggregated model the step of include:
The objective function of described image disaggregated model is constructed according to the following formula:
BL(pt)=- α (1-pt)γlog(pt)
Wherein, BL is used to characterize the classification of image, p for characterizing objective function, ttFor characterizing different classes of classification Probability, γ, α are hyper parameters, also, γ > 0, α ∈ (0,1).
Preferably, the step of building image disaggregated model based on convolutional neural networks, includes:
Obtain the public data collection including several images for having marked classification;
Image disaggregated model is constructed based on convolutional neural networks;
It is input with the image that the public data is concentrated, the classification for the image concentrated with the public data of input is Output, pre-training described image disaggregated model;
The step of trained described image disaggregated model includes:
The pre-trained described image disaggregated model of training.
Preferably, the step of training pre-trained described image disaggregated model, includes:
Keep the partial parameters of pre-trained described image disaggregated model constant, using adaptive moment Estimation Optimization device The pre-trained described image disaggregated model of training.
A kind of electronic equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, it is characterized in that, the processor realizes the side of any of the above-described kind of image classification when executing the computer program Method.
A kind of computer readable storage medium, is stored thereon with computer program, it is characterized in that, the computer program The step of method of any of the above-described kind of image classification is realized when being executed by processor.
A kind of system of image classification, it is characterized in that, the system comprises:
Module is obtained, for obtaining the target data set including several images;
Division module obtains training set and test set for dividing the target data set;
Labeling module is labeled for the classification to image in the training set;
Module is constructed, for constructing image disaggregated model based on convolutional neural networks;
Training module, for being input with the image in the training set, with the image in the training set of input Classification is output, training described image disaggregated model;
Test module, for testing the accuracy rate of housebroken described image disaggregated model using the test set;
Judgment module, for judging whether the accuracy rate is greater than preset threshold;
If so, calling application module, the application module is used to carry out using housebroken described image disaggregated model Image classification;
If it is not, then calling update module, the update module is used to expand the instruction using the image in the test set Practice collection.
Preferably, the update module includes:
Unit is marked, is labeled for the classification to the image of false negative and false positive in the test set;
Adding unit, for the training set to be added in the image in the test set through marking.
Preferably, the system also includes:
Preprocessing module, the image for concentrating to the target data pre-process;
Wherein, the pretreatment includes normalized;
And/or
The system also includes:
Enlargement module, specifically for changing operation to the image in the training set through marking, and by altered operation The training set is added in obtained image;
Wherein, the change operation include addition noise, it is Random-Rotation, affine transformation, flip horizontal, flip vertical, bright At least one of degree variation, contrast variation;
And/or
The building module is specifically used for constructing the objective function of described image disaggregated model according to the following formula:
BL(pt)=- α (1-pt)γlog(pt)
Wherein, BL is used to characterize the classification of image, p for characterizing objective function, ttFor characterizing different classes of classification Probability, γ, α are hyper parameters, also, γ > 0, α ∈ (0,1).
The positive effect of the present invention is that: the present invention utilizes deep learning training image disaggregated model, realizes image Automatic classification, can be improved the efficiency of image classification, meet growing image classification demand, from carrying out feature manually It extracts, reduces cost of labor.
Detailed description of the invention
Fig. 1 is the flow chart according to the method for the image classification of the embodiment of the present invention 1.
Fig. 2 is the hardware structural diagram according to the electronic equipment of the embodiment of the present invention 2.
Fig. 3 is the flow chart according to the method for the image classification of the embodiment of the present invention 4.
Fig. 4 is the module diagram according to the system of the image classification of the embodiment of the present invention 7.
Fig. 5 is the module diagram according to the system of the image classification of the embodiment of the present invention 8.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the reality It applies among a range.
Embodiment 1
The present embodiment provides a kind of method of image classification, Fig. 1 shows the flow chart of the present embodiment.Referring to Fig.1, this reality The method for applying example includes:
S101, the target data set including several images is obtained.
The method of the present embodiment can be adapted for classifying to hotel's image in OTA, specifically, in the present embodiment Target data set may include hotel's image in numerous hotels in OTA, wherein hotel's image can cover hotel's appearance, room The image of facility, Food Outlets, leisure facilities, peripheral facility, public domain etc..
To make the gradient during model training improve the effect of model training towards minimum value always to accelerate to restrain Rate, after obtaining target data set, the image that can also be concentrated to target data be pre-processed, wherein pretreatment can be with Including image is normalized.In the present embodiment, minimax normalization operation can be carried out to image, specifically Ground, the pixel value x for the pixel value x of pixel each in image, after its normalization can be calculated using following formula:
Wherein, xmaxIt is the max pixel value of pixel in image, xminIt is the minimum pixel value of pixel in image.
S102, division target data set obtain training set and test set.
In this step, can according to actual needs, according to a certain percentage, divide target data set with obtain training set and Test set.
S103, the classification of image in training set is labeled.
In this step, can be according to preset classification, such as hotel's appearance, room facilities, Food Outlets, leisure are set It applies, peripheral facility, public domain etc., to mark the classification of image in training set.
Since deep learning needs the data largely marked to be iterated training, to fight over-fitting, but wine in OTA The limited amount of shop image can also change operation to expand training set to the image in the training set through marking, then Training set is added in the altered obtained image that operates, so while generation enough training datas, can also be saved Cost is marked, the robustness of institute's training pattern is improved, wherein change operation may include addition noise, Random-Rotation, affine change Change, flip horizontal, flip vertical, brightness change, contrast variation at least one of.
For example, obtaining image P after adding noise into image P for the image P in training set1, after Random-Rotation image P Obtain image P2, Random-Rotation image P1Image P is obtained afterwards3, on the basis of image P, produce and mark identical image with image P P1、P2And P3, realize the expansion of training set.
S104, image disaggregated model is constructed based on convolutional neural networks.
In this step, can with the network structure of designed image disaggregated model, for example, image classification model except input and it is defeated It can also include inputting convolutional layer, 30 residual blocks and full articulamentum being made of the 3*3 convolution kernel of 2 stackings except out, Total 62 layers of network structure.
Further, the building of image classification model can also include the building of its objective function, for example, can use Cross-entropy loss (cross entropy loss function) or balance loss (balanced double-rope) constructs target letter Number.Specifically he, in the present embodiment, using the balance that can alleviate training data imbalance problem to a certain extent Loss constructs objective function, and the objective function of building is as shown in following formula:
BL(pt)=- α (1-pt)γlog(pt)
Wherein, BL is used to characterize the classification of image, p for characterizing objective function, ttFor characterizing different classes of classification Probability, γ are the hyper parameters for reducing the easily loss of classification image, and α is the hyper parameter for balancing amount of images, and is had, γ > 0, α ∈ (0,1).
S105, with the image in training set be input, with the classification of the image in the training set of input be output, training figure As disaggregated model.
In the present embodiment, it can be restrained based on the value of back-propagation algorithm training image disaggregated model to objective function, In this way, being basically completed the training of image classification model.
S106, the accuracy rate that housebroken image classification model is tested using test set.
In this step, after the image in test set being inputted trained obtained image classification model, image classification Model accordingly exports the corresponding classification of the image, in this way, by comparing the concrete class and image point of all images in test set The classification of class model output, carrys out the accuracy rate of test image disaggregated model.
Whether S107, judging nicety rate are greater than preset threshold;
If so, going to step S108;If it is not, then going to step S109;
S108, image classification is carried out using housebroken image classification model;
S109, using training set described in the image update in the test set, and go to step S105.
In the present embodiment, preset threshold namely the upper line standard of image classification model can be carried out according to practical application Customized setting.Specifically, if image classification model reaches line standard, it can be used for image classification, if image classification mould The not up to upper line standard of type, then updated training set using the image in test set, continue training image disaggregated model, with into one The parameter of successive step image classification model, then the test of accuracy rate is carried out come can judge online to image classification model.
In the present embodiment, using deep learning method come training image disaggregated model, specifically, it is based on convolutional Neural net Network can be realized the automatic of image based on back-propagation algorithm to build image classification model come training image disaggregated model Classification, improves the efficiency of image classification, meets growing image classification demand, from carrying out feature extraction manually, reduces Cost of labor.
Embodiment 2
The present embodiment provides a kind of electronic equipment, electronic equipment can be showed by way of calculating equipment (such as can be with For server apparatus), including memory, processor and store the computer journey that can be run on a memory and on a processor The method of the image classification of the offer of embodiment 1 may be implemented in sequence when wherein processor executes computer program.
Fig. 2 shows the hardware structural diagrams of the present embodiment, as shown in Fig. 2, electronic equipment 9 specifically includes:
At least one processor 91, at least one processor 92 and for connecting different system components (including processor 91 and memory 92) bus 93, in which:
Bus 93 includes data/address bus, address bus and control bus.
Memory 92 includes volatile memory, such as random access memory (RAM) 921 and/or cache storage Device 922 can further include read-only memory (ROM) 923.
Memory 92 further includes program/utility 925 with one group of (at least one) program module 924, such Program module 924 includes but is not limited to: operating system, one or more application program, other program modules and program number According to the realization that may include network environment in, each of these examples or certain combination.
Processor 91 by the computer program that is stored in memory 92 of operation, thereby executing various function application and Data processing, such as the method for image classification provided by the embodiment of the present invention 1.
Electronic equipment 9 may further be communicated with one or more external equipments 94 (such as keyboard, sensing equipment etc.).This Kind communication can be carried out by input/output (I/O) interface 95.Also, electronic equipment 9 can also by network adapter 96 with One or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.Net Network adapter 96 is communicated by bus 93 with other modules of electronic equipment 9.It should be understood that although not shown in the drawings, can tie It closes electronic equipment 9 and uses other hardware and/or software module, including but not limited to: microcode, device driver, redundancy processing Device, external disk drive array, RAID (disk array) system, tape drive and data backup storage system etc..
It should be noted that although being referred to several units/modules or subelement/mould of electronic equipment in the above detailed description Block, but it is this division be only exemplary it is not enforceable.In fact, being retouched above according to presently filed embodiment The feature and function for two or more units/modules stated can embody in a units/modules.Conversely, above description The feature and function of a units/modules can obtain being embodied by multiple units/modules with further division.
Embodiment 3
A kind of computer readable storage medium is present embodiments provided, computer program, described program quilt are stored thereon with The step of method for the image classification that embodiment 1 provides is realized when processor executes.
Wherein, what readable storage medium storing program for executing can use more specifically can include but is not limited to: portable disc, hard disk, random Access memory, read-only memory, erasable programmable read only memory, light storage device, magnetic memory device or above-mentioned times The suitable combination of meaning.
In possible embodiment, the present invention is also implemented as a kind of form of program product comprising program generation Code, when described program product is run on the terminal device, said program code is realized in fact for executing the terminal device The step of applying the method for the image classification in example 1.
Wherein it is possible to be write with any combination of one or more programming languages for executing program of the invention Code, said program code can be executed fully on a user device, partly execute on a user device, is only as one Vertical software package executes, part executes on a remote device or executes on a remote device completely on a user device for part.
Embodiment 4
On the basis of embodiment 1, the present embodiment provides a kind of method of image classification, Fig. 3 shows the present embodiment Flow chart.Referring to Fig. 3, difference of the present embodiment compared with embodiment 1 is:
In the present embodiment, step S104 includes:
S1041, the public data collection including several images for having marked classification is obtained;
S1042, image disaggregated model is constructed based on convolutional neural networks;
It S1043, with the image that public data is concentrated is input, the classification for the image concentrated with the public data of input is defeated Out, pre-training image classification model.
In embodiment 1, although can expand target data set, the amount of images that the target data after expanding is concentrated can It can still be difficult to meet the needs of deep learning.In the present embodiment, can use the public data collection including labeled data with And back-propagation algorithm realizes the pre-training of image classification model, since public data collection includes large number of training data, Pre-trained obtained image classification model has higher robustness, wherein public data collection for example can be ImageNet (one is used for the large-scale visible database of visual object identification software research), a kind of places365 (scene classification data Library) etc., and then finally training obtains image classification mould for the training set concentrated by the method for transfer learning using target data Type.
In the present embodiment, step S105 may include:
The pre-trained image classification model of S1051, training.
In this way, being input with the image in training set, with the image in the training set of input by the method for transfer learning Classification be output, can continue to train pre-trained image classification model based on back-propagation algorithm.
Specifically, can according to the quantity of image in training set to the network structure of pre-trained image classification model into Row fine tuning, for example, can accordingly increase network layer when the image that target data is concentrated is more, when the figure that target data is concentrated As it is less when, network layer can be reduced, accordingly to reach preferable classifying quality.
Specifically, in the present embodiment, the partial parameters of pre-trained image classification model can be kept constant, be based on The back-propagation algorithm image classification model pre-trained using the training of adaptive moment Estimation Optimization device, for example, can keep The parameter constant for inputting convolutional layer and preceding 10 residual blocks, using adaptive moment Estimation Optimization device to rear 20 residual blocks with And the parameter of full articulamentum is trained optimization, until image classification model is restrained.
In the present embodiment, step S109 may include:
S1091, the classification of the image of false negative in test set and false positive is labeled;
S1092, training set is added in the image in the test set through marking, goes to step S105.
In step s 106, image classification model accordingly export other than the corresponding classification of the image, further include this Image corresponds to the confidence level of classification, in the present embodiment, can be to confidence level in test set lower than first threshold (such as 0.3) The false positive image that the image and confidence level of false negative are higher than second threshold (such as 0.9) is labeled, by the vacation through marking Training set is added to realize the optimization of training set in positive and false negative image, then goes to step S105, again with optimized Image in training set is input, is output with the classification of the image in the training set of input, is based on back-propagation algorithm Training described image disaggregated model, further to promote the accuracy rate of image classification model.
In the present embodiment, operation can also be changed to the rear false positive being added in training set and false negative image, To save mark cost while generating enough training datas, wherein change operation may include addition noise, random At least one of rotation, affine transformation, flip horizontal, flip vertical, brightness change, contrast variation.
In the present embodiment, using the method training image disaggregated model of transfer learning, it can be improved image classification model Training effectiveness, in addition, in training set image training obtain convergent image classification model after, can also add from test set Add image into training set with further training image disaggregated model, in this way, mutual shadow between image classification model and training set It rings, is realized on the basis of embodiment 1 to the constantly training from thick to thin of image classification model, image point can be greatlyd improve The accuracy rate of class model.
Embodiment 5
The present embodiment provides a kind of electronic equipment, electronic equipment can be showed by way of calculating equipment (such as can be with For server apparatus), including memory, processor and store the computer journey that can be run on a memory and on a processor The method of the image classification of the offer of embodiment 4 may be implemented in sequence when wherein processor executes computer program.
Embodiment 6
A kind of computer readable storage medium is present embodiments provided, computer program, described program quilt are stored thereon with The step of method for the image classification that embodiment 4 provides is realized when processor executes.
Embodiment 7
The present embodiment provides a kind of system of image classification, Fig. 4 shows the module diagram of the present embodiment.Reference Fig. 4, The system of the present embodiment includes:
Module 11 is obtained, for obtaining the target data set including several images.
The system of the present embodiment can be adapted for classifying to hotel's image in OTA, specifically, in the present embodiment Target data set may include hotel's image in numerous hotels in OTA, wherein hotel's image can cover hotel's appearance, room The image of facility, Food Outlets, leisure facilities, peripheral facility, public domain etc..
To make the gradient during model training improve the effect of model training towards minimum value always to accelerate to restrain Rate, the system of the present embodiment can also include preprocessing module, for being concentrated after obtaining target data set to target data Image pre-processed, wherein pretreatment may include that image is normalized.In the present embodiment, it pre-processes Module can carry out minimax normalization operation to image specifically, can for the pixel value x of pixel each in image To calculate the pixel value x after its normalization using following formula:
Wherein, xmaxIt is the max pixel value of pixel in image, xminIt is the minimum pixel value of pixel in image.
Division module 12 obtains training set and test set for dividing target data set.
In the present embodiment, division module 12 can according to actual needs, according to a certain percentage, divide target data set with Obtain training set and test set.
Labeling module 13 is labeled for the classification to image in training set.
In the present embodiment, labeling module 13 can be according to preset classification, such as hotel's appearance, room facilities, food and drink Facility, leisure facilities, peripheral facility, public domain etc., to mark the classification of image in training set.
Since deep learning needs the data largely marked to be iterated training, to fight over-fitting, but wine in OTA The limited amount of shop image, in order to expand training set, the system of the present embodiment can also include enlargement module, for through marking Training set in image change operation, then training set is added in the altered obtained image that operates, is so generating foot While enough training datas, mark cost can also be saved, improves the robustness of institute's training pattern, wherein change operation May include addition noise, Random-Rotation, affine transformation, flip horizontal, flip vertical, brightness change, contrast variation in It is at least one.
For example, obtaining image P after adding noise into image P for the image P in training set1, after Random-Rotation image P Obtain image P2, Random-Rotation image P1Image P is obtained afterwards3, on the basis of image P, produce and mark identical image with image P P1、P2And P3, realize the expansion of training set.
Module 14 is constructed, for constructing image disaggregated model based on convolutional neural networks.
In the present embodiment, building module 14 can be used for the network structure of designed image disaggregated model, for example, image point Class model can also form residual in addition to outputting and inputting including input convolutional layer, 30 3*3 convolution kernels stacked by 2 Poor block and full articulamentum amount to 62 layers of network structure.
Further, building module 14 can also include the building of its objective function, example to the building of image classification model Such as, can using cross-entropy loss (cross entropy loss function) or balance loss (balanced double-rope) come Construct objective function.Specifically he, in the present embodiment, using training data imbalance problem can be alleviated to a certain extent Balance loss constructs objective function, and the objective function of building is as shown in following formula:
BL(pt)=- α (1-pt)γlog(pt)
Wherein, BL is used to characterize the classification of image, p for characterizing objective function, ttFor characterizing different classes of classification Probability, γ are the hyper parameters for reducing the easily loss of classification image, and α is the hyper parameter for balancing amount of images, and is had, γ > 0, α ∈ (0,1).
Training module 15, for being input with the image in training set, the classification with the image in the training set of input is Output, training image disaggregated model.
In the present embodiment, it can be restrained based on the value of back-propagation algorithm training image disaggregated model to objective function, In this way, being basically completed the training of image classification model.
Test module 16, for testing the accuracy rate of housebroken image classification model using test set.
In the present embodiment, after the image in test set being inputted trained obtained image classification model, image point Class model accordingly exports the corresponding classification of the image, in this way, by comparing the concrete class and image of all images in test set The classification of disaggregated model output, carrys out the accuracy rate of test image disaggregated model.
Whether judgment module 17 is greater than preset threshold for judging nicety rate;
If so, calling application module 18, application module 18 is used to carry out using housebroken described image disaggregated model Image classification;
If it is not, then calling update module 19, update module 19 is used to instruct using described in the image update in the test set Practice collection.
In the present embodiment, preset threshold namely the upper line standard of image classification model can be carried out according to practical application Customized setting.Specifically, if image classification model reaches line standard, it can be used for image classification, if image classification mould The not up to upper line standard of type, then updated training set using the image in test set, continue training image disaggregated model, with into one The parameter of successive step image classification model, then the test of accuracy rate is carried out come can judge online to image classification model.
In the present embodiment, using deep learning method come training image disaggregated model, specifically, it is based on convolutional Neural net Network can be realized the automatic of image based on back-propagation algorithm to build image classification model come training image disaggregated model Classification, improves the efficiency of image classification, meets growing image classification demand, from carrying out feature extraction manually, reduces Cost of labor.
Embodiment 8
On the basis of embodiment 7, the present embodiment provides a kind of system of image classification, Fig. 5 shows the present embodiment Module diagram.Referring to Fig. 5, difference of the present embodiment compared with embodiment 7 is:
In the present embodiment, building module 14 includes:
Acquiring unit 141, for obtaining the public data collection including several images for having marked classification;
Construction unit 142, for constructing image disaggregated model based on convolutional neural networks;
Training unit 143, the image for being concentrated with public data are input, the image concentrated with the public data of input Classification be output, pre-training image classification model.
In embodiment 7, although can expand target data set, the amount of images that the target data after expanding is concentrated can It can still be difficult to meet the needs of deep learning.In the present embodiment, can use the public data collection including labeled data with And back-propagation algorithm realizes the pre-training of image classification model, since public data collection includes large number of training data, Pre-trained obtained image classification model has higher robustness, wherein public data collection for example can be ImageNet (one is used for the large-scale visible database of visual object identification software research), a kind of places365 (scene classification data Library) etc., and then finally training obtains image classification mould for the training set concentrated by the method for transfer learning using target data Type.
In the present embodiment, training module 15 is specifically used for the pre-trained image classification model of training.
In this way, being input with the image in training set, with the image in the training set of input by the method for transfer learning Classification be output, can continue to train pre-trained image classification model based on back-propagation algorithm.
Specifically, can according to the quantity of image in training set to the network structure of pre-trained image classification model into Row fine tuning, for example, can accordingly increase network layer when the image that target data is concentrated is more, when the figure that target data is concentrated As it is less when, network layer can be reduced, accordingly to reach preferable classifying quality.
Specifically, in the present embodiment, the partial parameters of pre-trained image classification model can be kept constant, be based on The back-propagation algorithm image classification model pre-trained using the training of adaptive moment Estimation Optimization device, for example, can keep The parameter constant for inputting convolutional layer and preceding 10 residual blocks, using adaptive moment Estimation Optimization device to rear 20 residual blocks with And the parameter of full articulamentum is trained optimization, until image classification model is restrained.
In the present embodiment, update module 19 may include:
Unit 191 is marked, is labeled for the classification to false negative in test set and the image of false positive;
Adding unit 192 for training set to be added in the image in the test set through marking, and calls training module 15.
In the present embodiment, image classification model accordingly export other than the corresponding classification of the image, further include this Image corresponds to the confidence level of classification, in the present embodiment, can be to confidence level in test set lower than first threshold (such as 0.3) The false positive image that the image and confidence level of false negative are higher than second threshold (such as 0.9) is labeled, by the vacation through marking Training set is added to realize the optimization of training set in positive and false negative image, training module 15 is recalled, again with optimized Training set in image be input, with the classification of the image in the training set of input be output, based on backpropagation calculate Method trains described image disaggregated model, further to promote the accuracy rate of image classification model.
In the present embodiment, operation can also be changed to the rear false positive being added in training set and false negative image, To save mark cost while generating enough training datas, wherein change operation may include addition noise, random At least one of rotation, affine transformation, flip horizontal, flip vertical, brightness change, contrast variation.
In the present embodiment, using the method training image disaggregated model of transfer learning, it can be improved image classification model Training effectiveness, in addition, in training set image training obtain convergent image classification model after, can also add from test set Add image into training set with further training image disaggregated model, in this way, mutual shadow between image classification model and training set It rings, is realized on the basis of embodiment 7 to the constantly training from thick to thin of image classification model, image point can be greatlyd improve The accuracy rate of class model.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that this is only For example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially from Under the premise of the principle and substance of the present invention, many changes and modifications may be made, but these change and Modification each falls within protection scope of the present invention.

Claims (10)

1. a kind of method of image classification, which is characterized in that the described method includes:
Obtain the target data set including several images;
It divides the target data set and obtains training set and test set;
The classification of image in the training set is labeled;
Image disaggregated model is constructed based on convolutional neural networks;
It is input with the image in the training set, is output, training institute with the classification of the image in the training set of input State image classification model;
The accuracy rate of housebroken described image disaggregated model is tested using the test set;
Judge whether the accuracy rate is greater than preset threshold;
If so, carrying out image classification using housebroken described image disaggregated model;
If it is not, then using training set described in the image update in the test set, and go to the trained described image classification mould The step of type.
2. the method for image classification as described in claim 1, which is characterized in that the image using in the test set is more Newly the step of training set includes:
The classification of the image of false negative and false positive in the test set is labeled;
The training set is added in image in the test set through marking.
3. the method for image classification as described in claim 1, which is characterized in that obtain the target including several images described After the step of data set, the method also includes:
The image concentrated to the target data pre-processes;
Wherein, the pretreatment includes normalized;
And/or
Before the trained described image disaggregated model the step of, the method also includes:
Operation is changed to the image in the training set through marking;
The training set is added in the altered obtained image that operates;
Wherein, the change operation includes addition noise, Random-Rotation, affine transformation, flip horizontal, flip vertical, brightness change At least one of change, contrast variation;
And/or
It is described based on convolutional neural networks building image disaggregated model the step of include:
The objective function of described image disaggregated model is constructed according to the following formula:
BL(pt)=- α (1-pt)γlog(pt)
Wherein, BL is used to characterize the classification of image, p for characterizing objective function, ttFor characterizing different classes of class probability, γ, α are hyper parameters, also, γ > 0, α ∈ (0,1).
4. the method for image classification as described in claim 1, which is characterized in that described to construct image based on convolutional neural networks The step of disaggregated model includes:
Obtain the public data collection including several images for having marked classification;
Image disaggregated model is constructed based on convolutional neural networks;
It is input with the image that the public data is concentrated, the classification for the image concentrated with the public data of input is defeated Out, pre-training described image disaggregated model;
The step of trained described image disaggregated model includes:
The pre-trained described image disaggregated model of training.
5. the method for image classification as claimed in claim 4, which is characterized in that the pre-trained described image of the training point The step of class model includes:
Keep the partial parameters of pre-trained described image disaggregated model constant, using the training of adaptive moment Estimation Optimization device Pre-trained described image disaggregated model.
6. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that the processor is realized as described in any one of claim 1-5 when executing the computer program Image classification method.
7. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The step of processor realizes the method for image classification according to any one of claims 1 to 5 when executing.
8. a kind of system of image classification, which is characterized in that the system comprises:
Module is obtained, for obtaining the target data set including several images;
Division module obtains training set and test set for dividing the target data set;
Labeling module is labeled for the classification to image in the training set;
Module is constructed, for constructing image disaggregated model based on convolutional neural networks;
Training module, for being input with the image in the training set, with the classification of the image in the training set of input For output, training described image disaggregated model;
Test module, for testing the accuracy rate of housebroken described image disaggregated model using the test set;
Judgment module, for judging whether the accuracy rate is greater than preset threshold;
If so, calling application module, the application module is used to carry out image using housebroken described image disaggregated model Classification;
If it is not, then calling update module, the update module is used to expand the training set using the image in the test set.
9. the system of image classification as claimed in claim 8, which is characterized in that the update module includes:
Unit is marked, is labeled for the classification to the image of false negative and false positive in the test set;
Adding unit, for the training set to be added in the image in the test set through marking.
10. the system of image classification as claimed in claim 8, which is characterized in that the system also includes:
Preprocessing module, the image for concentrating to the target data pre-process;
Wherein, the pretreatment includes normalized;
And/or
The system also includes:
Enlargement module specifically for changing operation to the image in the training set through marking, and altered operation is obtained Image the training set is added;
Wherein, the change operation includes addition noise, Random-Rotation, affine transformation, flip horizontal, flip vertical, brightness change At least one of change, contrast variation;
And/or
The building module is specifically used for constructing the objective function of described image disaggregated model according to the following formula:
BL(pt)=- α (1-pt)γlog(pt)
Wherein, BL is used to characterize the classification of image, p for characterizing objective function, ttFor characterizing different classes of class probability, γ, α are hyper parameters, also, γ > 0, α ∈ (0,1).
CN201910793262.0A 2019-08-27 2019-08-27 Method, system, electronic equipment and the storage medium of image classification Pending CN110503154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910793262.0A CN110503154A (en) 2019-08-27 2019-08-27 Method, system, electronic equipment and the storage medium of image classification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910793262.0A CN110503154A (en) 2019-08-27 2019-08-27 Method, system, electronic equipment and the storage medium of image classification

Publications (1)

Publication Number Publication Date
CN110503154A true CN110503154A (en) 2019-11-26

Family

ID=68589718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910793262.0A Pending CN110503154A (en) 2019-08-27 2019-08-27 Method, system, electronic equipment and the storage medium of image classification

Country Status (1)

Country Link
CN (1) CN110503154A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737472A (en) * 2020-07-01 2020-10-02 携程计算机技术(上海)有限公司 Method and system for updating text classification model, electronic device and storage medium
CN112016622A (en) * 2020-08-28 2020-12-01 中移(杭州)信息技术有限公司 Method, electronic device, and computer-readable storage medium for model training
CN112132222A (en) * 2020-09-27 2020-12-25 上海高德威智能交通系统有限公司 License plate category identification method and device and storage medium
CN112182268A (en) * 2020-09-27 2021-01-05 北京达佳互联信息技术有限公司 Image classification method and device, electronic equipment and storage medium
CN112270974A (en) * 2020-09-22 2021-01-26 视隼智能科技(上海)有限公司 Intelligent auxiliary medical image workstation based on artificial intelligence
CN112288015A (en) * 2020-10-30 2021-01-29 国网四川省电力公司电力科学研究院 Distribution network electrical topology identification method and system based on edge calculation improved KNN
CN112396923A (en) * 2020-11-25 2021-02-23 贵州轻工职业技术学院 Marketing teaching simulation system
CN112395873A (en) * 2020-10-15 2021-02-23 北京百度网讯科技有限公司 Method and device for generating white character labeling model and electronic equipment
CN113065013A (en) * 2021-03-25 2021-07-02 携程计算机技术(上海)有限公司 Image annotation model training and image annotation method, system, device and medium
CN113945569A (en) * 2021-09-30 2022-01-18 河北建投新能源有限公司 Ion membrane fault detection method and device
CN114254146A (en) * 2020-09-21 2022-03-29 京东方科技集团股份有限公司 Image data classification method, device and system

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273933A (en) * 2017-06-27 2017-10-20 北京飞搜科技有限公司 The construction method of picture charge pattern grader a kind of and apply its face tracking methods
US20180032801A1 (en) * 2016-07-27 2018-02-01 International Business Machines Corporation Inferring body position in a scan
CN108319968A (en) * 2017-12-27 2018-07-24 中国农业大学 A kind of recognition methods of fruits and vegetables image classification and system based on Model Fusion
CN108564026A (en) * 2018-04-10 2018-09-21 复旦大学附属肿瘤医院 Network establishing method and system for Thyroid Neoplasms smear image classification
CN108564123A (en) * 2018-04-10 2018-09-21 复旦大学附属肿瘤医院 A kind of Thyroid Neoplasms smear image classification method and its device
CN109255340A (en) * 2018-10-29 2019-01-22 东北大学 It is a kind of to merge a variety of face identification methods for improving VGG network
CN109359541A (en) * 2018-09-17 2019-02-19 南京邮电大学 A kind of sketch face identification method based on depth migration study
CN109508741A (en) * 2018-11-09 2019-03-22 哈尔滨工业大学 Method based on deep learning screening training set
CN109508650A (en) * 2018-10-23 2019-03-22 浙江农林大学 A kind of wood recognition method based on transfer learning
CN109766769A (en) * 2018-12-18 2019-05-17 四川大学 A kind of road target detection recognition method based on monocular vision and deep learning
CN109766775A (en) * 2018-12-18 2019-05-17 四川大学 A kind of vehicle detecting system based on depth convolutional neural networks
CN109815864A (en) * 2019-01-11 2019-05-28 浙江工业大学 A kind of facial image age recognition methods based on transfer learning

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180032801A1 (en) * 2016-07-27 2018-02-01 International Business Machines Corporation Inferring body position in a scan
CN107273933A (en) * 2017-06-27 2017-10-20 北京飞搜科技有限公司 The construction method of picture charge pattern grader a kind of and apply its face tracking methods
CN108319968A (en) * 2017-12-27 2018-07-24 中国农业大学 A kind of recognition methods of fruits and vegetables image classification and system based on Model Fusion
CN108564026A (en) * 2018-04-10 2018-09-21 复旦大学附属肿瘤医院 Network establishing method and system for Thyroid Neoplasms smear image classification
CN108564123A (en) * 2018-04-10 2018-09-21 复旦大学附属肿瘤医院 A kind of Thyroid Neoplasms smear image classification method and its device
CN109359541A (en) * 2018-09-17 2019-02-19 南京邮电大学 A kind of sketch face identification method based on depth migration study
CN109508650A (en) * 2018-10-23 2019-03-22 浙江农林大学 A kind of wood recognition method based on transfer learning
CN109255340A (en) * 2018-10-29 2019-01-22 东北大学 It is a kind of to merge a variety of face identification methods for improving VGG network
CN109508741A (en) * 2018-11-09 2019-03-22 哈尔滨工业大学 Method based on deep learning screening training set
CN109766769A (en) * 2018-12-18 2019-05-17 四川大学 A kind of road target detection recognition method based on monocular vision and deep learning
CN109766775A (en) * 2018-12-18 2019-05-17 四川大学 A kind of vehicle detecting system based on depth convolutional neural networks
CN109815864A (en) * 2019-01-11 2019-05-28 浙江工业大学 A kind of facial image age recognition methods based on transfer learning

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MAHBUB HUSSAIN等: "A Study on CNN Transfer Learning for Image Classification", 《ADVANCES IN COMPUTATIONAL INTELLIGENCE SYSTEMS》 *
张荣荣: "图像分类中融合Bagging的Tri-Training算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
高龙: "基于卷积神经网络的领域自适应算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737472A (en) * 2020-07-01 2020-10-02 携程计算机技术(上海)有限公司 Method and system for updating text classification model, electronic device and storage medium
CN112016622A (en) * 2020-08-28 2020-12-01 中移(杭州)信息技术有限公司 Method, electronic device, and computer-readable storage medium for model training
CN114254146A (en) * 2020-09-21 2022-03-29 京东方科技集团股份有限公司 Image data classification method, device and system
CN112270974A (en) * 2020-09-22 2021-01-26 视隼智能科技(上海)有限公司 Intelligent auxiliary medical image workstation based on artificial intelligence
CN112132222B (en) * 2020-09-27 2023-02-10 上海高德威智能交通系统有限公司 License plate category identification method and device and storage medium
CN112182268A (en) * 2020-09-27 2021-01-05 北京达佳互联信息技术有限公司 Image classification method and device, electronic equipment and storage medium
CN112132222A (en) * 2020-09-27 2020-12-25 上海高德威智能交通系统有限公司 License plate category identification method and device and storage medium
CN112182268B (en) * 2020-09-27 2024-04-05 北京达佳互联信息技术有限公司 Image classification method, device, electronic equipment and storage medium
CN112395873A (en) * 2020-10-15 2021-02-23 北京百度网讯科技有限公司 Method and device for generating white character labeling model and electronic equipment
CN112395873B (en) * 2020-10-15 2022-02-01 北京百度网讯科技有限公司 Method and device for generating white character labeling model and electronic equipment
CN112288015A (en) * 2020-10-30 2021-01-29 国网四川省电力公司电力科学研究院 Distribution network electrical topology identification method and system based on edge calculation improved KNN
CN112396923A (en) * 2020-11-25 2021-02-23 贵州轻工职业技术学院 Marketing teaching simulation system
CN112396923B (en) * 2020-11-25 2023-09-19 贵州轻工职业技术学院 Marketing teaching simulation system
CN113065013A (en) * 2021-03-25 2021-07-02 携程计算机技术(上海)有限公司 Image annotation model training and image annotation method, system, device and medium
CN113065013B (en) * 2021-03-25 2024-05-03 携程计算机技术(上海)有限公司 Image annotation model training and image annotation method, system, equipment and medium
CN113945569A (en) * 2021-09-30 2022-01-18 河北建投新能源有限公司 Ion membrane fault detection method and device
CN113945569B (en) * 2021-09-30 2023-12-26 河北建投新能源有限公司 Fault detection method and device for ion membrane

Similar Documents

Publication Publication Date Title
CN110503154A (en) Method, system, electronic equipment and the storage medium of image classification
CN107358257B (en) Under a kind of big data scene can incremental learning image classification training method
CN109271967A (en) The recognition methods of text and device, electronic equipment, storage medium in image
CN110852447B (en) Meta learning method and apparatus, initializing method, computing device, and storage medium
CN108288014A (en) Intelligent road extracting method and device, extraction model construction method and hybrid navigation system
CN106991382A (en) A kind of remote sensing scene classification method
CN108021947B (en) A kind of layering extreme learning machine target identification method of view-based access control model
CN104838420B (en) Image content-based carries out image rotation to correct image orientation
CN110991435A (en) Express waybill key information positioning method and device based on deep learning
CN104142995B (en) The social event recognition methods of view-based access control model attribute
CN109299716A (en) Training method, image partition method, device, equipment and the medium of neural network
CN109165645A (en) A kind of image processing method, device and relevant device
CN110580500A (en) Character interaction-oriented network weight generation few-sample image classification method
CN109460769A (en) A kind of mobile end system and method based on table character machining and identification
CN107251082A (en) Information processor, information processing method and program
CN110516671A (en) Training method, image detecting method and the device of neural network model
CN104915673B (en) A kind of objective classification method and system of view-based access control model bag of words
CN108846413A (en) A kind of zero sample learning method based on global semantic congruence network
CN103258214A (en) Remote sensing image classification method based on image block active learning
CN109410190B (en) Tower pole reverse-breaking detection model training method based on high-resolution remote sensing satellite image
CN110245711A (en) The SAR target identification method for generating network is rotated based on angle
CN111582395B (en) Product quality classification system based on convolutional neural network
CN110457677A (en) Entity-relationship recognition method and device, storage medium, computer equipment
CN110059677A (en) Digital table recognition methods and equipment based on deep learning
CN107203558A (en) Object recommendation method and apparatus, recommendation information treating method and apparatus

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191126

RJ01 Rejection of invention patent application after publication