CN112115901A - High-accuracy food identification method - Google Patents

High-accuracy food identification method Download PDF

Info

Publication number
CN112115901A
CN112115901A CN202011022893.1A CN202011022893A CN112115901A CN 112115901 A CN112115901 A CN 112115901A CN 202011022893 A CN202011022893 A CN 202011022893A CN 112115901 A CN112115901 A CN 112115901A
Authority
CN
China
Prior art keywords
food
dishes
dish
template picture
name
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
CN202011022893.1A
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.)
Guangzhou Paike Pushi Information Technology Co ltd
Original Assignee
Guangzhou Paike Pushi Information 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 Guangzhou Paike Pushi Information Technology Co ltd filed Critical Guangzhou Paike Pushi Information Technology Co ltd
Priority to CN202011022893.1A priority Critical patent/CN112115901A/en
Publication of CN112115901A publication Critical patent/CN112115901A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • 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/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/68Food, e.g. fruit or vegetables

Abstract

The invention discloses a high-accuracy food identification method, which comprises the steps of classifying the shapes of bowls and dishes, wherein each type of bowl and dish corresponds to the price of one type of food, establishing a bowl and dish price library, acquiring image data of the bowls and dishes for containing food, extracting the shapes of the bowls and dishes in the image data, calculating the prices of the bowls and dishes for containing food, acquiring the position coordinates of the bowls and dishes and the food in the image and capturing pictures of the bowls and dishes and the food area by the image data, wherein the pictures of each bowl, dish and food area correspond to the prices of the bowls and dishes; clustering the pictures of each dish and food area, selecting a corresponding template picture according to the clustered pictures of each category of dishes and food areas, selecting a template picture corresponding to each food in the current meal from a food price list, and assigning a food name to the template picture; and comparing the template picture without the food name with the template picture with the food name, and if the template picture is similar to the template picture with the food name, classifying the template picture into the category of the template picture with the food name and giving the food name.

Description

High-accuracy food identification method
Technical Field
The invention relates to the technical field of food identification, in particular to a high-accuracy food identification method.
Background
At present, in a food identification method of target detection and food feature retrieval, a feature library of each food is generally established first, and the food features are obtained by calculating a food picture recorded in a library through a feature extraction algorithm; then, when food is identified, firstly, target detection is carried out on the identified image, which is mainly used for detecting a food ROI area, and if the food area exists, the characteristic extraction is carried out on the area through a characteristic extraction algorithm; and finally, calculating similarity degree values of the characteristics and the characteristics in the food characteristic library, wherein the highest score is the corresponding food in the library. The method has the defects that before an identification system is used, food pictures needing to be identified need to be input in advance, a food feature library is established, as the food supply categories of each meal of a plurality of dining halls are as many as four or fifty, if the food pictures need to be input and established for each dish each time, a large amount of workload can be increased, the feature library established in advance is formed by adopting one to two corresponding pictures for each food, and if the collected pictures are not representative, namely the food pictures input into the library deviate from the appearances of actual foods greatly, errors in the identification of the foods are easily caused.
Disclosure of Invention
The invention aims to provide a high-accuracy food identification method with small workload.
The invention relates to a high-accuracy food identification method, which comprises the following steps:
step 1: classifying according to the shapes of the bowls and dishes, wherein each type of bowl and dish corresponds to one type of food price, and establishing a bowl and dish price library;
step 2: acquiring image data of dishes and food;
and step 3: by extracting the shape of the dishes in the image data, the dishes containing food are priced according to the dish price library, and the position coordinates of the dishes and the food in the image are obtained from the image data;
and 4, step 4: intercepting pictures of the areas of the dishes and the food according to the position coordinates of the dishes and the food in the image, wherein each picture of the areas of the dishes and the food corresponds to the price of the dishes;
and 5: clustering the pictures of each dish and food area, and selecting a corresponding template picture according to the clustered pictures of each category of dishes and food areas;
step 6: a canteen manager selects a template picture corresponding to each food in the current meal in a food price list and gives a food name to the template picture;
and 7: and comparing the template picture without the food name with the template picture with the food name, and if the template picture is similar to the template picture with the food name, classifying the template picture with the food name as the category of the template picture with the food name, and assigning the template picture without the food name as the food name.
According to the high-accuracy food identification method, before a dining room takes a meal, foods of each class of price can be accurately priced only by recording the shapes of dishes, and because the shapes of the dishes are fixed and unchangeable, and the color and the shape of each food are changeable during processing, the accuracy is higher compared with the identification of each food picture in advance, the accurate pricing function can be realized, the calculation deduction amount is a hundred-percent accurate deduction amount according to the result of the dish shape identification, and the problem of dispute caused by the fact that the amount calculation is wrong due to the fact that the food identification is wrong is solved; the types of the shapes of the dishes are less, the shapes of the dishes are only required to be recorded corresponding to the price of one type of food, and the workload is less compared with the work of recording the picture data of each food; the canteen manager only needs to select the template picture corresponding to each food in the food price list after the grade of the canteen is collected, assign food names to the template pictures and name the corresponding food pictures, and then can complete the identification of all the foods in the meal.
Drawings
FIG. 1 is a schematic flow chart of a high-accuracy food identification method according to the present invention;
FIG. 2 is a schematic flow chart showing the process of clustering the pictures of each dish and food area and selecting the corresponding template picture according to the clustered pictures of each category of dishes and food areas;
FIG. 3 is a schematic flow chart showing the process of comparing the template picture without the food name with the template picture with the food name, and assigning the template picture without the food name to the food name if the template picture without the food name is similar to the template picture with the food name;
FIG. 4 is a schematic view showing a flow of extracting the shape of the dishes in the image data and pricing the dishes containing the food according to the dish price library;
FIG. 5 is a schematic view of a picture of a food before pretreatment;
fig. 6 is a schematic view of a picture of a pretreated food.
Detailed Description
As shown in fig. 1, a high-accuracy food identification method includes the following steps:
step 1: classifying according to the shapes of the bowls and dishes, wherein each type of bowl and dish corresponds to one type of food price, and establishing a bowl and dish price library;
step 2: acquiring image data of dishes and food;
and step 3: by extracting the shape of the dishes in the image data, the dishes containing food are priced according to the dish price library, and the position coordinates of the dishes and the food in the image are obtained from the image data;
and 4, step 4: intercepting pictures of the areas of the dishes and the food according to the position coordinates of the dishes and the food in the image, wherein each picture of the areas of the dishes and the food corresponds to the price of the dishes;
and 5: clustering the pictures of each dish and food area, and selecting a corresponding template picture according to the clustered pictures of each category of dishes and food areas;
step 6: a canteen manager selects a template picture corresponding to each food in the current meal in a food price list and gives a food name to the template picture;
and 7: and comparing the template picture without the food name with the template picture with the food name, and if the template picture is similar to the template picture with the food name, classifying the template picture with the food name as the category of the template picture with the food name, and assigning the template picture without the food name as the food name.
The food can be accurately priced just by recording the food of each class of price through the shape of the bowl and dish before the dining hall takes a meal, because the shape of the bowl and dish is fixed and unchanged, and the color and the shape of each food are variable when being processed, the accuracy is higher compared with the recognition of each food picture in advance, the accurate pricing function can be realized, the calculation deduction amount is a hundred-percent accurate deduction amount according to the recognition result of the shape of the bowl and dish, and the problem of dispute caused by the calculation error of the amount due to the recognition error of the food is avoided; the types of the shapes of the dishes are less, the shapes of the dishes are only required to be recorded corresponding to the price of one type of food, and the workload is less compared with the work of recording the picture data of each food; the canteen manager only needs to select the template picture corresponding to each food in the food price list after the grade of the canteen is collected, assign food names to the template pictures and name the corresponding food pictures, and then can complete the identification of all the foods in the meal.
The camera obtains the image data of bowl dish splendid attire food, because the main hardware that accomplishes food discernment needs is the camera, bowl dish need not to imbed the chip, and the cost greatly reduced than with the RFID chip scheme is not influenced completely to the new food discernment of planning outside moreover.
As shown in fig. 2, the step 5 includes the following steps:
step 5-1: extracting feature vectors from the captured pictures of each dish and food area through deep learning;
step 5-2: clustering the characteristic vectors of the pictures of each dish and food area, wherein the pictures of the dish and food areas with the similar distance between the characteristic vectors are classified into one class;
step 5-3: averaging the feature vectors of the pictures of each category of dishes and food areas to obtain the mean feature vector of the same category;
step 5-4: and taking pictures of the dishes and the food areas which are similar to the category mean feature vector as template pictures.
The price of each dish and the food area is corresponding to the picture of the dish, then the characteristic vectors of the pictures of each dish and the food area are clustered, the price information can reduce the clustering range of the characteristic vectors of the pictures of the dish and the food area at each time, food is clustered and identified according to the price, and the accuracy of the food is effectively improved.
As shown in fig. 3, the step 7 includes the following steps:
step 7-1: comparing template pictures without food names, and extracting feature vectors through deep learning;
step 7-2: and comparing the characteristic vector of the template picture without the food name with the characteristic vector of the template picture with the food name, if the distance between the characteristic vectors is similar, clustering the characteristic vector of the template picture without the food name with the template picture with the food name, and giving the template picture without the food name with the food name.
Clustering the characteristic vectors of the pictures of each dish and food area, clustering the characteristic vectors of the pictures without the food name template and the pictures with the food name template, and clustering by a k-means clustering algorithm.
In the step 6, the canteen manager selects the template picture corresponding to each food in the current meal from the food price list, and assigns a food name to the template picture, so that the canteen manager selects the template picture corresponding to each food in the current meal from the food price list through an applet or an APP of the mobile terminal, and assigns a food name to the template picture.
After receiving the file of the canteen, the canteen manager only needs to select a representative current meal food graph in the food price list through an Application (APP) of the applet or the mobile terminal, names the corresponding food graph, and can identify all foods of the current meal.
As shown in fig. 4, the step 3 of extracting the shapes of the dishes in the image data and pricing the dishes containing food according to the dish price library comprises the following steps:
step 3-1: carrying out image preprocessing on the acquired image data of the dishes and the foods;
step 3-2: extracting edge characteristics of the preprocessed dish containing food images to obtain dish shape information, matching the dish shape information with the dish shape information corresponding to the dish price library, and mapping the corresponding dish price to the dish containing food images if matching is successful, so that dish pricing of the contained food is completed.
The acquired image data of the dishes and the foods are subjected to image preprocessing, and four second-order operators are mainly constructed to extract edge information in directions of x, y, 45-degree inclination and 135-degree inclination of the image. The original picture with rich color information is converted into the image with only image edge information, and the edge information of the picture can be greatly enhanced by overlapping the edge information in four directions. Because the main area of the dish with rich color information can be shielded by food when the dish is filled with food, the image can be converted into the image mainly containing edge information through the second-order operator, the accuracy of identifying the shape of the dish can be improved, and mistakes are avoided. The pretreatment process is shown in fig. 5 and 6.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (7)

1. A high accuracy food recognition method, comprising the steps of:
step 1: classifying according to the shapes of the bowls and dishes, wherein each type of bowl and dish corresponds to one type of food price, and establishing a bowl and dish price library;
step 2: acquiring image data of dishes and food;
and step 3: by extracting the shape of the dishes in the image data, the dishes containing food are priced according to the dish price library, and the position coordinates of the dishes and the food in the image are obtained from the image data;
and 4, step 4: intercepting pictures of the areas of the dishes and the food according to the position coordinates of the dishes and the food in the image, wherein each picture of the areas of the dishes and the food corresponds to the price of the dishes;
and 5: clustering the pictures of each dish and food area, and selecting a corresponding template picture according to the clustered pictures of each category of dishes and food areas;
step 6: a canteen manager selects a template picture corresponding to each food in the current meal in a food price list and gives a food name to the template picture;
and 7: and comparing the template picture without the food name with the template picture with the food name, and if the template picture is similar to the template picture with the food name, classifying the template picture with the food name as the category of the template picture with the food name, and assigning the template picture without the food name as the food name.
2. The method for identifying food with high accuracy as claimed in claim 1, wherein the step 2 of obtaining the image data of the dishes and the food is to obtain the image data of the dishes and the food by a camera.
3. The method of claim 1, wherein the step 5 comprises the steps of:
step 5-1: extracting feature vectors from the captured pictures of each dish and food area through deep learning;
step 5-2: clustering the characteristic vectors of the pictures of each dish and food area, wherein the pictures of the dish and food areas with the similar distance between the characteristic vectors are classified into one class;
step 5-3: averaging the feature vectors of the pictures of each category of dishes and food areas to obtain the mean feature vector of the same category;
step 5-4: and taking pictures of the dishes and the food areas which are similar to the category mean feature vector as template pictures.
4. A high accuracy food recognition method according to claim 3, wherein said step 7 comprises the steps of:
step 7-1: comparing template pictures without food names, and extracting feature vectors through deep learning;
step 7-2: and comparing the characteristic vector of the template picture without the food name with the characteristic vector of the template picture with the food name, if the distance between the characteristic vectors is similar, clustering the characteristic vector of the template picture without the food name with the template picture with the food name, and giving the template picture without the food name with the food name.
5. The method of claim 3, wherein the picture feature vectors are clustered by a k-means clustering algorithm.
6. The method as claimed in any one of claims 1 to 5, wherein in step 6, the canteen manager selects a template picture corresponding to each food in the current meal from the food price list, assigns a food name to the template picture, and selects a template picture corresponding to each food in the current meal from the food price list by the canteen manager through an applet or an APP of the mobile terminal, and assigns a food name to the template picture.
7. The method for recognizing food with high accuracy as set forth in claim 1, wherein the dish shape in the image data is extracted in the step 3, and the dishes containing food are charged according to the dish price library, comprising the steps of:
step 3-1: carrying out image preprocessing on the acquired image data of the dishes and the foods;
step 3-2: extracting edge characteristics of the preprocessed dish containing food images to obtain dish shape information, matching the dish shape information with the dish shape information corresponding to the dish price library, and mapping the corresponding dish price to the dish containing food images if matching is successful, so that dish pricing of the contained food is completed.
CN202011022893.1A 2020-09-25 2020-09-25 High-accuracy food identification method Pending CN112115901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011022893.1A CN112115901A (en) 2020-09-25 2020-09-25 High-accuracy food identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011022893.1A CN112115901A (en) 2020-09-25 2020-09-25 High-accuracy food identification method

Publications (1)

Publication Number Publication Date
CN112115901A true CN112115901A (en) 2020-12-22

Family

ID=73798252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011022893.1A Pending CN112115901A (en) 2020-09-25 2020-09-25 High-accuracy food identification method

Country Status (1)

Country Link
CN (1) CN112115901A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930296A (en) * 2012-11-01 2013-02-13 长沙纳特微视网络科技有限公司 Image identifying method and device
CN103092861A (en) * 2011-11-02 2013-05-08 阿里巴巴集团控股有限公司 Method and system for selecting commodity representative picture
CN103324677A (en) * 2013-05-24 2013-09-25 西安交通大学 Hierarchical fast image global positioning system (GPS) position estimation method
CN104269003A (en) * 2014-09-12 2015-01-07 李龙龙 Food recognition method, device and system
CN104731964A (en) * 2015-04-07 2015-06-24 上海海势信息科技有限公司 Face abstracting method and video abstracting method based on face recognition and devices thereof
CN107122730A (en) * 2017-04-24 2017-09-01 乐金伟 Free dining room automatic price method
CN208110770U (en) * 2018-04-28 2018-11-16 浙江国际海运职业技术学院 A kind of fast food pricing system based on camera
CN110084587A (en) * 2019-02-28 2019-08-02 杭州效准智能科技有限公司 A kind of service plate automatic settlement method based on edge context
CN110084642A (en) * 2019-04-19 2019-08-02 哈尔滨新中新电子股份有限公司 Vegetable recognition methods based on target detection and image retrieval
CN111598012A (en) * 2020-05-19 2020-08-28 恒睿(重庆)人工智能技术研究院有限公司 Picture clustering management method, system, device and medium
CN111680603A (en) * 2020-05-28 2020-09-18 浙江师范大学 Dish detection and identification method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092861A (en) * 2011-11-02 2013-05-08 阿里巴巴集团控股有限公司 Method and system for selecting commodity representative picture
CN102930296A (en) * 2012-11-01 2013-02-13 长沙纳特微视网络科技有限公司 Image identifying method and device
CN103324677A (en) * 2013-05-24 2013-09-25 西安交通大学 Hierarchical fast image global positioning system (GPS) position estimation method
CN104269003A (en) * 2014-09-12 2015-01-07 李龙龙 Food recognition method, device and system
CN104731964A (en) * 2015-04-07 2015-06-24 上海海势信息科技有限公司 Face abstracting method and video abstracting method based on face recognition and devices thereof
CN107122730A (en) * 2017-04-24 2017-09-01 乐金伟 Free dining room automatic price method
CN208110770U (en) * 2018-04-28 2018-11-16 浙江国际海运职业技术学院 A kind of fast food pricing system based on camera
CN110084587A (en) * 2019-02-28 2019-08-02 杭州效准智能科技有限公司 A kind of service plate automatic settlement method based on edge context
CN110084642A (en) * 2019-04-19 2019-08-02 哈尔滨新中新电子股份有限公司 Vegetable recognition methods based on target detection and image retrieval
CN111598012A (en) * 2020-05-19 2020-08-28 恒睿(重庆)人工智能技术研究院有限公司 Picture clustering management method, system, device and medium
CN111680603A (en) * 2020-05-28 2020-09-18 浙江师范大学 Dish detection and identification method

Similar Documents

Publication Publication Date Title
US11853347B2 (en) Product auditing in point-of-sale images
US11335092B2 (en) Item identification method, system and electronic device
CN103632379B (en) Article detection device and its control method
WO2016062159A1 (en) Image matching method and platform for testing of mobile phone applications
CN109508664B (en) Dish identification pricing method based on deep learning
CN110603533A (en) Method and apparatus for object state detection
US10824832B2 (en) Barcode tag detection in side view sample tube images for laboratory automation
CN111680603A (en) Dish detection and identification method
US20190139225A1 (en) System and method for finding and classifying lines in an image with a vision system
US11783384B2 (en) Computer vision systems and methods for automatically detecting, classifying, and pricing objects captured in images or videos
CN111222382A (en) Commodity settlement method, commodity settlement device, commodity settlement medium and electronic equipment based on images
CN111161295A (en) Background stripping method for dish image
CN110991434B (en) Self-service terminal certificate identification method and device
Aydemir et al. Exploiting and modeling local 3d structure for predicting object locations
CN111190595A (en) Method, device, medium and electronic equipment for automatically generating interface code based on interface design drawing
US20200240829A1 (en) Smart weighing scale and methods related thereto
CN109165611B (en) Intelligent dish identification settlement method based on machine vision and neural network
CN112613367A (en) Bill information text box acquisition method, system, equipment and storage medium
CN112115901A (en) High-accuracy food identification method
CN114902297A (en) Bootstrapped image processing-based object classification using region-level annotations
CN109743497B (en) Data set acquisition method and system and electronic device
CN109190585B (en) Va nationality living area judging method
CN111582014A (en) Container identification method, device and computer readable storage medium
CN112150398A (en) Image synthesis method, device and equipment
CN112801096B (en) Automatic license plate detection algorithm

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