CN108320786A - A kind of Chinese meal vegetable recommendation method based on deep neural network - Google Patents
A kind of Chinese meal vegetable recommendation method based on deep neural network Download PDFInfo
- Publication number
- CN108320786A CN108320786A CN201810117765.1A CN201810117765A CN108320786A CN 108320786 A CN108320786 A CN 108320786A CN 201810117765 A CN201810117765 A CN 201810117765A CN 108320786 A CN108320786 A CN 108320786A
- Authority
- CN
- China
- Prior art keywords
- vegetable
- chinese meal
- chinese
- meal vegetable
- picture
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a kind of, and the Chinese meal vegetable based on deep neural network recommends method, including S1 to obtain the picture of Chinese meal vegetable;S2 carries out feature extraction using deep neural network algorithm to Chinese meal vegetable picture;The Chinese meal vegetable feature for extracting gained is input in sorting algorithm and obtains corresponding vegetable type by S3;S4, menus of Chinese food's knowledge base is inquired according to vegetable type, obtains the nutrient formulation of the Chinese meal vegetable and suitable somatotypes;If the somatotypes of S5 user is consistent with the somatotypes that inquiry obtains, recommend this Chinese meal vegetable.The main effect of the method for the present invention is that recognition speed is fast, and accuracy rate is high, and performance is stablized, and is conducive to people and quickly determines oneself suitable Chinese meal vegetable, realizes healthy diet.
Description
Technical field
The present invention relates to computer application fields, and in particular to a kind of Chinese meal vegetable recommendation side based on deep neural network
Method.
Background technology
There are a kind of traditional thought, as " Diet cures more than the doctors " in China after all " there's no such thing as a totally safe medicine ".But it is general to one
How to identify that the nutritive value of put Chinese meal vegetable is difficult for logical people, this needs is proficient in cuisines and nutrition
Expert could solve the problems, such as this, so this often so that common people are difficult in daily life, to obtain Chinese meal vegetable
It nutritive value and is recommended suitable for edible people, this acquires a certain degree of difficulty.In being accurately identified for common people
There is also difficulty for constituent in meal vegetable, if it is possible to the correct constituent identified in vegetable, then calculating vegetable
The difficulty of nutritive value be greatly reduced.
Image recognition is all a particularly significant and popular research direction in computer realm all the time.With
Great development of the deep learning in image recognition has become a upsurge in image recognition.Deep learning is as machine
One project of learning areas has become a upsurge of internet and artificial intelligence, at speech recognition, natural language
The fields such as reason, computer vision, multimedia all achieve immense success.The essence of deep learning is by structure with many hidden
The training data of the machine learning model and magnanimity of layer, to learn more useful feature, to promote the standard of classification or prediction
True property.Chinese meal vegetable picture is accurately identified using deep learning, the name of the dish of Chinese meal vegetable can be obtained, while and having built
The menus of Chinese food's knowledge base stood is combined, and can effectively be recommended suitable for eating the user of the Chinese meal vegetable.
Invention content
In order to overcome shortcoming and deficiency of the existing technology, the present invention to provide a kind of Chinese meal based on deep neural network
Vegetable recommends method.
Deep learning is combined by the present invention with the identification of Chinese meal vegetable, using classical convolutional neural networks model to data set
It is trained, obtains the model that can be used for the classification of Chinese meal vegetable, it can be by the figure of a certain meal vegetable after model training is good
Piece is input to the model, can obtain the Chinese meal menu name as output.The output that will be obtained from Chinese meal vegetable disaggregated model,
It is input in the menus of Chinese food's knowledge base having had built up, can know that the nutritive value of the Chinese meal vegetable and suitable for edible use
Family somatotypes, and recommended the people of corresponding somatotypes.The model can it is quick, accurate and stablize identification inputted
Chinese meal vegetable picture type, which is combined with menus of Chinese food's knowledge base, ordinary people can not only be made quick and precisely
Grasp Chinese meal vegetable information, the people of different somatotypes can also be allowed to eat the Chinese meal dish of its somatotypes of optimum
Product allow people that can realize science diet, avoid improper diet and occur uncomfortable.
The present invention adopts the following technical scheme that:
A kind of Chinese meal vegetable recommendation method based on deep neural network, includes the following steps:
S1 obtains Chinese meal vegetable picture;
S2 carries out feature extraction using convolutional neural networks algorithm to Chinese meal vegetable picture;
The Chinese meal vegetable feature of extraction is input in sorting algorithm by S3, obtains corresponding vegetable type;
S4 inquires menus of Chinese food's knowledge base according to vegetable type, obtains the nutrient formulation of the Chinese meal vegetable and suitable constitution
Type;
If S5 somatotypes input by user is consistent with the somatotypes that inquiry obtains, recommend this Chinese meal vegetable.
Chinese meal vegetable picture is obtained using web crawlers, is then pre-processed, and by pretreated picture according to god
It is divided into training set and test set through network algorithm.
The convolutional neural networks are GoogleNet.
Sorting algorithm uses softmax classifier algorithms in the S3.
The Chinese meal vegetable knowledge base includes vegetable picture, menu name, vegetable nutritional ingredient, the suitable constitution class of vegetable
The making step of type and vegetable.
Beneficial effects of the present invention:
(1) the method for the present invention obtains a large amount of Chinese meal vegetable pictures using web crawlers, and data volume is formed using stochastical sampling
Larger training set;
(2) present invention obtains menu corresponding with Chinese meal vegetable picture using from network, and to vegetable in menu
Ingredient Amount is calculated, and finally obtains Chinese meal vegetable nutritive value, and establish associated databases;
(3) present invention can be right by the convolutional neural networks ability to express powerful to picture using convolutional neural networks
Chinese meal vegetable picture detail is classified, is screened, to extract the feature of variety classes vegetable.
(4) present invention uses softmax sorting algorithms, is a kind of supervised learning method, is suitable for more classification problems, energy
Obtain remarkable result;
(5) the method for the present invention is based on a large amount of Chinese meal vegetable image data collection, and machine learning and image recognition technology are answered
The identification field to Chinese meal vegetable is used, Chinese meal vegetable can be identified by computer and mobile terminal, it is very convenient, it is accurate
True rate is high, saves the time;
(6) the method for the present invention, which uses, is combined deep learning and the identification of Chinese meal vegetable, while the Chinese meal dish to identifying
The nutritive value of product is calculated, and is identified on the basis of big data.This method recognition speed is fast, accuracy rate is done, performance
Stablize, compensates for the blank of Chinese meal vegetable nutritive value calculating, can be combined with dietary recommendations continued, push the development of healthy diet.
This method has certain market value and promotional value.
Description of the drawings
Fig. 1 is the work flow diagram of the present invention.
Specific implementation mode
With reference to embodiment and attached drawing, the present invention is described in further detail, but embodiments of the present invention are not
It is limited to this.
Embodiment
As shown in Figure 1, the present invention applies a kind of Chinese meal vegetable personalized recommendation method based on deep neural network, it is main
Realization step include:
S1, Chinese meal vegetable picture is obtained using web crawlers, and picture is pre-processed, the pretreatment includes choosing
The higher picture of clarity and picture size are normalized, while being divided into training by neural network algorithm requirement
Collection and test set, while equalization processing is carried out to image data.
S2, feature extraction is carried out to Chinese meal vegetable picture using convolutional neural networks algorithm, the deep neural network is calculated
Method be convolutional neural networks algorithm it is specifically used to neural network be GoogleNet.
S3, the Chinese meal vegetable feature of extraction gained is input in sorting algorithm and obtains corresponding vegetable type, described point
Class algorithm uses softmax classifier algorithms.
S4, vegetable type that sorting algorithm obtains and corresponding menus of Chinese food's knowledge base are combined, finally obtain Chinese meal
For vegetable nutritive value with suitable for eating the somatotypes of crowd, menus of Chinese food's knowledge base includes each Chinese meal vegetable vegetable figure
The making step of piece, menu name, vegetable nutritional ingredient, vegetable suitable somatotypes and vegetable.
If the somatotypes of S5, user are consistent with the somatotypes that inquiry obtains, recommend this Chinese meal vegetable.
In step S1 for individual Chinese meal vegetable picture numbers and other vegetable picture number gaps it is larger when, using with
Machine, which replicates, carries out equilibrating.In data set generation, data set is converted into can be by lmdb formats that Caffe frames receive.
The lmdb data that step S1 is obtained are input in convolutional neural networks in step S2, the convolutional neural networks
For GoogleNet, as soon as GoogleNet is the depth network for possessing 22 layers, enough can be good at not using inception
Increase the width for increasing network in the case of loading and depth while optimizing network quality.Pass through GoogleNet convolutional Neural nets
Multiple convolutional layers and down-sampling layer in network export characteristic pattern, can obtain a feature vector by rasterization process and be linked to
Full articulamentum.
Its detailed design of used convolutional neural networks is as shown in table 1 below in step S2:
Table 1
Layer name | Parameter | Output size |
conv1 | 7×7 | 112×112×64 |
max pool | 3×3 | 56×56×64 |
conv2 | 3×3 | 56×56×192 |
max pool | 3×3 | 28×28×192 |
inception(3a) | 28×28×256 | |
inception(3b) | 28×28×480 | |
max pool | 3×3 | 14×14×480 |
inception(4a) | 14×14×512 | |
inception(4b) | 14×14×512 | |
inception(4c) | 14×14×512 | |
inception(4d) | 14×14×528 | |
inception(4e) | 14×14×832 | |
mal pool | 3×3 | 7×7×832 |
inception(5a) | 7×7×832 | |
inception(5a) | 7×7×1024 | |
avg pool | 7×7 | 1×1×1024 |
dropout | 1×1×1024 | |
linear | 1×1×1000 | |
softmax | 1×1×1000 |
Deep neural network in step S2 is divided into training stage and test phase, and wherein training stage step is:
1, original Chinese meal vegetable picture is subjected to picture size adjustment, and picture is denoted as I;
2, image I is passed in GoogleNet convolutional neural networks, what is obtained recently enters the feature as image I;
3, this feature is passed in softmax graders, calculates its loss function and gradient;
4, by backpropagation, the parameter of GoogleNet is adjusted;
5, the process for repeating 1 to 5, until the value Jing Guo enough iteration or loss function is very small.
Deep neural network test phase step in step S2 is:
1, original Chinese meal vegetable image is subjected to picture size adjustment, and picture is denoted as I;
2, it is loaded into the deep neural network model after training;
3, image I is input in the deep neural network model, obtains the feature of Chinese meal vegetable image;
4, the feature of Chinese meal vegetable image is passed in softmax graders, obtains corresponding Chinese meal vegetable type.
Final vegetable type can be obtained in step S3 by softmax graders, eventually sends the result to damage
Function layer is lost, convolutional neural networks parameter can be adjusted by direction propagation algorithm, successive ignition cycle is carried out, finally know loss
Functional value is less than threshold value or reaches maximum iteration, and training terminates.
Menus of Chinese food's knowledge base structure such as the following table 2 described in step S4:
Table 2
By the output that softmax graders are last in step S4, it is input in Chinese meal vegetable menu knowledge base, the middle dish
The nutritive value for having the corresponding food materials of Chinese meal and corresponding food materials in product menu knowledge base, may finally export the Chinese meal vegetable
Nutritive value and suitable for eat people's constitution type.
In step S5, such as input Chinese meal vegetable picture is that pork stewes radish, and menus of Chinese food are inquired after identifying this vegetable
Knowledge base, it is this somatotypes of gentle matter that can find it suitable for eating people's constitution type, is then recommended gentle
The people of matter.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by the embodiment
Limitation, it is other it is any without departing from the spirit and principles of the present invention made by changes, modifications, substitutions, combinations, simplifications,
Equivalent substitute mode is should be, is included within the scope of the present invention.
Claims (5)
1. a kind of Chinese meal vegetable based on deep neural network recommends method, which is characterized in that include the following steps:
S1 obtains Chinese meal vegetable picture;
S2 carries out feature extraction using convolutional neural networks algorithm to Chinese meal vegetable picture;
The Chinese meal vegetable feature of extraction is input in sorting algorithm by S3, obtains corresponding vegetable type;
S4 inquires menus of Chinese food's knowledge base according to vegetable type, obtains the nutrient formulation of the Chinese meal vegetable and suitable constitution class
Type;
If S5 somatotypes input by user is consistent with the somatotypes that inquiry obtains, recommend this Chinese meal vegetable.
2. Chinese meal vegetable according to claim 1 recommends method, which is characterized in that obtain Chinese meal vegetable using web crawlers
Then picture is pre-processed, and pretreated picture is divided into training set and test set according to neural network algorithm.
3. Chinese meal vegetable according to claim 1 recommends method, which is characterized in that the convolutional neural networks are
GoogleNet。
4. Chinese meal vegetable according to claim 1 recommends method, which is characterized in that sorting algorithm uses in the S3
Softmax classifier algorithms.
5. Chinese meal vegetable according to claim 1 recommends method, which is characterized in that the Chinese meal vegetable knowledge base includes dish
The making step of product picture, menu name, vegetable nutritional ingredient, the suitable somatotypes of vegetable and vegetable.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810117765.1A CN108320786A (en) | 2018-02-06 | 2018-02-06 | A kind of Chinese meal vegetable recommendation method based on deep neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810117765.1A CN108320786A (en) | 2018-02-06 | 2018-02-06 | A kind of Chinese meal vegetable recommendation method based on deep neural network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108320786A true CN108320786A (en) | 2018-07-24 |
Family
ID=62902995
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810117765.1A Pending CN108320786A (en) | 2018-02-06 | 2018-02-06 | A kind of Chinese meal vegetable recommendation method based on deep neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108320786A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109285597A (en) * | 2018-10-08 | 2019-01-29 | 北京健康有益科技有限公司 | A kind of dietotherapy recipe recommendation method, apparatus and readable medium |
CN109740743A (en) * | 2019-03-21 | 2019-05-10 | 中国人民解放军国防科技大学 | Hierarchical neural network query recommendation method and device |
CN109872214A (en) * | 2018-11-30 | 2019-06-11 | 广州富港万嘉智能科技有限公司 | One key ordering method of food materials, system, electronic equipment and storage medium |
CN109903836A (en) * | 2019-03-31 | 2019-06-18 | 山西慧虎健康科技有限公司 | A kind of diet intelligent recommendation and matching system and method based on constitution and big data |
CN111128341A (en) * | 2019-11-07 | 2020-05-08 | 北京航空航天大学 | Dish identification APP based on deep learning |
CN111563376A (en) * | 2019-02-12 | 2020-08-21 | 阿里巴巴集团控股有限公司 | Dish name identification method and device |
CN111652044A (en) * | 2020-04-16 | 2020-09-11 | 复旦大学附属儿科医院 | Dietary nutrition analysis method based on convolutional neural network target detection |
CN113051391A (en) * | 2021-03-29 | 2021-06-29 | 深圳软通动力信息技术有限公司 | Personalized diet recommendation method based on food nutrition and health knowledge base |
CN113344666A (en) * | 2021-06-02 | 2021-09-03 | 易食便当香港有限公司 | Method, device and system for generating menu |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106855993A (en) * | 2016-11-21 | 2017-06-16 | 北海高创电子信息孵化器有限公司 | A kind of health consultation system |
CN106897952A (en) * | 2017-01-17 | 2017-06-27 | 王幸之 | A kind of healthy living management system and management method |
CN107578060A (en) * | 2017-08-14 | 2018-01-12 | 电子科技大学 | A kind of deep neural network based on discriminant region is used for the method for vegetable image classification |
-
2018
- 2018-02-06 CN CN201810117765.1A patent/CN108320786A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106855993A (en) * | 2016-11-21 | 2017-06-16 | 北海高创电子信息孵化器有限公司 | A kind of health consultation system |
CN106897952A (en) * | 2017-01-17 | 2017-06-27 | 王幸之 | A kind of healthy living management system and management method |
CN107578060A (en) * | 2017-08-14 | 2018-01-12 | 电子科技大学 | A kind of deep neural network based on discriminant region is used for the method for vegetable image classification |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109285597A (en) * | 2018-10-08 | 2019-01-29 | 北京健康有益科技有限公司 | A kind of dietotherapy recipe recommendation method, apparatus and readable medium |
CN109872214A (en) * | 2018-11-30 | 2019-06-11 | 广州富港万嘉智能科技有限公司 | One key ordering method of food materials, system, electronic equipment and storage medium |
CN111563376A (en) * | 2019-02-12 | 2020-08-21 | 阿里巴巴集团控股有限公司 | Dish name identification method and device |
CN109740743A (en) * | 2019-03-21 | 2019-05-10 | 中国人民解放军国防科技大学 | Hierarchical neural network query recommendation method and device |
CN109903836A (en) * | 2019-03-31 | 2019-06-18 | 山西慧虎健康科技有限公司 | A kind of diet intelligent recommendation and matching system and method based on constitution and big data |
CN111128341A (en) * | 2019-11-07 | 2020-05-08 | 北京航空航天大学 | Dish identification APP based on deep learning |
CN111652044A (en) * | 2020-04-16 | 2020-09-11 | 复旦大学附属儿科医院 | Dietary nutrition analysis method based on convolutional neural network target detection |
CN113051391A (en) * | 2021-03-29 | 2021-06-29 | 深圳软通动力信息技术有限公司 | Personalized diet recommendation method based on food nutrition and health knowledge base |
CN113344666A (en) * | 2021-06-02 | 2021-09-03 | 易食便当香港有限公司 | Method, device and system for generating menu |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108320786A (en) | A kind of Chinese meal vegetable recommendation method based on deep neural network | |
CN107578060B (en) | Method for classifying dish images based on depth neural network capable of distinguishing areas | |
CN109344884A (en) | The method and device of media information classification method, training picture classification model | |
Park et al. | The development of food image detection and recognition model of Korean food for mobile dietary management | |
CN107665254A (en) | A kind of menu based on deep learning recommends method | |
CN107330750A (en) | A kind of recommended products figure method and device, electronic equipment | |
CN109389037A (en) | A kind of sensibility classification method based on depth forest and transfer learning | |
CN109344888A (en) | A kind of image-recognizing method based on convolutional neural networks, device and equipment | |
CN107480723B (en) | Texture Recognition based on partial binary threshold learning network | |
CN108399185A (en) | A kind of the binary set generation method and image, semantic similarity search method of multi-tag image | |
CN109344898A (en) | Convolutional neural networks image classification method based on sparse coding pre-training | |
CN110263174A (en) | - subject categories the analysis method based on focus | |
CN116417115B (en) | Personalized nutrition scheme recommendation method and system for gestational diabetes patients | |
Chun et al. | Development of Korean food image classification model using public food image dataset and deep learning methods | |
CN109508640A (en) | A kind of crowd's sentiment analysis method, apparatus and storage medium | |
Pan et al. | A combinational convolutional neural network of double subnets for food-ingredient recognition | |
CN110391010A (en) | Food recommendation method and system based on personal health perception | |
Aktı et al. | A mobile food recognition system for dietary assessment | |
Yu et al. | Deep learning based food recognition | |
Suddul et al. | A comparative study of deep learning methods for food classification with images | |
CN109472307A (en) | A kind of method and apparatus of training image disaggregated model | |
Merchant et al. | ConvFood: a CNN-based food recognition mobile application for obese and diabetic patients | |
CN109284765A (en) | The scene image classification method of convolutional neural networks based on negative value feature | |
CN113743079A (en) | Text similarity calculation method and device based on co-occurrence entity interaction graph | |
Li et al. | Classical learning or deep learning: a study on food photo aesthetic assessment |
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: 20180724 |
|
RJ01 | Rejection of invention patent application after publication |