CN108171275A - For identifying the method and apparatus of flowers - Google Patents

For identifying the method and apparatus of flowers Download PDF

Info

Publication number
CN108171275A
CN108171275A CN201810044186.9A CN201810044186A CN108171275A CN 108171275 A CN108171275 A CN 108171275A CN 201810044186 A CN201810044186 A CN 201810044186A CN 108171275 A CN108171275 A CN 108171275A
Authority
CN
China
Prior art keywords
flowers
probability
images
recognized
recognition result
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
CN201810044186.9A
Other languages
Chinese (zh)
Inventor
孙明
周峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810044186.9A priority Critical patent/CN108171275A/en
Publication of CN108171275A publication Critical patent/CN108171275A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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

Landscapes

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

Abstract

The embodiment of the present application discloses the method and apparatus for identifying flowers.One specific embodiment of this method includes:Obtain images to be recognized;By images to be recognized input flowers identification model trained in advance, obtain the first recognition result, wherein, first recognition result includes the probability that there are the flowers under the flowers classification in the flowers category set specified in images to be recognized and the probability there is no flowers, and flowers identification model is used to characterize the correspondence between image and the first recognition result;The first recognition result based on gained generates the second recognition result, and exports the second recognition result.The embodiment realizes the identification to flowers.

Description

For identifying the method and apparatus of flowers
Technical field
The invention relates to field of computer technology, and in particular to Internet technical field is more particularly, to known The method and apparatus of other flowers.
Background technology
With being on the increase for flower variety, people are by being visually typically only capable to identify the flowers of a small number of kinds.Therefore, User is helped to carry out flowers to be identified as a kind of demand.Moreover, flowers identification is also applied to a variety of different applied fields Scape, such as the check-out flow of florist's shop, flower growth condition monitoring etc..
Invention content
The embodiment of the present application proposes the method and apparatus for identifying flowers.
In a first aspect, the embodiment of the present application provides a kind of method for identifying flowers, this method includes:It obtains and waits to know Other image;By above-mentioned images to be recognized input flowers identification model trained in advance, the first recognition result is obtained, wherein, it is above-mentioned First recognition result includes the flowers for having under the flowers classification in the flowers category set specified in above-mentioned images to be recognized Probability and the probability there is no flowers, above-mentioned flowers identification model are used to characterize the corresponding pass between image and the first recognition result System;The first recognition result based on gained generates the second recognition result, and exports above-mentioned second recognition result.
In some embodiments, above-mentioned flowers identification model is by being trained to obtain to preset convolutional neural networks , wherein, above-mentioned convolutional neural networks include convolutional layer, pond layer, full articulamentum and loss layer, in above-mentioned convolutional neural networks Non- first convolutional layer be connected at least one convolutional layer before the above-mentioned non-first convolutional layer.
In some embodiments, above-mentioned flowers identification model trains to obtain by following training step:It obtains preset Sample image set and label corresponding with each sample image in above-mentioned sample image set, wherein, above-mentioned sample graph There is the sample image for showing flowers in closing in image set;Using machine learning method, based on above-mentioned sample image set, above-mentioned sample The label corresponding to each sample image, preset Classification Loss function and back-propagation algorithm in this image collection is to above-mentioned Convolutional neural networks are trained, and obtain flowers identification model.
In some embodiments, above-mentioned the first recognition result based on gained generates the second recognition result, including:On determining State in images to be recognized there is no flowers probability whether be gained the first recognition result in maximum probability;It is if not maximum Probability, then according to numerical values recited, there are the flowers under the flowers classification in above-mentioned flowers category set from above-mentioned images to be recognized Probability is chosen in the probability of grass, and the title generation second of the flowers classification corresponding to the probability selected and the probability is identified As a result.
In some embodiments, above-mentioned according to numerical values recited, there are above-mentioned flowers classification collection from above-mentioned images to be recognized Probability is chosen in the probability of the flowers under flowers classification in conjunction, including:According to the sequence that numerical value is descending, wait to know to above-mentioned Probability in other image there are the flowers under the flowers classification in above-mentioned flowers category set is ranked up, and obtains probability sequence; Preset number probability is chosen since the stem of above-mentioned probability sequence.
In some embodiments, above-mentioned according to numerical values recited, there are above-mentioned flowers classification collection from above-mentioned images to be recognized Probability is chosen in the probability of the flowers under flowers classification in conjunction, is further included:There are above-mentioned flowers from above-mentioned images to be recognized The probability not less than probability threshold value is chosen in the probability of the flowers under flowers classification in category set.
In some embodiments, above-mentioned the first recognition result based on gained generates the second recognition result, further includes:If Maximum probability, then generation are used to indicate the text message that flowers are not present in above-mentioned images to be recognized, by above-mentioned text message and There is no the probability of flowers in above-mentioned images to be recognized to generate the second recognition result.
In some embodiments, the above method further includes:It is deposited above-mentioned images to be recognized as new sample image Storage.
Second aspect, the embodiment of the present application provide a kind of device for being used to identify flowers, which includes:It obtains single Member is configured to obtain images to be recognized;Recognition unit is configured to above-mentioned images to be recognized input flowers trained in advance Identification model obtains the first recognition result, wherein, above-mentioned first recognition result includes having what is specified in above-mentioned images to be recognized The probability and the probability there is no flowers of the flowers under flowers classification in flowers category set, above-mentioned flowers identification model are used for Characterize the correspondence between image and the first recognition result;Output unit is configured to the first recognition result based on gained The second recognition result is generated, and exports above-mentioned second recognition result.
In some embodiments, above-mentioned flowers identification model is by being trained to obtain to preset convolutional neural networks , wherein, above-mentioned convolutional neural networks include convolutional layer, pond layer, full articulamentum and loss layer, in above-mentioned convolutional neural networks Non- first convolutional layer be connected at least one convolutional layer before the above-mentioned non-first convolutional layer.
In some embodiments, above-mentioned flowers identification model trains to obtain by following training step:It obtains preset Sample image set and label corresponding with each sample image in above-mentioned sample image set, wherein, above-mentioned sample graph There is the sample image for showing flowers in closing in image set;Using machine learning method, based on above-mentioned sample image set, above-mentioned sample The label corresponding to each sample image, preset Classification Loss function and back-propagation algorithm in this image collection is to above-mentioned Convolutional neural networks are trained, and obtain flowers identification model.
In some embodiments, above-mentioned output unit includes:Determination subelement is configured to determine above-mentioned images to be recognized In there is no flowers probability whether be gained the first recognition result in maximum probability;First generation subelement, configuration are used In if not maximum probability, then according to numerical values recited, there are the flowers in above-mentioned flowers category set from above-mentioned images to be recognized Choose probability in the probability of flowers under grass classification, and by the title of the flowers classification corresponding to the probability selected and the probability Generate the second recognition result.
In some embodiments, above-mentioned first generation subelement is further configured to:According to descending suitable of numerical value Sequence is ranked up the probability there are the flowers under the flowers classification in above-mentioned flowers category set in above-mentioned images to be recognized, Obtain probability sequence;Preset number probability is chosen since the stem of above-mentioned probability sequence.
In some embodiments, above-mentioned first generation subelement is further configured to:From above-mentioned images to be recognized There are the probability chosen in the probability of the flowers under the flowers classification in above-mentioned flowers category set not less than probability threshold value.
In some embodiments, above-mentioned output unit further includes:Second generation subelement, if being configured to most probably Rate, then generation are used to indicate the text message that flowers are not present in above-mentioned images to be recognized, by above-mentioned text message and above-mentioned treat Identify that there is no the probability of flowers the second recognition results of generation in image.
In some embodiments, above device further includes:Storage unit is configured to using above-mentioned images to be recognized as new Sample image stored.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes:One or more processing Device;Storage device, for storing one or more programs;When said one or multiple programs are by said one or multiple processors It performs so that said one or multiple processors are realized such as the method for realization method reflection any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence is realized when above procedure is executed by processor such as the method for realization method reflection any in first aspect.
Method and apparatus provided by the embodiments of the present application for identifying flowers, by the way that acquired images to be recognized is defeated Enter flowers identification model trained in advance, to obtain the first recognition result, wherein, it is to be identified which includes this The probability and the probability there is no flowers that there are the flowers under the flowers classification in the flowers category set specified in image.Then The first recognition result based on gained generates the second recognition result, and defeated second recognition result.So as to be effectively utilized flowers Identification model obtains the first recognition result and obtains the second recognition result based on the first recognition result, realizes to flower The identification of grass.
Description of the drawings
By reading the detailed reflection made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart for being used to identify one embodiment of the method for flowers according to the application;
Fig. 3 is the schematic diagram for being used to identify an application scenarios of the method for flowers according to the application;
Fig. 4 is the structure diagram for being used to identify one embodiment of the device of flowers according to the application;
Fig. 5 is adapted for the structure diagram of the computer system of the electronic equipment for realizing the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is anti- The specific embodiment reflected is used only for explaining related invention rather than the restriction to the invention.It also should be noted that in order to Convenient for reflection, illustrated only in attached drawing and invent relevant part with related.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the method for being used to identify flowers that can apply the application or the implementation for identifying the device of flowers The exemplary system architecture 100 of example.
As shown in Figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 101,102,103 by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as web browser should on terminal device 101,102,103 It is applied with, searching class, image identification class application etc..
Terminal device 101,102,103 can be various electronic equipments, including but not limited to smart mobile phone, tablet computer, Pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services.For example, server 105 can from terminal device 101, 102nd, 103 images to be recognized is obtained, and to the images to be recognized analyze etc. processing, and by handling result (such as generation Second recognition result) feed back to terminal device.
It should be noted that generally being held for the method that identifies flowers by server 105 of being provided of the embodiment of the present application Row, correspondingly, the device for identifying flowers is generally positioned in server 105.
It should be pointed out that if images to be recognized is server 105 from locally obtaining, then can in system architecture 100 Not include terminal device 101,102,103.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realization need Will, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the flow for being used to identify one embodiment of the method for flowers according to the application is shown 200.This is used for the flow 200 for identifying the method for flowers, includes the following steps:
Step 201, images to be recognized is obtained.
In the present embodiment, for identifying electronic equipment (such as the service shown in FIG. 1 of the method for flowers operation thereon Device 105) images to be recognized can be obtained from the terminal device (such as terminal device shown in FIG. 1 101,102,103) connected. Above-mentioned electronic equipment can also receive URL (the Uniform Resource of the images to be recognized of terminal device transmission Locator, uniform resource locator), images to be recognized is obtained according to the URL.Certainly, above-mentioned electronic equipment can also be from local Obtain images to be recognized.Wherein, which can show the image of flowers or do not show flowers Image.
Step 202, by images to be recognized input flowers identification model trained in advance, the first recognition result is obtained.
In the present embodiment, acquired images to be recognized can be inputted flowers trained in advance and known by above-mentioned electronic equipment Other model, obtains the first recognition result.Wherein, which can include the presence of the flower specified in the images to be recognized The probability and the probability there is no flowers of the flowers under flowers classification in grass category set.The flowers identification model can be used for Characterize the correspondence between image and the first recognition result.
It should be noted that the summation of each probability in first recognition result can be equal to 1.In addition, flowers classification Can be the classification for belonging to the kind in kind according to flowers section to divide, flowers classification can for example include tree peony, Chinese herbaceous peony, chrysanthemum, purple Common vetch flower, Chinese rose, lily, plum blossom, Jasmine etc..Certainly, flowers classification can also be category or the section belonged to according to flowers section in kind Come the classification divided.For by the flowers classification marked off is belonged to, flowers classification can for example include lilium, Aloe, Du Cuckoo category, impatiens, Hibiscus, Chrysanthemum, Lagerstroemia etc..
It should be pointed out that flowers identification model can be technical staff based on to great amount of images and the first recognition result It counts and pre-establishes, be stored with multiple images and the mapping table of the correspondence of the first recognition result.
In some optional realization methods of the present embodiment, flowers identification model can also be by preset convolution Neural network (Convolutional Neural Network, CNN) is trained.Wherein, the convolutional neural networks It can be indiscipline or not train the multilayer convolutional neural networks completed.The convolutional neural networks can for example include convolution Layer, pond layer, full articulamentum and loss layer.In addition, non-first convolutional layer in the convolutional neural networks can with it is non-positioned at this At least one convolutional layer before first convolutional layer is connected.For example, the non-first convolutional layer can be with the institute before it There is convolutional layer to be connected;The non-first convolutional layer can also be connected with the part convolutional layer before it.
It should be noted that above-mentioned flowers identification model can be above-mentioned electronic equipment or remotely lead to above-mentioned electronic equipment What the server of letter connection was trained by performing following training step:
First, preset sample image set and mark corresponding with each sample image in the sample image set are obtained Label.Wherein, there may be the sample image for showing flowers in sample image set, there may also be the samples for not showing flowers This image.For showing the sample image of flowers, the label corresponding to the sample image can serve to indicate that the sample image The flowers classification that the flowers of display are belonged to.For not showing the sample image of flowers, the label corresponding to the sample image It can serve to indicate that and flowers are not present in the sample image.In addition, the sample in sample image set and the sample image set Label corresponding to image can be stored in advance in the training step actuating station (such as above-mentioned electronic equipment or with above-mentioned electronics The server of equipment telecommunication connection) it is local, naturally it is also possible to it is stored in advance in the server that the actuating station is connected, this Embodiment does not do any restriction to content in this respect.
Then, using machine learning method, based on each sample image institute in sample image set, sample image set Corresponding label, preset Classification Loss function and back-propagation algorithm are trained above-mentioned convolutional neural networks, are spent Grass identification model.Here, in the training process, sample image can be inputted above-mentioned convolutional neural networks by above-mentioned actuating station, be obtained To the first recognition result corresponding with the sample image, above-mentioned actuating station can determine to be somebody's turn to do using preset Classification Loss function The difference between label corresponding to first recognition result and the sample image, above-mentioned electronic equipment can be adopted according to the difference The parameter in above-mentioned convolutional neural networks is adjusted with preset back-propagation algorithm.
It should be noted that above-mentioned Classification Loss function can be various loss function (such as the Hinge for classification Loss functions or Softmax Loss functions etc.).In the training process, Classification Loss function can constrain the side of convolution kernel modification Formula and direction, trained target are to make the value of Classification Loss function minimum.Thus, the ginseng of convolutional neural networks obtained after training The value of number as Classification Loss function parameter corresponding when being minimum value.
In addition, above-mentioned back-propagation algorithm is alternatively referred to as error backpropagation algorithm or Back Propagation Algorithm.Reversely pass The learning process for broadcasting algorithm is made of forward-propagating process and back-propagation process.In feedforward network, input signal is through input Layer input, is calculated by hidden layer, is exported by output layer.By output valve compared with mark value, if there is error, by error reversely by Output layer in this process, can utilize gradient descent algorithm (such as stochastic gradient descent algorithm) right to input Es-region propagations Neuron weights (such as parameter of convolution kernel etc. in convolutional layer) are adjusted.
Step 203, the first recognition result based on gained generates the second recognition result, and exports the second recognition result.
In the present embodiment, after above-mentioned electronic equipment obtains the first recognition result by performing step 202, above-mentioned electronics is set Standby first recognition result that can be based on generates the second recognition result, and export second recognition result.It is if for example, acquired Images to be recognized derives from above-mentioned terminal device, then above-mentioned electronic equipment can export second recognition result to above-mentioned terminal Equipment.If the images to be recognized is locally obtained from above-mentioned electronic equipment, above-mentioned electronic equipment can tie second identification Fruit is exported to the display screen of above-mentioned electronic equipment or the specified file stored, naturally it is also possible to output to above-mentioned electronic equipment The server of telecommunication connection.
Here, above-mentioned electronic equipment can first determine in acquired images to be recognized there is no the probability of flowers whether be Maximum probability in first recognition result, if not maximum probability, then above-mentioned electronic equipment can will be in the images to be recognized There are the flowers classifications corresponding to the maximum probability in the probability of the flowers under the flowers classification in above-mentioned flowers category set Title generates the second recognition result.Assuming that the entitled tree peony of the flowers classification corresponding to the maximum probability, then second knowledge Other result can include " tree peony ".
Optionally, above-mentioned electronic equipment can also be by the name of the flowers classification corresponding to the maximum probability and the maximum probability Claim generation the second recognition result.Assuming that the maximum probability is 0.912, flowers classification corresponding to the maximum probability it is entitled male It is red, then second recognition result can include " tree peony -0.912 ".
In some optional realization methods of the present embodiment, if the probability in the images to be recognized there is no flowers is not Maximum probability in first recognition result, then above-mentioned electronic equipment can be deposited from the images to be recognized according to numerical values recited Probability is chosen in the probability of the flowers under flowers classification in above-mentioned flowers category set, and the probability selected is general with this The title of flowers classification corresponding to rate generates the second recognition result.It should be pointed out that when second recognition result includes two During a Yi Shang probability, the flowers item name in second recognition result can be according to descending suitable of corresponding probability Sequence arrangement.
For example, above-mentioned electronic equipment can be according to the descending sequence of numerical value, to there are above-mentioned in the images to be recognized The probability of the flowers under flowers classification in flowers category set is ranked up, and obtains probability sequence.Above-mentioned electronic equipment can be with Preset number (such as 3 or 5 etc.) a probability is chosen since the stem of the probability sequence.It should be understood that the preset number is can With what is be adjusted according to actual needs, the present embodiment does not do any restriction to content in this respect.
For another example above-mentioned electronic equipment can there are the flowers classes in above-mentioned flowers category set from the images to be recognized The probability not less than probability threshold value (such as 0.5 etc.) is chosen in the probability of flowers under not.It should be understood that the probability threshold value is can With what is be adjusted according to actual needs, the present embodiment does not do any restriction to content in this respect.
In some optional realization methods of the present embodiment, if in the images to be recognized there are the probability of flowers be gained The first recognition result in maximum probability, then above-mentioned electronic equipment can generate to be used to indicate in the images to be recognized and be not present The text message of flowers, by there is no the probability of flowers the second recognition results of generation in text information and the images to be recognized. For example, text information can include " non-flowers ".Assuming that the probability is 0.998, which can include " non-flower Grass -0.998 ".
In some optional realization methods of the present embodiment, above-mentioned electronic equipment can be using the images to be recognized as new Sample image stored.In this way, can continuous enlarged sample image quantity, and the new sample image can be used In the follow-up training flow of above-mentioned flowers identification model, above-mentioned flowers identification model can be made to pass through iteration and more newly arrive raising in advance Survey accuracy.
With continued reference to Fig. 3, Fig. 3 is the signal for being used to identify the application scenarios of the method for flowers according to the present embodiment Figure.In the application scenarios of Fig. 3, first, user can show flowers by the terminal device held to server upload Images to be recognized 301;Then, images to be recognized 301 can be inputted flowers identification model by server, obtain the first identification knot Fruit;Then, server can be by preceding 5 probability of numerical value maximum and the name of corresponding flowers classification in the first recognition result Claim generation the second recognition result 302, and the second recognition result 302 is exported to terminal device.Wherein, can be on terminal device 301 and second recognition result 302 of existing images to be recognized.
The method that above-described embodiment of the application provides, is effectively utilized flowers identification model to obtain the first identification knot Fruit and the second recognition result is obtained based on the first recognition result, realize the identification to flowers.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides one kind for identifying flower One embodiment of the device of grass, the device embodiment is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 4, it is used to identify that the device 400 of flowers to include shown in the present embodiment:Acquiring unit 401, identification are single Member 402 and output unit 403.Wherein, acquiring unit 401 is configured to obtain images to be recognized;Recognition unit 402 is configured to By above-mentioned images to be recognized input flowers identification model trained in advance, the first recognition result is obtained, wherein, above-mentioned first identification As a result include the probability that there are the flowers under the flowers classification in the flowers category set specified in above-mentioned images to be recognized and not There are the probability of flowers, above-mentioned flowers identification model is used to characterize the correspondence between image and the first recognition result;Output Unit 403 is configured to the first recognition result based on gained and generates the second recognition result, and exports above-mentioned second recognition result.
In the present embodiment, for identifying in the device 400 of flowers:Acquiring unit 401, recognition unit 402 and output are single The specific processing of member 403 and its caused technique effect can be respectively with reference to step 201, the steps 202 in 2 corresponding embodiment of figure With the related description of step 203, details are not described herein.
In some optional realization methods of the present embodiment, above-mentioned flowers identification model can be by preset volume Product neural network is trained, wherein, the convolutional neural networks can include convolutional layer, pond layer, full articulamentum and Loss layer, the non-first convolutional layer in the convolutional neural networks and at least one convolutional layer before the non-first convolutional layer It is connected.
In some optional realization methods of the present embodiment, above-mentioned flowers identification model can be walked by following training What rapid training obtained:Obtain preset sample image set and corresponding with each sample image in above-mentioned sample image set Label, wherein, there may be the sample image for showing flowers in above-mentioned sample image set;Utilize machine learning method, base The label corresponding to each sample image, preset classification damage in above-mentioned sample image set, above-mentioned sample image set It loses function and back-propagation algorithm is trained above-mentioned convolutional neural networks, obtain flowers identification model.
In some optional realization methods of the present embodiment, above-mentioned output unit 403 can include:Determination subelement (not shown), be configured to determine above-mentioned images to be recognized in there is no flowers probability whether be gained first identification As a result the maximum probability in;First generation subelement (not shown), is configured to if not maximum probability, then according to numerical value Size, it is general there are being chosen in the probability of the flowers under the flowers classification in above-mentioned flowers category set from above-mentioned images to be recognized Rate, and the title of the flowers classification corresponding to the probability selected and the probability is generated into the second recognition result.
In some optional realization methods of the present embodiment, use can be further configured in above-mentioned first generation subelement In:According to the sequence that numerical value is descending, to there are the flowers classifications in above-mentioned flowers category set in above-mentioned images to be recognized Under the probability of flowers be ranked up, obtain probability sequence;It is general that preset number is chosen since the stem of above-mentioned probability sequence Rate.
In some optional realization methods of the present embodiment, use can also be further configured in above-mentioned first generation subelement In:It is not small there are being chosen in the probability of the flowers under the flowers classification in above-mentioned flowers category set from above-mentioned images to be recognized In the probability of probability threshold value.
In some optional realization methods of the present embodiment, above-mentioned output unit 403 can also include:Second generation Unit (not shown), if being configured to maximum probability, then generation, which is used to indicate in above-mentioned images to be recognized, is not present flower The text message of grass ties the second identification of probability generation that flowers are not present in above-mentioned text message and above-mentioned images to be recognized Fruit.
In some optional realization methods of the present embodiment, above device 400 can also include:Storage unit is (in figure It is not shown), it is configured to store above-mentioned images to be recognized as new sample image.
The device that above-described embodiment of the application provides, is effectively utilized flowers identification model to obtain the first identification knot Fruit and the second recognition result is obtained based on the first recognition result, realize the identification to flowers.
Below with reference to Fig. 5, it illustrates suitable for being used for realizing the computer system 500 of the electronic equipment of the embodiment of the present application Structure diagram.Electronic equipment shown in Fig. 5 is only an example, to the function of the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into program in random access storage device (RAM) 503 from storage section 508 and Perform various appropriate actions and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data. CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always Line 504.
I/O interfaces 505 are connected to lower component:Importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loud speaker etc.;Storage section 508 including hard disk etc.; And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net performs communication process.Driver 510 is also according to needing to be connected to I/O interfaces 505.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on driver 510, as needed in order to be read from thereon Computer program be mounted into storage section 508 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart reflection Software program.For example, embodiment of the disclosure includes a kind of computer program product, including being carried on computer-readable medium On computer program, which includes for the program code of the method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 509 and/or from detachable media 511 are mounted.When the computer program is performed by central processing unit (CPU) 501, perform what is limited in the system of the application Above-mentioned function.
It should be noted that the computer-readable medium shown in the application can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two arbitrarily combines.Computer readable storage medium for example can be --- but not It is limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor or arbitrary above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more conducting wires, just It takes formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this application, computer readable storage medium can any include or store journey The tangible medium of sequence, the program can be commanded the either device use or in connection of execution system, device.And at this In application, computer-readable signal media can include in a base band or as a carrier wave part propagation data-signal, Wherein carry computer-readable program code.Diversified forms may be used in the data-signal of this propagation, including but it is unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By instruction execution system, device either device use or program in connection.It is included on computer-readable medium Program code can be transmitted with any appropriate medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.In this regard, each box in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for above-mentioned module, program segment or code include one or more The executable instruction of logic function as defined in being used to implement.It should also be noted that in some implementations as replacements, institute in box The function of mark can also be occurred with being different from the sequence marked in attached drawing.For example, two boxes succeedingly represented are practical On can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depended on the functions involved.Also It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and perform rule The group of specialized hardware and computer instruction is realized or can be used to the dedicated hardware based system of fixed functions or operations It closes to realize.
Being reflected in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.The unit reflected can also be set in the processor, for example, can be reflected as:A kind of processor packet Include acquiring unit, recognition unit and output unit.Wherein, the title of these units is not formed under certain conditions to the unit The restriction of itself, for example, acquiring unit can also be reflected as " unit for obtaining images to be recognized ".
As on the other hand, present invention also provides a kind of computer-readable medium, which can be Included in the electronic equipment reflected in above-described embodiment;Can also be individualism, and without be incorporated the electronic equipment in. Above computer readable medium carries one or more program, and when said one or multiple programs, by one, the electronics is set During standby execution so that the electronic equipment includes:Obtain images to be recognized;Images to be recognized input flowers trained in advance are known Other model, obtains the first recognition result, wherein, which can include the presence of the flower specified in the images to be recognized The probability and the probability there is no flowers of the flowers under flowers classification in grass category set, the flowers identification model can be used for Characterize the correspondence between image and the first recognition result;The first recognition result based on gained generates the second recognition result, And export second recognition result.
The preferred embodiment and the explanation to institute's application technology principle that above reflection is only the application.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the specific combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature The other technical solutions for arbitrarily combining and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical solution that the technical characteristic of energy is replaced mutually and formed.

Claims (18)

1. a kind of method for identifying flowers, including:
Obtain images to be recognized;
By images to be recognized input flowers identification model trained in advance, the first recognition result is obtained, wherein, described first Recognition result includes the probability that there are the flowers under the flowers classification in the flowers category set specified in the images to be recognized With there is no the probability of flowers, the flowers identification model is used to characterize the correspondence between image and the first recognition result;
The first recognition result based on gained generates the second recognition result, and exports second recognition result.
2. according to the method described in claim 1, wherein, the flowers identification model is by preset convolutional neural networks It is trained, wherein, the convolutional neural networks include convolutional layer, pond layer, full articulamentum and loss layer, the volume Non- first convolutional layer in product neural network is connected at least one convolutional layer before the non-first convolutional layer.
3. according to the method described in claim 2, wherein, the flowers identification model is to train to obtain by following training step 's:
Preset sample image set and label corresponding with each sample image in the sample image set are obtained, In, there is the sample image for showing flowers in the sample image set;
Using machine learning method, based on each sample image institute in the sample image set, the sample image set Corresponding label, preset Classification Loss function and back-propagation algorithm are trained the convolutional neural networks, are spent Grass identification model.
4. according to the method described in claim 1, wherein, second identification of the first recognition result generation based on gained is tied Fruit, including:
Determine in the images to be recognized there is no flowers probability whether be gained the first recognition result in maximum probability;
If not maximum probability, then according to numerical values recited, there are in the flowers category set from the images to be recognized Choose probability in the probability of flowers under flowers classification, and by the name of the flowers classification corresponding to the probability selected and the probability Claim generation the second recognition result.
5. according to the method described in claim 4, wherein, described according to numerical values recited, there are institutes from the images to be recognized It states in the probability of the flowers under the flowers classification in flowers category set and chooses probability, including:
According to the sequence that numerical value is descending, to there are the flowers classifications in the flowers category set in the images to be recognized Under the probability of flowers be ranked up, obtain probability sequence;
Preset number probability is chosen since the stem of the probability sequence.
6. according to the method described in claim 4, wherein, described according to numerical values recited, there are institutes from the images to be recognized It states in the probability of the flowers under the flowers classification in flowers category set and chooses probability, further include:
There are chosen not in the probability of the flowers under the flowers classification in the flowers category set from the images to be recognized Less than the probability of probability threshold value.
7. according to the method described in claim 4, wherein, second identification of the first recognition result generation based on gained is tied Fruit further includes:
If maximum probability, then generation is used to indicate the text message that flowers are not present in the images to be recognized, by the text There is no the probability of flowers in this information and the images to be recognized to generate the second recognition result.
8. according to the method described in claim 1, wherein, the method further includes:
It is stored the images to be recognized as new sample image.
9. it is a kind of for identifying the device of flowers, including:
Acquiring unit is configured to obtain images to be recognized;
Recognition unit is configured to, by images to be recognized input flowers identification model trained in advance, obtain the first identification As a result, wherein, first recognition result includes the flowers for having in the flowers category set specified in the images to be recognized The probability of flowers under classification and the probability there is no flowers, the flowers identification model are tied for characterizing image and the first identification Correspondence between fruit;
Output unit is configured to the first recognition result based on gained and generates the second recognition result, and exports described second and know Other result.
10. device according to claim 9, wherein, the flowers identification model is by preset convolutional Neural net What network was trained, wherein, the convolutional neural networks include convolutional layer, pond layer, full articulamentum and loss layer, described Non- first convolutional layer in convolutional neural networks is connected at least one convolutional layer before the non-first convolutional layer.
11. device according to claim 10, wherein, the flowers identification model is trained by following training step It arrives:
Preset sample image set and label corresponding with each sample image in the sample image set are obtained, In, there is the sample image for showing flowers in the sample image set;
Using machine learning method, based on each sample image institute in the sample image set, the sample image set Corresponding label, preset Classification Loss function and back-propagation algorithm are trained the convolutional neural networks, are spent Grass identification model.
12. device according to claim 9, wherein, the output unit includes:
Determination subelement, be configured to determine the images to be recognized in there is no flowers probability whether be gained first know Maximum probability in other result;
First generation subelement, is configured to if not maximum probability, then according to numerical values recited, deposit from the images to be recognized Probability is chosen in the probability of the flowers under flowers classification in the flowers category set, and the probability selected is general with this The title of flowers classification corresponding to rate generates the second recognition result.
13. device according to claim 12, wherein, the first generation subelement is further configured to:
According to the sequence that numerical value is descending, to there are the flowers classifications in the flowers category set in the images to be recognized Under the probability of flowers be ranked up, obtain probability sequence;
Preset number probability is chosen since the stem of the probability sequence.
14. device according to claim 12, wherein, the first generation subelement is further configured to:
There are chosen not in the probability of the flowers under the flowers classification in the flowers category set from the images to be recognized Less than the probability of probability threshold value.
15. device according to claim 12, wherein, the output unit further includes:
Second generation subelement, if being configured to maximum probability, then generation, which is used to indicate in the images to be recognized, is not present The text message of flowers ties the second identification of probability generation that flowers are not present in the text message and the images to be recognized Fruit.
16. device according to claim 9, wherein, described device further includes:
Storage unit is configured to store the images to be recognized as new sample image.
17. a kind of electronic equipment, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are performed by one or more of processors so that one or more of processors are real Now such as method according to any one of claims 1-8.
18. a kind of computer readable storage medium, is stored thereon with computer program, wherein, described program is executed by processor Shi Shixian methods for example according to any one of claims 1-8.
CN201810044186.9A 2018-01-17 2018-01-17 For identifying the method and apparatus of flowers Pending CN108171275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810044186.9A CN108171275A (en) 2018-01-17 2018-01-17 For identifying the method and apparatus of flowers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810044186.9A CN108171275A (en) 2018-01-17 2018-01-17 For identifying the method and apparatus of flowers

Publications (1)

Publication Number Publication Date
CN108171275A true CN108171275A (en) 2018-06-15

Family

ID=62514523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810044186.9A Pending CN108171275A (en) 2018-01-17 2018-01-17 For identifying the method and apparatus of flowers

Country Status (1)

Country Link
CN (1) CN108171275A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110276405A (en) * 2019-06-26 2019-09-24 北京百度网讯科技有限公司 Method and apparatus for output information
CN110728300A (en) * 2019-09-09 2020-01-24 交控科技股份有限公司 Method and system for identifying fault type based on turnout action current curve
CN111709480A (en) * 2020-06-17 2020-09-25 北京百度网讯科技有限公司 Method and device for identifying image category
CN111814813A (en) * 2019-04-10 2020-10-23 北京市商汤科技开发有限公司 Neural network training and image classification method and device
CN113569593A (en) * 2020-04-28 2021-10-29 京东方科技集团股份有限公司 Intelligent vase system, flower identification and display method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361348A (en) * 2014-10-27 2015-02-18 华南理工大学 Flower and plant recognition method on intelligent terminal
CN106960219A (en) * 2017-03-10 2017-07-18 百度在线网络技术(北京)有限公司 Image identification method and device, computer equipment and computer-readable medium
CN107153844A (en) * 2017-05-12 2017-09-12 上海斐讯数据通信技术有限公司 The accessory system being improved to flowers identifying system and the method being improved
CN107516128A (en) * 2017-06-12 2017-12-26 南京邮电大学 A kind of flowers recognition methods of the convolutional neural networks based on ReLU activation primitives
CN107527065A (en) * 2017-07-25 2017-12-29 北京联合大学 A kind of flower variety identification model method for building up based on convolutional neural networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361348A (en) * 2014-10-27 2015-02-18 华南理工大学 Flower and plant recognition method on intelligent terminal
CN106960219A (en) * 2017-03-10 2017-07-18 百度在线网络技术(北京)有限公司 Image identification method and device, computer equipment and computer-readable medium
CN107153844A (en) * 2017-05-12 2017-09-12 上海斐讯数据通信技术有限公司 The accessory system being improved to flowers identifying system and the method being improved
CN107516128A (en) * 2017-06-12 2017-12-26 南京邮电大学 A kind of flowers recognition methods of the convolutional neural networks based on ReLU activation primitives
CN107527065A (en) * 2017-07-25 2017-12-29 北京联合大学 A kind of flower variety identification model method for building up based on convolutional neural networks

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111814813A (en) * 2019-04-10 2020-10-23 北京市商汤科技开发有限公司 Neural network training and image classification method and device
CN110276405A (en) * 2019-06-26 2019-09-24 北京百度网讯科技有限公司 Method and apparatus for output information
CN110276405B (en) * 2019-06-26 2022-03-01 北京百度网讯科技有限公司 Method and apparatus for outputting information
CN110728300A (en) * 2019-09-09 2020-01-24 交控科技股份有限公司 Method and system for identifying fault type based on turnout action current curve
CN113569593A (en) * 2020-04-28 2021-10-29 京东方科技集团股份有限公司 Intelligent vase system, flower identification and display method and electronic equipment
CN111709480A (en) * 2020-06-17 2020-09-25 北京百度网讯科技有限公司 Method and device for identifying image category
CN111709480B (en) * 2020-06-17 2023-06-23 北京百度网讯科技有限公司 Method and device for identifying image category

Similar Documents

Publication Publication Date Title
CN108171275A (en) For identifying the method and apparatus of flowers
CN108256476A (en) For identifying the method and apparatus of fruits and vegetables
CN108256474A (en) For identifying the method and apparatus of vegetable
CN107168952A (en) Information generating method and device based on artificial intelligence
CN109325541A (en) Method and apparatus for training pattern
CN108090162A (en) Information-pushing method and device based on artificial intelligence
CN108038469A (en) Method and apparatus for detecting human body
CN107908789A (en) Method and apparatus for generating information
CN107230035A (en) Information-pushing method and device
CN108171276A (en) For generating the method and apparatus of information
CN108171203A (en) For identifying the method and apparatus of vehicle
CN108388674A (en) Method and apparatus for pushed information
CN108197652A (en) For generating the method and apparatus of information
CN108229485A (en) For testing the method and apparatus of user interface
CN109190646B (en) A kind of data predication method neural network based, device and nerve network system
CN107578034A (en) information generating method and device
CN109976997A (en) Test method and device
CN108388563A (en) Information output method and device
CN108256591A (en) For the method and apparatus of output information
CN109934242A (en) Image identification method and device
CN109976995A (en) Method and apparatus for test
CN108491825A (en) information generating method and device
CN110457476A (en) Method and apparatus for generating disaggregated model
CN108921323A (en) Method and apparatus for generating information
CN108960110A (en) Method and apparatus for generating information

Legal Events

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

Application publication date: 20180615