CN111568195A - Brewed beverage identification method, device and computer-readable storage medium - Google Patents

Brewed beverage identification method, device and computer-readable storage medium Download PDF

Info

Publication number
CN111568195A
CN111568195A CN202010133814.8A CN202010133814A CN111568195A CN 111568195 A CN111568195 A CN 111568195A CN 202010133814 A CN202010133814 A CN 202010133814A CN 111568195 A CN111568195 A CN 111568195A
Authority
CN
China
Prior art keywords
brewed beverage
identified
beverage
brewing
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010133814.8A
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.)
Foshan Viomi Electrical Technology Co Ltd
Original Assignee
Foshan Viomi Electrical 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 Foshan Viomi Electrical Technology Co Ltd filed Critical Foshan Viomi Electrical Technology Co Ltd
Priority to CN202010133814.8A priority Critical patent/CN111568195A/en
Publication of CN111568195A publication Critical patent/CN111568195A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47JKITCHEN EQUIPMENT; COFFEE MILLS; SPICE MILLS; APPARATUS FOR MAKING BEVERAGES
    • A47J31/00Apparatus for making beverages
    • A47J31/44Parts or details or accessories of beverage-making apparatus
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47JKITCHEN EQUIPMENT; COFFEE MILLS; SPICE MILLS; APPARATUS FOR MAKING BEVERAGES
    • A47J31/00Apparatus for making beverages
    • A47J31/002Apparatus for making beverages following a specific operational sequence, e.g. for improving the taste of the extraction product
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects

Abstract

The application relates to the technical field of artificial intelligence, and discloses a brewing beverage identification method, equipment and a computer-readable storage medium, wherein the method comprises the following steps: when a brewing drink identification task is received, acquiring a brewing drink image to be identified, which is acquired by the water dispenser; preprocessing the brewing beverage image to be identified, and extracting an interested region from the preprocessed brewing beverage image to be identified; extracting features of the brewed beverage to be identified from the region of interest; inputting the extracted features into a trained brewed beverage recognition model for analysis, and obtaining the type of the brewed beverage to be recognized as a recognition result. The method and the device realize convenient, efficient, quick and accurate identification of the brewing beverage species.

Description

Brewed beverage identification method, device and computer-readable storage medium
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a brewing beverage identification method, equipment and a computer-readable storage medium.
Background
With the continuous improvement of living standard, people are concerned about the quality of life more and more, and especially, people are concerned about the dietotherapy value of brewing drinks more and more, and various brewing drinks become an indispensable part of daily life of people, such as tea containing various abundant vitamins, tea polyphenol with antioxidation and other trace elements beneficial to health. On the other hand, the water dispenser is also more and more popular, and when people use the water dispenser to brew various drinks, in order to ensure the drinking taste, the water temperature and the water quantity suitable for the brewed drinks need to be manually adjusted, and the like, which is inconvenient. In order to realize intelligent brewing of the brewing beverage by the water dispenser, the automatic identification of the type of the brewing beverage is required to be taken as a basis, so that how to automatically identify the type of the brewing beverage is a technical problem to be solved urgently at present.
Disclosure of Invention
The application mainly aims to provide a brewing beverage identification method, equipment and a computer readable storage medium, and aims to realize convenient, efficient, rapid and accurate brewing beverage identification.
To achieve the above object, the present application provides a brewed beverage identification method, the method comprising:
when a brewing drink identification task is received, acquiring a brewing drink image to be identified, which is acquired by the water dispenser;
preprocessing the brewing beverage image to be identified, and extracting an interested region from the preprocessed brewing beverage image to be identified;
extracting features of the brewed beverage to be identified from the region of interest;
inputting the extracted features into a trained brewed beverage recognition model for analysis, and obtaining the type of the brewed beverage to be recognized as a recognition result.
Furthermore, to achieve the above object, the present application also provides a brewed beverage identification device comprising a processor, a memory, and a brewed beverage identification program stored on the memory and executable by the processor, wherein the steps of the brewed beverage identification method as described above are realized when the brewed beverage identification program is executed by the processor.
Furthermore, to achieve the above object, the present application also provides a computer readable storage medium having a brewed beverage identification program stored thereon, wherein the brewed beverage identification program, when executed by a processor, implements the steps of the brewed beverage identification method as described above.
When a brewing beverage identification task is received, firstly, brewing beverage images to be identified are collected by a water dispenser, then, the brewing beverage images to be identified are preprocessed, regions of interest are extracted from the preprocessed brewing beverage images to be identified, then, the features of the brewing beverage to be identified are extracted from the regions of interest, the extracted features are input into a trained brewing beverage identification model to be analyzed, the types of the brewing beverages to be identified are obtained as identification results, automatic identification of the brewing beverages to be identified based on the trained brewing beverage identification model is achieved, identification accuracy of the types of the brewing beverages can be remarkably improved, and identification of the types of the brewing beverages is achieved conveniently, efficiently, quickly and accurately.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic hardware structure diagram of a mobile terminal according to embodiments of the present application;
FIG. 2 is a schematic flow chart diagram illustrating an embodiment of a brewed beverage identification method according to the present application;
FIG. 3 is a schematic view of a water dispenser according to an embodiment of the brewed beverage identification method of the present application;
fig. 4 is a detailed flowchart of a brewed beverage identification method according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
The brewing beverage identification method is mainly applied to brewing beverage identification equipment, and the brewing beverage identification equipment can be a cloud server.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a cloud server according to an embodiment of the present application. In this embodiment, the cloud server may include a processor 1001 (e.g., a Central processing unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory), and the memory 1005 may optionally be a memory separate from the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in FIG. 1 is not limiting of the present application and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005, identified in fig. 1 as a readable computer-readable storage medium, the computer-readable storage medium, may include an operating system, a network communication module, and a brewed beverage identification program. In fig. 1, the network communication module is mainly used for connecting the water dispenser and performing data communication with the water dispenser; and the processor 1001 may call the brewed beverage identification program stored in the memory 1005 and execute the steps of the brewed beverage identification method provided by the embodiment of the present application.
Wherein, in one embodiment, the processor is configured to execute a brewed beverage identification program stored in the memory to perform the steps of:
when a brewing drink identification task is received, acquiring a brewing drink image to be identified, which is acquired by the water dispenser;
preprocessing the brewing beverage image to be identified, and extracting an interested region from the preprocessed brewing beverage image to be identified;
extracting features of the brewed beverage to be identified from the region of interest;
inputting the extracted features into a trained brewed beverage recognition model for analysis, and obtaining the type of the brewed beverage to be recognized as a recognition result.
In some embodiments, the processor implements the pre-processing of the brewed beverage image to be identified, including:
carrying out gray level processing on the brewing beverage image to be identified;
carrying out smooth denoising treatment on the beverage image to be identified after the graying treatment;
and carrying out binarization processing on the beverage image to be identified after the smoothing and denoising processing.
In some embodiments, the processor implements the extracting of the region of interest from the preprocessed brewed beverage image to be identified, including:
determining a minimum circumscribed rectangular area formed by an upper boundary, a left boundary and a lower boundary of the brewing beverage part to be identified in the pre-processed brewing beverage image to be identified by adopting a preset edge detection algorithm;
and extracting the minimum circumscribed rectangular area as an interested area.
In some embodiments, the processor implements the extracting of the region of interest from the preprocessed brewed beverage image to be identified, including:
calculating the sum of pixels of each column in the preprocessed brewed beverage image to be identified;
determining a first target column and a second target column according to the pixel sum of each column;
and calculating the maximum circumscribed matrix between the first target column and the second target column to obtain the region of interest.
In some embodiments, the processor implements the determining a first target column and a second target column from the pixel sums for each column, including:
sorting the pixel sums of each column to find a maximum value column of two pixel sums;
and shifting one maximum value column by a plurality of columns to the left to obtain a first target column, and shifting the other maximum value column by a plurality of columns to the right to obtain a second target column.
In some embodiments, before the processor performs the step of acquiring the image of the brewed beverage to be identified collected by the water dispenser when the task of identifying the brewed beverage is received, the method includes:
acquiring images of a plurality of brewing drinks to construct a training sample set;
and training a brewed beverage recognition model according to the training sample set to obtain the trained brewed beverage recognition model.
In some embodiments, the training of the brewed beverage recognition model according to the training sample set by the processor to obtain a trained brewed beverage recognition model includes:
carrying out normalization processing on the training sample set;
creating a brewed beverage identification model based on a Back Propagation Neural Network (BPNN), and initializing parameters of the brewed beverage identification model;
in some embodiments, the inputting of the training sample set after the normalization processing into the brewed beverage recognition model for training by the processor is implemented to update parameters of the brewed beverage recognition model, so as to obtain a trained brewed beverage recognition model, and the method includes:
inputting the training sample set after the normalization processing into the brewing beverage identification model to obtain forward output and reverse output;
and updating the parameters of the brewed beverage identification model according to the forward output and the reverse output by adopting a gradient descent method to obtain the trained brewed beverage identification model.
Based on the hardware structure, the embodiment of the application provides a brewing beverage identification method.
Referring to fig. 2, fig. 2 is a schematic flow chart of an embodiment of the brewed beverage identification method of the present application. The brewing beverage identification method is realized by brewing beverage identification equipment, and the brewing beverage identification equipment can be equipment with a data processing function, such as a cloud server.
Specifically, as shown in fig. 2, the brewed beverage identification method includes steps S101 to S104.
And S101, acquiring a brewing beverage image to be identified, which is acquired by the water dispenser, when the brewing beverage identification task is received.
Wherein, the cloud server is in communication connection with the water dispenser. The water dispenser is provided with a shooting module which can be a monocular shooting device or a binocular shooting device and comprises a 2D camera, a depth camera, a super-depth-of-field camera and the like; the installation position of the shooting module can be flexibly set according to actual needs, and only the view finding area of the shooting module covers the water taking area below the water outlet of the water dispenser and can collect images below the water outlet of the water dispenser.
Taking the water dispenser shown in fig. 3 as an example, when the water dispenser detects that a container is placed in a water taking area, the shooting module is controlled to capture an image of the beverage to be brewed in the container, then the captured image of the beverage to be brewed is used as the image of the beverage to be identified, a brewing beverage identification task carrying the image of the beverage to be identified is generated, and the brewing beverage identification task is sent to the cloud server so as to request the cloud server to perform brewing beverage identification operation on the image of the beverage to be identified. When the cloud server receives a brewing beverage identification task sent by the water dispenser, firstly, a brewing beverage image to be identified is extracted from the brewing beverage identification task.
It will be appreciated that the beverage to be identified image includes, in addition to the beverage portion to be identified, a container portion and a water intake area portion.
Step S1012, preprocessing the brewed beverage image to be recognized, and extracting an area of interest from the preprocessed brewed beverage image to be recognized.
After the cloud server acquires the brewing beverage image to be recognized, preprocessing the brewing beverage image to be recognized first, and extracting an interested region from the preprocessed brewing beverage image to be recognized.
In some embodiments, the image of the brewed beverage to be identified is preprocessed, in particular: carrying out gray level processing on the brewing beverage image to be identified; carrying out smooth denoising treatment on the beverage image to be identified after the graying treatment; and carrying out binarization processing on the beverage image to be identified after the smoothing and denoising processing.
Because the image of the brewed beverage to be identified, captured by the shooting module of the water dispenser, is colorful, the color is very easily influenced by factors such as illumination and the like, and the color is difficult to provide key information, the image of the brewed beverage to be identified is subjected to gray processing firstly.
Considering that the brewing beverage image to be recognized contains noise due to the fact that the shooting module of the water dispenser is possibly influenced by the shooting module and/or external environment noise when capturing the brewing beverage image to be recognized, the brewing beverage image to be recognized needs to be subjected to smooth denoising treatment first, and specifically, the brewing beverage image to be recognized can be subjected to smooth denoising treatment by adopting a low-pass filtering algorithm. Illustratively, a bilateral filter can be adopted to filter the brewed beverage image to be identified, so that the edge contour details of the brewed beverage image to be identified can be well kept while the noise of the brewed beverage image to be identified is removed.
Because the brewed beverage image to be identified comprises the brewed beverage part to be identified, the container part and the water taking area part, the brewed beverage image to be identified after the smooth denoising treatment needs to be subjected to binarization treatment so as to divide the brewed beverage part to be identified in the brewed beverage image to be identified from the container part and the water taking area part, so that the container part and the water taking area part are removed, and preparation is made for the subsequent identification of the brewed beverage to be identified. Illustratively, a threshold value method can be adopted to carry out binarization processing on the smooth and denoised drink brewing image to be identified.
After the preprocessing of the brewing beverage image to be recognized is completed, the region of interest can be extracted from the preprocessed brewing beverage image to be recognized.
In some embodiments, a region of interest is extracted from the preprocessed brewed beverage image to be identified, specifically: determining a minimum circumscribed rectangular area formed by an upper boundary, a left boundary and a lower boundary of the brewing beverage part to be identified in the pre-processed brewing beverage image to be identified by adopting a preset edge detection algorithm; and extracting the minimum circumscribed rectangular area as an interested area.
For example, the preset edge detection algorithm may be Canny operator, and the Canny operator can be used for detecting the upper boundary, the left boundary and the lower boundary of the brewed beverage portion to be identified from the preprocessed brewed beverage image to be identified, so that the minimum circumscribed rectangular region formed by the upper boundary, the left boundary and the lower boundary of the brewed beverage portion to be identified can be accurately determined, and the minimum circumscribed rectangular region is extracted, so that the ROI region where the brewed beverage to be identified is located can be obtained.
In some embodiments, a region of interest is extracted from the preprocessed brewed beverage image to be identified, specifically: calculating the sum of pixels of each column in the preprocessed brewed beverage image to be identified; determining a first target column and a second target column according to the pixel sum of each column; and calculating the maximum circumscribed matrix between the first target column and the second target column to obtain the region of interest.
In some embodiments, the determining a first target column and a second target column according to the pixel sum of each column specifically includes: sorting the pixel sums of each column to find a maximum value column of two pixel sums; and shifting one maximum value column by a plurality of columns to the left to obtain a first target column, and shifting the other maximum value column by a plurality of columns to the right to obtain a second target column.
That is, by calculating the pixel sum of each column in the preprocessed brewed beverage image to be recognized, the maximum value columns of two pixel sums can be found, one of the maximum value columns is shifted to the left by a plurality of columns to obtain a first target column, the other maximum value column is shifted to the right by a plurality of columns to obtain a second target column, and then the maximum circumscribed matrix between the first target column and the second target column is calculated to obtain the ROI area where the brewed beverage to be recognized is located. For example, a sliding window with a length of 21 may be used to search 2 ranges from 50 th column to 350 th column and from 350 th column to 650 th column, respectively, calculate every 20 columns of pixels and the added value, find two columns corresponding to the maximum value, then shift the found one column by 50 columns to the left to obtain a first target column, shift the other column by 50 columns to the right to obtain a second target column, and finally obtain the ROI area where the brewed beverage to be identified is located by solving the maximum endo-epi matrix between the first target column and the second target column.
And S1013, extracting the characteristics of the brewed beverage to be identified from the region of interest.
After the region of interest is extracted from the preprocessed brewing beverage image to be identified, the features of the shape, the texture and the like of the brewing beverage to be identified can be extracted from the region of interest.
And S1014, inputting the extracted characteristics into a trained brewed beverage recognition model for analysis to obtain the type of the brewed beverage to be recognized as a recognition result.
After the characteristics of the shape, the texture and the like of the brewed beverage to be identified are extracted from the region of interest, the extracted characteristics are input into a trained brewed beverage identification model for analysis, wherein the brewed beverage identification model is a Back Propagation Neural Network model (Back Propagation Neural Network) specifically, the trained brewed beverage identification model has good stability and prediction capability, and only one prediction result is obtained. And inputting the extracted characteristics into a trained brewed beverage identification model to obtain a brewed beverage type code output by the brewed beverage identification model, namely determining which brewed beverage to be identified belongs to in the image of the brewed beverage to be identified as an identification result.
According to the brewing beverage identification method, when a brewing beverage identification task is received, firstly, the brewing beverage image to be identified is collected by the water dispenser, then the brewing beverage image to be identified is preprocessed, the region of interest is extracted from the preprocessed brewing beverage image to be identified, then the characteristics of the brewing beverage to be identified are extracted from the region of interest, the extracted characteristics are input into the trained brewing beverage identification model for analysis, the type of the brewing beverage to be identified is obtained as an identification result, automatic identification of the brewing beverage to be identified based on the trained brewing beverage identification model is achieved, the identification precision of the type of the brewing beverage can be remarkably improved, and the brewing beverage species identification is conveniently, efficiently, quickly and accurately achieved.
Further, another embodiment of the brewed beverage identification method is provided based on one embodiment. Referring to fig. 4, fig. 4 is a schematic flowchart of another embodiment of the brewed beverage identification method of the present application, and the difference between the another embodiment of the brewed beverage identification method and the one embodiment of the brewed beverage identification method is that step S101 includes steps S105 to S106.
And S105, acquiring images of a plurality of brewed drinks to construct a training sample set.
It should be appreciated that in this embodiment, the brewed beverage recognition model needs to be trained in advance before step S101. Specifically, a large number of images of a plurality of common brewing beverages are collected, for example, images of eight common brewing beverages including coffee, tea leaves, scented tea, milk powder, oatmeal, honey, medlar and sesame paste can be collected, then the images of each brewing beverage are preprocessed, namely, the images of each brewing beverage are grayed, then the images of each brewing beverage after graying are subjected to smooth denoising processing, and finally the images of the brewing beverages after smooth denoising processing are subjected to binarization processing.
Further, the features of each brewed beverage, such as morphology, texture, etc., are extracted from the preprocessed image of each brewed beverage, respectively, to construct a training sample set, exemplarily:
training sample set { training sample 1, training sample 2, training sample 3, training sample 4, training sample 5, training sample 6, training sample 7, training sample 8}
{ characteristics of coffee, tea, scented tea, milk powder, oatmeal, honey, wolfberry, sesame paste }
And S106, training a brewed beverage recognition model according to the training sample set to obtain the trained brewed beverage recognition model.
Then, the brewed beverage recognition model can be trained according to the training sample set, and the trained brewed beverage recognition model is obtained.
In some embodiments, the training of the brewed beverage recognition model according to the training sample set to obtain a trained brewed beverage recognition model specifically includes: carrying out normalization processing on the training sample set; creating a brewed beverage identification model based on a Back Propagation Neural Network (BPNN), and initializing parameters of the brewed beverage identification model; and inputting the training sample set subjected to the normalization treatment into the brewed beverage identification model for training so as to update the parameters of the brewed beverage identification model and obtain the trained brewed beverage identification model.
In some embodiments, the training sample set after the normalization processing is input into the brewed beverage recognition model for training, so as to update parameters of the brewed beverage recognition model, and obtain a trained brewed beverage recognition model, specifically: inputting the training sample set after the normalization processing into the brewing beverage identification model to obtain forward output and reverse output; and updating the parameters of the brewed beverage identification model according to the forward output and the reverse output by adopting a gradient descent method to obtain the trained brewed beverage identification model.
That is, the process of training the brewed beverage recognition model is as follows:
a. carrying out normalization processing on each training sample in the training sample set by adopting a normalization function premmx, taking each training sample after normalization as the input of a BPNN model, and taking the corresponding brewed beverage category code as correct output;
b. creating a BPNN model, setting the BPNN model into three layers (an input layer + a hidden layer + an output layer), setting the number of nodes of the input layer (5 layers), the number of nodes of the hidden layer (17-25 layers can be selected), the number of nodes of the output layer (1 layer), a hidden layer transfer function (tansig function), an output layer transfer function (purelin function), the number of training iterations (10000 times can be selected), the learning efficiency in the BPNN network (0.05 can be selected), and the minimum error of a training target (0.0001);
c. initializing parameters of the BPNN model, including weights and biases (the bias can be regarded as the own weight of each neuron), i.e., initializing the weights and biases of the BPNN model to random numbers from a normal distribution (0, 1);
d. performing iterative training on the constructed BPNN model by adopting a traincgf method, namely, inputting a training sample, calculating the output of each hidden layer and output layer forward, calculating the deviation of the output layer from the correct output, namely the error of the output layer, since the smaller the error, the higher the accuracy of the model, the optimization of the weights and offsets using the gradient descent method makes the error smaller, i.e. the error propagates backwards, specifically, with the output layer as input, the inverse output of the output layer is obtained, then combining the reverse output with the connection weight as the reverse input of the hidden layer to obtain the reverse output of the hidden layer, then, calculating a weight gradient (the input of the output layer is multiplied by the reverse output of the hidden layer) connected between the input layer and the hidden layer based on the reverse output of the hidden layer, and updating the weight and the bias of the BPNN model after the weight gradient exists;
e. and (4) for each training sample, circulating the d process until the error is less than or equal to the minimum error of the previously set training target or the iteration number is reached, and obtaining a trained brewed beverage identification model.
In some embodiments, the brewed beverage recognition model is not immediately put into use after being trained, but the accuracy of the trained brewed beverage recognition model is first checked. Specifically, a preset verification sample set may be obtained, each test sample in the test sample set is normalized by using a normalization function premmx, and then each sample in the normalized test sample set is sequentially input into the trained brewed beverage identification model, so as to obtain a brewed beverage type code (i.e., a prediction result) output by the trained brewed beverage identification model. Then, judging whether the identification of each brewing beverage by the trained brewing beverage identification model is accurate according to the actual brewing beverage type and the prediction result, if so, adding 1 to the accurate identification number, and then according to a formula: and (3) calculating the recognition accuracy of the trained BPNN model, comparing the calculated recognition accuracy with a preset threshold (for example, 75%), and if the recognition accuracy of the trained BPNN model is greater than the preset threshold, judging that the recognition accuracy of the trained BPNN model meets the condition, so that the trained BPNN model can be put into use.
In addition, the embodiment of the application also provides a computer readable storage medium.
The present computer readable storage medium has a brewed beverage identification program stored thereon, wherein the brewed beverage identification program, when executed by a processor, implements the steps of the brewed beverage identification method as described above.
The method implemented when the brewed beverage identification program is executed can refer to various embodiments of the brewed beverage identification method of the present application, and details are not repeated here.
The computer-readable storage medium may be an internal storage unit of the cloud server in the foregoing embodiment, for example, a hard disk or a memory of the cloud server. The computer readable storage medium may also be an external storage device of the cloud server, such as a plug-in hard disk, a smart Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are equipped on the cloud server.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A brewed beverage identification method, the method comprising:
when a brewing drink identification task is received, acquiring a brewing drink image to be identified, which is acquired by the water dispenser;
preprocessing the brewing beverage image to be identified, and extracting an interested region from the preprocessed brewing beverage image to be identified;
extracting features of the brewed beverage to be identified from the region of interest;
inputting the extracted features into a trained brewed beverage recognition model for analysis, and obtaining the type of the brewed beverage to be recognized as a recognition result.
2. The brewed beverage identification method according to claim 1, wherein the preprocessing the image of the brewed beverage to be identified comprises:
carrying out gray level processing on the brewing beverage image to be identified;
carrying out smooth denoising treatment on the beverage image to be identified after the graying treatment;
and carrying out binarization processing on the beverage image to be identified after the smoothing and denoising processing.
3. The brewed beverage identification method according to claim 1, wherein the extracting of the region of interest from the preprocessed brewed beverage image to be identified comprises:
determining a minimum circumscribed rectangular area formed by an upper boundary, a left boundary and a lower boundary of the brewing beverage part to be identified in the pre-processed brewing beverage image to be identified by adopting a preset edge detection algorithm;
and extracting the minimum circumscribed rectangular area as an interested area.
4. The brewed beverage identification method according to claim 1, wherein the extracting of the region of interest from the preprocessed brewed beverage image to be identified comprises:
calculating the sum of pixels of each column in the preprocessed brewed beverage image to be identified;
determining a first target column and a second target column according to the pixel sum of each column;
and calculating the maximum circumscribed matrix between the first target column and the second target column to obtain the region of interest.
5. The brewed beverage identification method according to claim 4, wherein the determining a first target column and a second target column according to the pixel sum of each column comprises:
sorting the pixel sums of each column to find a maximum value column of two pixel sums;
and shifting one maximum value column by a plurality of columns to the left to obtain a first target column, and shifting the other maximum value column by a plurality of columns to the right to obtain a second target column.
6. The brewed beverage identification method according to claim 1, wherein when receiving the brewed beverage identification task, before acquiring the image of the brewed beverage to be identified, acquired by the water dispenser, the method comprises the following steps:
acquiring images of a plurality of brewing drinks to construct a training sample set;
and training a brewed beverage recognition model according to the training sample set to obtain the trained brewed beverage recognition model.
7. The brewed beverage recognition method according to claim 6, wherein the training of the brewed beverage recognition model according to the training sample set to obtain a trained brewed beverage recognition model comprises:
carrying out normalization processing on the training sample set;
creating a brewed beverage identification model based on a Back Propagation Neural Network (BPNN), and initializing parameters of the brewed beverage identification model;
and inputting the training sample set subjected to the normalization treatment into the brewed beverage identification model for training so as to update the parameters of the brewed beverage identification model and obtain the trained brewed beverage identification model.
8. The brewed beverage identification method according to claim 7, wherein the inputting the training sample set after the normalization processing into the brewed beverage identification model for training to update the parameters of the brewed beverage identification model to obtain the trained brewed beverage identification model comprises:
inputting the training sample set after the normalization processing into the brewing beverage identification model to obtain forward output and reverse output;
and updating the parameters of the brewed beverage identification model according to the forward output and the reverse output by adopting a gradient descent method to obtain the trained brewed beverage identification model.
9. A brewed beverage identification device, characterized in that the brewed beverage identification device comprises a processor, a memory, and a brewed beverage identification program stored on the memory and executable by the processor, wherein the steps of the brewed beverage identification method according to any of claims 1 to 8 are realized when the brewed beverage identification program is executed by the processor.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has a brewed beverage identification program stored thereon, wherein the brewed beverage identification program, when executed by a processor, implements the steps of the brewed beverage identification method according to any one of claims 1 to 8.
CN202010133814.8A 2020-02-29 2020-02-29 Brewed beverage identification method, device and computer-readable storage medium Pending CN111568195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010133814.8A CN111568195A (en) 2020-02-29 2020-02-29 Brewed beverage identification method, device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010133814.8A CN111568195A (en) 2020-02-29 2020-02-29 Brewed beverage identification method, device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111568195A true CN111568195A (en) 2020-08-25

Family

ID=72114841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010133814.8A Pending CN111568195A (en) 2020-02-29 2020-02-29 Brewed beverage identification method, device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111568195A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112471897A (en) * 2021-01-12 2021-03-12 赫比(上海)家用电器产品有限公司 Coffee machine, method and storage medium for automatically identifying and playing information related to coffee packet

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107492097A (en) * 2017-08-07 2017-12-19 北京深睿博联科技有限责任公司 A kind of method and device for identifying MRI image area-of-interest
CN107633038A (en) * 2017-09-13 2018-01-26 浙江大学 Tealeaves recognition methods and its system based on image recognition technology
CN107898316A (en) * 2017-11-22 2018-04-13 广东永衡良品科技有限公司 A kind of intelligent tea-soaking system
CN107909072A (en) * 2017-09-29 2018-04-13 广东数相智能科技有限公司 A kind of vegetation type recognition methods, electronic equipment, storage medium and device
CN107944351A (en) * 2017-11-07 2018-04-20 深圳市易成自动驾驶技术有限公司 Image-recognizing method, device and computer-readable recording medium
CN108078392A (en) * 2017-12-22 2018-05-29 蒙城县望槐信息科技有限责任公司 A kind of leaving water temperature control method based on soaking object identification
CN108154195A (en) * 2018-01-19 2018-06-12 镇江思泊丽农业有限公司 Tealeaves recognition methods and the tealeaves sorting equipment using this method
CN108143288A (en) * 2017-12-22 2018-06-12 蒙城县望槐信息科技有限责任公司 A kind of intelligent water temperature control system based on water dispenser
CN109117829A (en) * 2018-09-10 2019-01-01 安徽信息工程学院 Local tea variety identifying system based on tensorflow
CN109288399A (en) * 2018-08-27 2019-02-01 珠海格力电器股份有限公司 Tea making device control method, device, tea making device and readable storage medium storing program for executing
CN109549482A (en) * 2018-11-15 2019-04-02 珠海格力电器股份有限公司 Water dispenser and water dispenser control method
CN109583364A (en) * 2018-11-27 2019-04-05 上海鹰瞳医疗科技有限公司 Image-recognizing method and equipment
CN110070101A (en) * 2019-03-12 2019-07-30 平安科技(深圳)有限公司 Floristic recognition methods and device, storage medium, computer equipment
CN110210434A (en) * 2019-06-10 2019-09-06 四川大学 Pest and disease damage recognition methods and device
CN110569769A (en) * 2019-08-29 2019-12-13 浙江大搜车软件技术有限公司 image recognition method and device, computer equipment and storage medium
CN110833322A (en) * 2019-11-21 2020-02-25 华南农业大学 Tea art robot and control method thereof

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107492097A (en) * 2017-08-07 2017-12-19 北京深睿博联科技有限责任公司 A kind of method and device for identifying MRI image area-of-interest
CN107633038A (en) * 2017-09-13 2018-01-26 浙江大学 Tealeaves recognition methods and its system based on image recognition technology
CN107909072A (en) * 2017-09-29 2018-04-13 广东数相智能科技有限公司 A kind of vegetation type recognition methods, electronic equipment, storage medium and device
CN107944351A (en) * 2017-11-07 2018-04-20 深圳市易成自动驾驶技术有限公司 Image-recognizing method, device and computer-readable recording medium
CN107898316A (en) * 2017-11-22 2018-04-13 广东永衡良品科技有限公司 A kind of intelligent tea-soaking system
CN108078392A (en) * 2017-12-22 2018-05-29 蒙城县望槐信息科技有限责任公司 A kind of leaving water temperature control method based on soaking object identification
CN108143288A (en) * 2017-12-22 2018-06-12 蒙城县望槐信息科技有限责任公司 A kind of intelligent water temperature control system based on water dispenser
CN108154195A (en) * 2018-01-19 2018-06-12 镇江思泊丽农业有限公司 Tealeaves recognition methods and the tealeaves sorting equipment using this method
CN109288399A (en) * 2018-08-27 2019-02-01 珠海格力电器股份有限公司 Tea making device control method, device, tea making device and readable storage medium storing program for executing
CN109117829A (en) * 2018-09-10 2019-01-01 安徽信息工程学院 Local tea variety identifying system based on tensorflow
CN109549482A (en) * 2018-11-15 2019-04-02 珠海格力电器股份有限公司 Water dispenser and water dispenser control method
CN109583364A (en) * 2018-11-27 2019-04-05 上海鹰瞳医疗科技有限公司 Image-recognizing method and equipment
CN110070101A (en) * 2019-03-12 2019-07-30 平安科技(深圳)有限公司 Floristic recognition methods and device, storage medium, computer equipment
CN110210434A (en) * 2019-06-10 2019-09-06 四川大学 Pest and disease damage recognition methods and device
CN110569769A (en) * 2019-08-29 2019-12-13 浙江大搜车软件技术有限公司 image recognition method and device, computer equipment and storage medium
CN110833322A (en) * 2019-11-21 2020-02-25 华南农业大学 Tea art robot and control method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112471897A (en) * 2021-01-12 2021-03-12 赫比(上海)家用电器产品有限公司 Coffee machine, method and storage medium for automatically identifying and playing information related to coffee packet

Similar Documents

Publication Publication Date Title
Vink et al. Efficient nucleus detector in histopathology images
US7970212B2 (en) Method for automatic detection and classification of objects and patterns in low resolution environments
CN105404845B (en) Image processing method and device
EP2557524A1 (en) Method for automatic tagging of images in Internet social networks
CN110705634B (en) Heel model identification method and device and storage medium
CN103247036A (en) Multiple-exposure image fusion method and device
CN105023027B (en) Live soles spoor decorative pattern image search method based on multiple feedback mechanism
Rossi et al. FishAPP: A mobile App to detect fish falsification through image processing and machine learning techniques
CN106228118A (en) The finger vein identification method that a kind of characteristic point and bianry image combine
CN111080493B (en) Dish information identification method and device and dish self-service settlement system
US20180211139A1 (en) System and method for providing a recipe
CN109255768A (en) Image completion method, apparatus, terminal and computer readable storage medium
CN111160169A (en) Face detection method, device, equipment and computer readable storage medium
CN110991434B (en) Self-service terminal certificate identification method and device
CN108171570B (en) Data screening method and device and terminal
CN113283431A (en) Intelligent method and system integrating deep learning and logic judgment
CN111178221A (en) Identity recognition method and device
CN111568195A (en) Brewed beverage identification method, device and computer-readable storage medium
CN110956157A (en) Deep learning remote sensing image target detection method and device based on candidate frame selection
CN114399480A (en) Method and device for detecting severity of vegetable leaf disease
CN110874835A (en) Crop leaf disease resistance identification method and system, electronic equipment and storage medium
CN111401438B (en) Image sorting method, device and system
CN111325241A (en) Fruit and vegetable classification method and device, intelligent sensor and computer storage medium
CN111597937A (en) Fish gesture recognition method, device, equipment and storage medium
Rahman Unsupervised Natural Image Segmentation Using Mean Histogram Features.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200825

RJ01 Rejection of invention patent application after publication