CN109409414B - Sample image determines method and apparatus, electronic equipment and storage medium - Google Patents
Sample image determines method and apparatus, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109409414B CN109409414B CN201811142162.3A CN201811142162A CN109409414B CN 109409414 B CN109409414 B CN 109409414B CN 201811142162 A CN201811142162 A CN 201811142162A CN 109409414 B CN109409414 B CN 109409414B
- Authority
- CN
- China
- Prior art keywords
- sample image
- vector
- tag along
- along sort
- predicted vector
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
Abstract
The disclosure is directed to a kind of sample images to determine method and apparatus, electronic equipment and storage medium, the method comprise the steps that the classifier using the first preset quantity respectively predicts each sample image, obtain the corresponding predicted vector of each sample image;The corresponding predicted vector of each sample image is converted to probability vector respectively;According to the corresponding probability vector of each sample image, difficulty sample image is determined from each sample image.The sample image that the disclosure provides is determined to accurately and rapidly extract from multiple sample images from difficult sample image, and without manually intervening, can save human resources.
Description
Technical field
This disclosure relates to which technical field of image processing more particularly to a kind of sample image determine that method and apparatus, electronics are set
Standby and storage medium.
Background technique
Recently, deep learning has obtained answering extensively in related fieldss such as video image, speech recognition, natural language processings
With.An important branch of the convolutional neural networks as deep learning is due to its superpower capability of fitting and complete end to end
Office's optimization ability, so that video image classifier task is after application convolutional neural networks, precision of prediction is substantially improved.Although mesh
Preceding image classification model is provided with certain classification capacity to image, but still suffers from the sample image of a large amount of prediction errors,
How image classification model is advanced optimized as a problem to be solved.
In training image disaggregated model, the effect of difficult sample image is commonly greater than simple sample image.In image point
Even a large amount of simple sample image is all difficult to bring the precision of prediction of image classification model in the learning process of class model
Significantly promoted, and difficult sample image often brings promotion by a relatively large margin to the precision of prediction of image classification model.
As it can be seen that the technical issues of there is an urgent need to those skilled in the art solve at present is, how from great amount of samples image
Difficult sample image is extracted, to be trained by difficult sample image to image classification model.
Summary of the invention
To overcome the problems in correlation technique, present disclose provides a kind of sample images to determine method and apparatus, electricity
Sub- equipment and storage medium.
According to the first aspect of the embodiments of the present disclosure, a kind of sample image is provided and determines method, comprising: is default using first
The classifier of quantity respectively predicts each sample image, obtains the corresponding predicted vector of each sample image;Respectively will
The corresponding predicted vector of each sample image is converted to probability vector;According to the corresponding probability vector of each sample image,
Difficulty sample image is determined from each sample image.
Optionally, described that each sample image is predicted respectively using the classifier of the first preset quantity, it obtains described
The corresponding predicted vector of each sample image, comprising: be directed to each sample image, the classification of first preset quantity is respectively adopted
Device predicts each sample image, obtains the first preset quantity tag along sort, wherein a classifier is to a sample
A tag along sort is generated when this image is predicted;According to the first preset quantity tag along sort, the sample is generated
The corresponding predicted vector of image.
Optionally, described that the corresponding predicted vector of each sample image is converted to probability vector respectively, comprising: to be directed to
Each sample image determines the number that each tag along sort occurs in the corresponding predicted vector of the sample image;For described pre-
The each tag along sort occurred in direction finding amount, the contingency table in number and the predicted vector occurred according to the tag along sort
Total number is signed, determines the corresponding probability value of the tag along sort;According to each tag along sort occurred in the predicted vector
Probability value corresponding with each tag along sort, generates the corresponding probability vector of the predicted vector.
Optionally, described according to the corresponding probability vector of each sample image, it is determined from each sample image tired
Difficult sample image, comprising: calculate separately the comentropy of the corresponding probability vector of each sample image, wherein each sample graph
As a corresponding comentropy;According to the corresponding comentropy of each sample image, the difficult sample in each sample image is determined
This image.
Optionally, described according to the corresponding comentropy of each sample image, determine the difficulty in each sample image
Sample, comprising: by the corresponding comentropy of each sample image according to being ranked up from big to small;Preceding second will be sorted in advance
If the corresponding sample image of quantity comentropy is determined as the difficult sample image.
Optionally, each sample image is predicted respectively using the classifier of the first preset quantity described, obtains institute
Before stating the corresponding predicted vector of each sample image, the method also includes: the first preset quantity described in random initializtion point
Class device.
According to the second aspect of an embodiment of the present disclosure, a kind of sample image determining device is provided, comprising: predicted vector generates
Module is configured as respectively predicting each sample image using the classifier of the first preset quantity, obtains each sample
The corresponding predicted vector of image;Conversion module is configured to for the corresponding predicted vector of each sample image being converted to
Probability vector;Determining module is configured as according to the corresponding probability vector of each sample image, from each sample image
Determine difficulty sample image.
Optionally, the predicted vector generation module includes: that tag along sort determines submodule, is configured as each sample
This image, the classifier that first preset quantity is respectively adopted predict the sample image, and it is pre- to obtain described first
If quantity tag along sort, wherein generate a tag along sort when classifier predicts the sample image;It generates
Submodule is configured as generating the corresponding predicted vector of the sample image according to the first preset quantity tag along sort.
Optionally, the conversion module includes: that number determines submodule, is configured as determining for each sample image
The number that each tag along sort occurs in the corresponding predicted vector of the sample image;Probability value determines submodule, is configured as needle
To each tag along sort occurred in the predicted vector, in the number and the predicted vector occurred according to the tag along sort
Tag along sort total number, determine the corresponding probability value of the tag along sort;Vector generates submodule, is configured as according to described in
Each tag along sort and the corresponding probability value of each tag along sort occurred in predicted vector, generates the predicted vector pair
The probability vector answered.
Optionally, the determining module includes: computational submodule, is configured to calculate each sample image correspondence
Probability vector comentropy, wherein the corresponding comentropy of each sample image;Difficult sample image determines submodule, quilt
It is configured to determine the difficult sample image in each sample image according to the corresponding comentropy of each sample image.
Optionally, the difficult sample image determines that submodule includes: sequencing unit, is configured as each sample graph
As corresponding comentropy according to being ranked up from big to small;Difficult sample image determination unit is configured as to sort preceding
The corresponding sample image of second preset quantity comentropy is determined as the difficult sample image.
Optionally, described device further include: initialization module is configured as in the predicted vector generation module described
Each sample image is predicted respectively using the classifier of the first preset quantity, obtains the corresponding prediction of each sample image
Before vector, the first preset quantity classifier described in random initializtion.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided, comprising: processor;It is handled for storage
The memory of device executable instruction;Wherein, the processor is configured to executing any of the above-described kind of sample image determines method.
According to a fourth aspect of embodiments of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described
When instruction in storage medium is executed by the processor of electronic equipment, so as to execute any of the above-described kind of sample image true for electronic equipment
Determine method.
According to a fifth aspect of the embodiments of the present disclosure, it provides according to a kind of computer program product, when the computer journey
When instruction in sequence product is executed by the processor of electronic equipment, so that moving electronic equipment, to execute any of the above-described kind of sample image true
Determine method.
The technical scheme provided by this disclosed embodiment can include the following benefits:
The sample image that the embodiment of the present disclosure provides determines scheme, is carried out respectively to each sample image by multiple classifiers
Prediction obtains predicted vector, converts probability vector for predicted vector, then comes according to the corresponding probability vector of each sample image
Determine the difficult sample image in each sample image, this kind of mode can accurately and rapidly be extracted from multiple sample images from
Difficult sample image, and without manually intervening, human resources can be saved.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is the step flow chart that a kind of sample image shown according to an exemplary embodiment determines method;
Fig. 2 is the step flow chart that a kind of sample image shown according to an exemplary embodiment determines method;
Fig. 3 is a kind of block diagram of sample image determining device shown according to an exemplary embodiment;
Fig. 4 is the structural block diagram of a kind of electronic equipment shown according to an exemplary embodiment;
Fig. 5 is the structural block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is the flow chart that a kind of sample image shown according to an exemplary embodiment determines method, sample as shown in Figure 1
This image determines method in electronic equipment, comprising the following steps:
Step 101: each sample image being predicted respectively using the classifier of the first preset quantity, obtains each sample graph
As corresponding predicted vector.
Classifier, that is, image classification model, classifier can be multi-tag classifier, and single sample image is inputted and is classified
When being predicted in device, the corresponding tag along sort of the sample image can be obtained.Such as: the first preset quantity is K, sample to be predicted
Image number is M, then is inputted in this K classifier and is predicted respectively for each sample image, K classification can be obtained
Label, there may be same label in this K tag along sort, this K tag along sort will form the pre- direction finding that a length is K
Amount, the i.e. corresponding predicted vector of the sample image.Aforesaid operations are repeated, M sample image is inputted into K classifier respectively
In predicted, may eventually form the predicted vector that M length is K, each predicted vector respectively corresponds a sample image.
It wherein, include multiple points in predicted vector, each pair of point answers a classifier to predict resulting point to sample image
Class label.First preset quantity can be configured according to actual needs by those skilled in the art, right in the embodiment of the present disclosure
This is not particularly limited.
Step 102: the corresponding predicted vector of each sample image being converted to probability vector respectively.
It wherein, include multiple points in probability vector, each pair of point answers the probability value of a tag along sort and tag along sort.
Such as: in a predicted vector include ten points, the corresponding tag along sort of each point be respectively " cat ", " dog ", " monkey ",
" people ", " cat ", " dog ", " monkey ", " people ", " cat ", " dog ".By above-mentioned predicted vector it is found that the corresponding sample of the predicted vector
Image is predicted to " cat ", " dog ", " monkey ", and the probability value of " people " is respectively 0.3,0.3,0.2 and 0.2, then knows pre- direction finding
Four points of probability vector packet being converted to are measured, this four points respectively correspond tag along sort " cat ", " dog ", " monkey ", " people ", and four points
The corresponding probability value of class label is respectively 0.3,0.3,0.2 and 0.2.
During specific implementation, transform mode cited in the example above can be used each sample image is corresponding pre-
Direction finding amount is converted into probability vector.
Step 103: according to the corresponding probability vector of each sample image, difficulty sample image is determined from each sample image.
The probability value of each tag along sort is predicted to be in probability vector comprising sample image, passes through corresponding point of sample image
The probability value of class label can determine whether sample is difficult image.Specific method of determination can be by those skilled in the art according to reality
Border demand is configured, and is not particularly limited in the embodiment of the present disclosure to this.Such as: it is corresponding general to calculate separately each sample image
The comentropy of rate vector, the comentropy according to probability vector determine whether sample image is difficult sample image.
Sample image shown in the present exemplary embodiment determines method, by multiple classifiers respectively to each sample image into
Row prediction obtains predicted vector, probability vector is converted by predicted vector, then according to the corresponding probability vector of each sample image
Determine the difficult sample image in each sample image, this kind of mode can extract accurately and rapidly from multiple sample images
From difficult sample image, and without manually intervening, human resources can be saved.
Fig. 2 is the flow chart that a kind of sample image shown according to an exemplary embodiment determines method, sample as shown in Figure 2
This image determines method for including the following steps in electronic equipment.
Step 201: random initializtion the first preset quantity classifier.
Difficult sample image is broadly divided into: model difficulty sample image, algorithm difficulty sample image.Model difficulty sample
Image refers to due to different initiation parameters, different parameter update modes cause a certain proportion of sample image only for
It is difficult sample image for present image disaggregated model, but it is tired for being not for all image classification models
Difficult sample image.Algorithm difficulty sample image refers to the algorithm based on convolutional neural networks, no matter which kind of image classification is used
Model, which kind of initiation parameter can all allow the sample image of image classification model prediction mistake.
It is initialized by the way of random initializtion in the embodiment of the present disclosure and participates in each classification that this difficult sample determines
Device can be avoided the model difficulty sample image when determining difficulty sample image from sample image and be missed.
Step 202: each sample image being predicted respectively using the classifier of the first preset quantity, obtains each sample graph
As corresponding predicted vector.
It wherein, include multiple points in predicted vector, each pair of point answers a classifier to predict resulting point to sample image
Class label.
A kind of classifier optionally with the first preset quantity respectively predicts each sample image, obtains described each
The mode of the corresponding predicted vector of sample image is as follows:
Firstly, being directed to each sample image, the classifier that the first preset quantity is respectively adopted carries out in advance the sample image
It surveys, obtains the first preset quantity tag along sort;
Wherein, a tag along sort is generated when a classifier predicts sample image.Tag along sort is then this point
Class device can be denoted as prediction to the prediction result of sample imageijx, wherein i is sample image mark, and j represents classifier, jx
For x-th of classifier.
Secondly, generating the corresponding predicted vector of sample image according to the first preset quantity tag along sort.
By taking the first preset quantity is k as an example, then after predicting according to the first preset quantity classifier sample image,
The predicted vector of generation is [predictionij0,predictionij1,predictionij2……predictionijk]。
Aforesaid way is repeated, the corresponding predicted vector of each sample image is produced.
Step 203: the corresponding predicted vector of each sample image being converted to probability vector respectively.
It wherein, include multiple points in probability vector, each pair of point answers the probability value of a tag along sort and tag along sort.
A kind of mode that the corresponding predicted vector of each sample image being optionally converted to probability vector respectively is as follows:
Firstly, being directed to each sample image, time that each tag along sort occurs in the corresponding predicted vector of sample image is determined
Number;
Such as: a certain sample image is corresponding to be from predicted vector [" cat ", " dog ", " monkey ", " people ", " cat ", " dog ", " monkey ",
" people ", " cat ", " dog "].By there is " cat " altogether known to above-mentioned predicted vector, " dog ", " monkey ", " people " four tag along sorts, four
A tag along sort occurs 3 times, 3 times, 2 times and 2 times respectively.
Secondly, the number occurred for each tag along sort occurred in predicted vector according to tag along sort and pre- direction finding
Tag along sort total number in amount determines the corresponding probability value of tag along sort;
Finally, generating prediction according to each tag along sort and the corresponding probability value of each tag along sort that occur in predicted vector
The corresponding probability vector of vector.
Still continue the example above, four tag along sorts " cat ", " dog ", " monkey ", " people ", four tag along sorts are corresponding general
Rate value is respectively 0.3,0.3,0.2 and 0.2, and the probability vector after conversion then includes four points, and each point is respectively with above-mentioned four
A tag along sort is corresponding, and each label is corresponding with a probability value.
Probability vector can be converted for the corresponding predicted vector of each sample image by repeating above method process, thus
To the corresponding probability vector of each sample image.
Step 204: calculating separately the comentropy of the corresponding probability vector of each sample image.
Wherein, after by the calculating in step 204, each sample image will a corresponding comentropy.
The comentropy of a probability vector can be specifically calculated by following formula:
Wherein, x is probability vector mark, and H (x) indicates the comentropy of probability vector x, and i is point for including in probability vector
The mark of class label, piFor the probability value of in probability vector i-th each tag along sort.
The comentropy of the corresponding probability vector of each sample image can be calculated by above-mentioned formula.
Step 205: according to the corresponding comentropy of each sample image, determining the difficult sample image in each sample image.
Step 205 may include steps of:
Step 2051: by the corresponding comentropy of each sample image according to being ranked up from big to small;
Step 2052: the corresponding sample image of the preceding second preset quantity comentropy that will sort is determined as difficult sample
Image.
Second preset quantity can be configured according to actual needs by those skilled in the art, right in the embodiment of the present disclosure
This is not particularly limited.
It is certainly not limited to this, it can also be by the corresponding comentropy of each sample image according to being ranked up from small to large;It will
The corresponding sample image of the posterior second preset quantity comentropy that sorts is determined as difficult sample image.Or setting information entropy
Threshold value, the corresponding sample image of comentropy that will exceed the information entropy threshold are determined as difficult sample image.It was implementing
Cheng Zhong, those skilled in the art can be used any one mode in above-mentioned three kinds of cited modes, in the embodiment of the present disclosure
This is not particularly limited.
Sample image shown in the present exemplary embodiment determines method, by multiple classifiers respectively to each sample image
Predicted to obtain predicted vector, convert probability vector for predicted vector, then according to the corresponding probability of each sample image to
The comentropy of amount determines the difficult sample image in each sample image, this kind of mode can be more accurately and rapidly from multiple
It extracts in sample image from difficult sample image, and without manually intervening, human resources can be saved.In addition, this public affairs
It opens in embodiment and the classifier of the first preset quantity is subjected to random initializtion, initialize classifier compared to using preset parameter
Mode, can be avoided from sample image determine difficulty sample image when model difficulty sample image be missed.
Fig. 3 is a kind of block diagram of sample image determining device shown according to an exemplary embodiment, referring to Fig. 3 device
Including predicted vector generation module 301, conversion module 302 and determining module 303.
Predicted vector generation module 301 is configured as the classifier using the first preset quantity respectively to each sample image
It is predicted, obtains the corresponding predicted vector of each sample image;Conversion module 302 is configured to the various kinds
The corresponding predicted vector of this image is converted to probability vector;Determining module 303 is configured as corresponding according to each sample image
Probability vector, from each sample image determine difficulty sample image.
Optionally, the predicted vector generation module 301 may include: that tag along sort determines submodule 3011, be configured
For for each sample image, the classifier that first preset quantity is respectively adopted predicts the sample image, obtains
To the first preset quantity tag along sort, wherein generate one when a classifier predicts the sample image
Tag along sort;Submodule 3012 is generated, is configured as generating the sample graph according to the first preset quantity tag along sort
As corresponding predicted vector.
Optionally, the conversion module 302 may include: that number determines submodule 3021, be configured as each sample
This image determines the number that each tag along sort occurs in the corresponding predicted vector of the sample image;Probability value determines submodule
3022, it is configured as the number for each tag along sort occurred in the predicted vector, occurred according to the tag along sort
With the tag along sort total number in the predicted vector, the corresponding probability value of the tag along sort is determined;Vector generates submodule
3023, it is configured as according to each tag along sort and the corresponding probability of each tag along sort occurred in the predicted vector
Value, generates the corresponding probability vector of the predicted vector.
Optionally, the determining module 303 may include: computational submodule 3031, be configured to calculate each described
The comentropy of the corresponding probability vector of sample image, wherein the corresponding comentropy of each sample image;Difficult sample image is true
Stator modules 3032 are configured as determining tired in each sample image according to the corresponding comentropy of each sample image
Difficult sample image.
Optionally, the difficult sample image determines that submodule 3032 includes: sequencing unit, is configured as the various kinds
The corresponding comentropy of this image according to being ranked up from big to small;Difficult sample image determination unit is configured as to sort
The preceding corresponding sample image of the second preset quantity comentropy is determined as the difficult sample image.
Optionally, described device further include: initialization module 304 is configured as in the predicted vector generation module 301
Each sample image is predicted respectively using the classifier of the first preset quantity described, it is corresponding to obtain each sample image
Predicted vector before, the first preset quantity classifier described in random initializtion.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 4 is the block diagram of a kind of electronic equipment 400 shown according to an exemplary embodiment.Electronic equipment can be movement
Terminal may be server, be illustrated so that electronic equipment is mobile terminal as an example in the embodiment of the present disclosure.For example, mobile whole
End can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, and medical treatment is set
It is standby, body-building equipment, personal digital assistant etc..
Referring to Fig. 4, electronic equipment 400 may include following one or more components: processing component 402, memory 404,
Power supply module 406, multimedia component 408, audio component 410, the interface 412 of input/output (I/O), sensor module 414,
And communication component 416.
The integrated operation of the usual controlling electronic devices 400 of processing component 402, such as with display, call, data are logical
Letter, camera operation and record operate associated operation.Processing component 402 may include one or more processors 420 to hold
Row instruction, to perform all or part of the steps of the methods described above.In addition, processing component 402 may include one or more moulds
Block, convenient for the interaction between processing component 402 and other assemblies.For example, processing component 402 may include multi-media module, with
Facilitate the interaction between multimedia component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in electronic equipment 400.These data
Example include any application or method for being operated on electronic equipment 400 instruction, contact data, telephone directory
Data, message, picture, video etc..Memory 404 can by any kind of volatibility or non-volatile memory device or it
Combination realize, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable
Except programmable read only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, fastly
Flash memory, disk or CD.
Power supply module 406 provides electric power for the various assemblies of electronic equipment 400.Power supply module 406 may include power supply pipe
Reason system, one or more power supplys and other with for electronic equipment 400 generate, manage, and distribute the associated component of electric power.
Multimedia component 408 includes the screen of one output interface of offer between electronic equipment 400 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 408 includes a front camera and/or rear camera.When mobile terminal 400 is in operation mode, as shot mould
When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting
Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike
Wind (MIC), when electronic equipment 400 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone
It is configured as receiving external audio signal.The received audio signal can be further stored in memory 404 or via logical
Believe that component 416 is sent.In some embodiments, audio component 410 further includes a loudspeaker, is used for output audio signal.
I/O interface 412 provides interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 414 includes one or more sensors, for providing the state of various aspects for electronic equipment 400
Assessment.For example, sensor module 414 can detecte the state that opens/closes of electronic equipment 400, the relative positioning of component, example
As the component be mobile terminal 400 display and keypad, sensor module 414 can also detect electronic equipment 400 or
The position change of 400 1 components of electronic equipment, the existence or non-existence that user contacts with electronic equipment 400, electronic equipment 400
The temperature change of orientation or acceleration/deceleration and electronic equipment 400.Sensor module 414 may include proximity sensor, be configured
For detecting the presence of nearby objects without any physical contact.Sensor module 414 can also include optical sensor,
Such as CMOS or ccd image sensor, for being used in imaging applications.In some embodiments, which may be used also
To include acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between electronic equipment 400 and other equipment.
Electronic equipment 400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.Show at one
In example property embodiment, communication component 416 receives broadcast singal or broadcast from external broadcasting management system via broadcast channel
Relevant information.In one exemplary embodiment, the communication component 416 further includes near-field communication (NFC) module, short to promote
Cheng Tongxin.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module
(UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, electronic equipment 400 can be by one or more application specific integrated circuit (ASIC), number
Word signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing described in above-mentioned Fig. 1, Fig. 2
Sample image determines method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 404 of instruction, above-metioned instruction can be executed by the processor 420 of electronic equipment 400 to complete above-mentioned Fig. 1, Fig. 2
Shown in sample image determine method.For example, the non-transitorycomputer readable storage medium can be ROM, deposit at random
Access to memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
In the exemplary embodiment, a kind of computer program product is additionally provided, when the instruction in computer program product
When being executed by the processor 420 of electronic equipment 400, so that electronic equipment 400 executes above-mentioned Fig. 1, sample image shown in Fig. 2
Determine method.
Fig. 5 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.Electronic equipment can be mobile whole
End may be server, be illustrated so that electronic equipment is server as an example in the embodiment of the present disclosure.Referring to Fig. 5, electronics is set
Standby 500 include processing component 501, further comprises one or more processors, and the storage as representated by memory 502
Device resource, can be by the instruction of the execution of processing component 501, such as application program for storing.The application stored in memory 502
Program may include it is one or more each correspond to one group of instruction module.In addition, processing component 501 is configured
To execute instruction, to execute above-mentioned Fig. 1, sample image shown in Fig. 2 determine that method, the method specifically include:
Each sample image is predicted respectively using the classifier of the first preset quantity, obtains each sample image pair
The predicted vector answered;The corresponding predicted vector of each sample image is converted to probability vector respectively;According to each sample
The corresponding probability vector of image determines difficulty sample image from each sample image.Electronic equipment 500 can also include one
A power supply module 503 is configured as executing the power management of electronic equipment 500, and a wired or wireless network interface 504 is matched
It is set to and electronic equipment 500 is connected to network and input and output (I/O) interface 505.Electronic equipment 500 can operate base
In the operating system for being stored in memory 502, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM,
FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (12)
1. a kind of sample image determines method, which is characterized in that the described method includes:
Each sample image is predicted respectively using the classifier of the first preset quantity, it is corresponding to obtain each sample image
Predicted vector;
The corresponding predicted vector of each sample image is converted to probability vector respectively;
According to the corresponding probability vector of each sample image, difficulty sample image is determined from each sample image;
It is described that the corresponding predicted vector of each sample image is converted to probability vector respectively, comprising:
For each sample image, the number that each tag along sort occurs in the corresponding predicted vector of the sample image is determined;
For each tag along sort occurred in the predicted vector, the number occurred according to the tag along sort and the prediction
Tag along sort total number in vector determines the corresponding probability value of the tag along sort;
According to each tag along sort and the corresponding probability value of each tag along sort occurred in the predicted vector, institute is generated
State the corresponding probability vector of predicted vector.
2. the method according to claim 1, wherein the classifier using the first preset quantity is respectively to each
Sample image is predicted, the corresponding predicted vector of each sample image is obtained, comprising:
For each sample image, the classifier that first preset quantity is respectively adopted predicts each sample image, obtains
To the first preset quantity tag along sort, wherein generate one when a classifier predicts a sample image
Tag along sort;
According to the first preset quantity tag along sort, the corresponding predicted vector of the sample image is generated.
3. the method according to claim 1, wherein it is described according to the corresponding probability of each sample image to
Amount determines difficulty sample image from each sample image, comprising:
Calculate separately the comentropy of the corresponding probability vector of each sample image, wherein the corresponding letter of each sample image
Cease entropy;
According to the corresponding comentropy of each sample image, the difficult sample image in each sample image is determined.
4. according to the method described in claim 3, it is characterized in that, described according to the corresponding comentropy of each sample image,
Determine the difficult sample in each sample image, comprising:
By the corresponding comentropy of each sample image according to being ranked up from big to small;
The corresponding sample image of the preceding second preset quantity comentropy that will sort is determined as the difficult sample image.
5. the method according to claim 1, wherein described right respectively using the classifier of the first preset quantity
Each sample image is predicted, before obtaining the corresponding predicted vector of each sample image, the method also includes:
First preset quantity classifier described in random initializtion.
6. a kind of sample image determining device, which is characterized in that described device includes:
Predicted vector generation module is configured as respectively carrying out each sample image using the classifier of the first preset quantity pre-
It surveys, obtains the corresponding predicted vector of each sample image;Conversion module is configured to each sample image is corresponding
Predicted vector be converted to probability vector;
Conversion module is configured to the corresponding predicted vector of each sample image being converted to probability vector;
Determining module is configured as determining from each sample image according to the corresponding probability vector of each sample image
Difficult sample image;
The conversion module includes:
Number determines submodule, is configured as determining in the corresponding predicted vector of the sample image for each sample image
The number that each tag along sort occurs;
Probability value determines submodule, is configured as each tag along sort occurred in the predicted vector, according to described point
Category checks out the tag along sort total number in existing number and the predicted vector, determines the corresponding probability of the tag along sort
Value;
Vector generates submodule, is configured as according to each tag along sort and each classification occurred in the predicted vector
The corresponding probability value of label generates the corresponding probability vector of the predicted vector.
7. device according to claim 6, which is characterized in that the predicted vector generation module includes:
Tag along sort determines submodule, is configured as that point of first preset quantity is respectively adopted for each sample image
Class device predicts the sample image, obtains the first preset quantity tag along sort, wherein a classifier is to institute
State one tag along sort of generation when sample image is predicted;
Submodule is generated, is configured as that it is corresponding to generate the sample image according to the first preset quantity tag along sort
Predicted vector.
8. device according to claim 6, which is characterized in that the determining module includes:
Computational submodule is configured to calculate the comentropy of the corresponding probability vector of each sample image, wherein each
Sample image corresponds to a comentropy;
Difficult sample image determines submodule, is configured as determining described each according to the corresponding comentropy of each sample image
Difficult sample image in sample image.
9. device according to claim 8, which is characterized in that the difficulty sample image determines that submodule includes:
Sequencing unit is configured as the corresponding comentropy of each sample image according to being ranked up from big to small;
Difficult sample image determination unit is configured as the corresponding sample graph of preceding second preset quantity comentropy that will sort
As being determined as the difficult sample image.
10. device according to claim 8, which is characterized in that described device further include:
Initialization module is configured as in the predicted vector generation module in the classifier using the first preset quantity point
It is other that each sample image is predicted, before obtaining the corresponding predicted vector of each sample image, described in random initializtion
One preset quantity classifier.
11. a kind of electronic equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to perform claim requires sample image method described in any one of 1-5.
12. a kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of electronic equipment
When device executes, so that electronic equipment is able to carry out sample image of any of claims 1-5 and determines method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811142162.3A CN109409414B (en) | 2018-09-28 | 2018-09-28 | Sample image determines method and apparatus, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811142162.3A CN109409414B (en) | 2018-09-28 | 2018-09-28 | Sample image determines method and apparatus, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109409414A CN109409414A (en) | 2019-03-01 |
CN109409414B true CN109409414B (en) | 2019-10-15 |
Family
ID=65466430
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811142162.3A Active CN109409414B (en) | 2018-09-28 | 2018-09-28 | Sample image determines method and apparatus, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109409414B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110738267B (en) * | 2019-10-18 | 2023-08-22 | 北京达佳互联信息技术有限公司 | Image classification method, device, electronic equipment and storage medium |
CN111291688B (en) * | 2020-02-12 | 2023-07-14 | 咪咕文化科技有限公司 | Video tag acquisition method and device |
CN112766049A (en) * | 2020-12-29 | 2021-05-07 | 清华大学 | Large-scale face recognition test set construction method and device based on difficult sample mining |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4644613B2 (en) * | 2006-02-27 | 2011-03-02 | 株式会社日立ハイテクノロジーズ | Defect observation method and apparatus |
CN102810161B (en) * | 2012-06-07 | 2015-05-20 | 江苏物联网研究发展中心 | Method for detecting pedestrians in crowding scene |
CN105912990B (en) * | 2016-04-05 | 2019-10-08 | 深圳先进技术研究院 | The method and device of Face datection |
CN107092878A (en) * | 2017-04-13 | 2017-08-25 | 中国地质大学(武汉) | It is a kind of based on hybrid classifer can autonomous learning multi-target detection method |
CN108038515A (en) * | 2017-12-27 | 2018-05-15 | 中国地质大学(武汉) | Unsupervised multi-target detection tracking and its storage device and camera device |
CN108447054B (en) * | 2018-03-22 | 2021-06-29 | 北京木业邦科技有限公司 | Wood defect sample obtaining method and device, electronic equipment and storage medium |
-
2018
- 2018-09-28 CN CN201811142162.3A patent/CN109409414B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109409414A (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109117862B (en) | Image tag recognition methods, device and server | |
EP3886004A1 (en) | Method for training classification model, classification method and device, and storage medium | |
CN109389162B (en) | Sample image screening technique and device, electronic equipment and storage medium | |
CN107527059A (en) | Character recognition method, device and terminal | |
CN109409414B (en) | Sample image determines method and apparatus, electronic equipment and storage medium | |
CN109375967A (en) | Application Program Interface display methods and device, mobile terminal and storage medium | |
CN111210844B (en) | Method, device and equipment for determining speech emotion recognition model and storage medium | |
CN106250921A (en) | Image processing method and device | |
CN109389220A (en) | Processing method, device, electronic equipment and the storage medium of neural network model | |
CN108345581A (en) | A kind of information identifying method, device and terminal device | |
CN109670077A (en) | Video recommendation method, device and computer readable storage medium | |
CN109819288A (en) | Determination method, apparatus, electronic equipment and the storage medium of advertisement dispensing video | |
CN109599104A (en) | Multi-beam choosing method and device | |
CN109360197A (en) | Processing method, device, electronic equipment and the storage medium of image | |
CN109635920A (en) | Neural network optimization and device, electronic equipment and storage medium | |
CN111259967A (en) | Image classification and neural network training method, device, equipment and storage medium | |
CN103902654A (en) | Clustering method and device and terminal device | |
CN104077563A (en) | Human face recognition method and device | |
CN110889489A (en) | Neural network training method, image recognition method and device | |
CN110276418A (en) | Character recognition method, device, electronic equipment and storage medium based on picture | |
CN109784164A (en) | Prospect recognition methods, device, electronic equipment and storage medium | |
CN109886211A (en) | Data mask method, device, electronic equipment and storage medium | |
CN109145876A (en) | Image classification method, device, electronic equipment and storage medium | |
CN104850592B (en) | The method and apparatus for generating model file | |
CN110297929A (en) | Image matching method, device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |