A method and system for rapidly detecting the nutritional content of food dishes by integrating atlas

By integrating optical mapping technology and machine learning algorithms, we have established images, density and nutritional content models of dishes and food, which solves the problem that the nutritional content of dishes and food cannot be accurately detected in the existing technology, and achieves a fast, accurate and convenient detection effect.

CN113378882BActive Publication Date: 2025-05-06INST OF AGRO FOOD SCI & TECH CHINESE ACADEMY OF AGRI SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110512979.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-11
Publication Date
2025-05-06
Estimated Expiration
2041-05-11

AI Technical Summary

Technical Problem

The prior art cannot accurately detect the nutritional content of dishes and food, and the conventional methods are costly and are inconvenient to use and promote.

Method used

By integrating optical mapping technology, machine learning and data modeling algorithms, we can realize the identification of dishes food types, establish image and volume models, establish spectral and density models, and establish spectral and nutritional content models, and then comprehensively estimate its mass and nutritional content based on the volume of dishes.

Benefits of technology

It realizes rapid and accurate detection of the nutritional content of dishes, reduces the detection cost, and improves the convenience and feasibility of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113378882B_ABST
    Figure CN113378882B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for rapidly detecting the nutritional content of dishes and foods by fusion of graphs, the method comprising: crushing the dishes and filtering the liquid to form a target to be detected, placing the target to be detected in a first container; acquiring image information of the target to be detected, and acquiring the estimated volume of the target to be detected based on the image information; acquiring spectral information of the target to be detected, and inputting the spectral information into a spectral density model to obtain the estimated density of the target to be detected; calculating the estimated mass of the target to be detected based on the estimated volume and the estimated density, and inputting the estimated mass and spectral information of the target to be detected into the spectral nutritional content model of the target to be detected to obtain the nutritional content of the target to be detected. The present invention realizes the recognition of dish food types, the establishment of image and dish food volume and density models, and the establishment of spectrum and dish food nutritional content models by utilizing optical graph technology, machine learning and data modeling algorithms, and then estimates the mass and nutritional content of the dish food based on the volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of food detection, and in particular to a method and system for rapidly detecting the nutritional content of food in a dish by fusing graphs. Background Art

[0002] Diet is the material basis for human health, survival and longevity. With the improvement of people's living standards, precision nutritional food has become a new growth point for people's demand for food. Dishes are indispensable foods in people's daily dishes. Insufficient or excessive nutritional intake of daily dishes has an important impact on human health. In particular, diabetics, hypertensive patients, obese people and special populations need to detect the nutritional content of the dishes they consume in real time. The shape and composition of dishes are complex. The determination methods of the nutritional content in conventional dishes mostly use physical and chemical tests, which are laborious and expensive. It is not convenient to use and promote, which has also become a major obstacle to people's realization of precise diet. Graph technology has been widely used in the field of rapid food detection. Domestic and foreign scholars use image technology combined with machine learning algorithms to obtain information such as images and volumes of a meal of dishes, and then combine the dish food database to infer the nutritional content of the dish food, and then infer the calorie content value. This method does not take into account factors such as different proportions and different cooking conditions between dishes, and the nutritional content of the obtained dishes is not accurate. Spectroscopic technology can measure the content inside a sample. Some scholars have used near-infrared spectroscopy technology to test crushed dishes and foods, and obtained the calorie value per unit weight of the dishes and foods in a fixed container. However, this method cannot directly determine the total nutritional content of a meal of dishes and foods. Before testing, the type of dish and food must be selected before model matching can be completed, and it cannot be widely used in practice. Summary of the invention

[0003] The present invention provides a method for quickly detecting the nutritional content of dish food by fusing graphs, so as to solve the defect that the nutritional content of dish food cannot be accurately detected in the prior art. By utilizing optical graph technology, machine learning and data modeling algorithms, the dish food type recognition, image and dish food volume model establishment, spectrum and dish food density model establishment, spectrum and dish food nutritional content model establishment are realized, and then the quality and nutritional content of the dish food are comprehensively estimated according to the dish volume.

[0004] The present invention also provides a system for intelligently measuring the nutritional content of dish food, which is used to solve the defect that the nutritional content of dish food cannot be accurately detected in the prior art. By utilizing optical mapping technology, machine learning and data modeling algorithms, the system can realize the recognition of dish food type, the establishment of image and dish food volume model, the establishment of spectrum and dish food density model, and the establishment of spectrum and dish food nutritional content model, and then comprehensively estimate the quality and nutritional content of the dish food according to the dish food volume.

[0005] According to the first aspect of the present invention, a method for rapidly detecting the nutritional content of a dish food by fusing graphs comprises:

[0006] The dish food is crushed and the liquid is filtered to form an object to be tested, and the object to be tested is placed in a first container;

[0007] Acquire image information of the target to be measured, and acquire an estimated volume of the target to be measured according to the image information;

[0008] Acquire spectral information of the target to be measured, and input the spectral information into a spectral density model to obtain an estimated density of the target to be measured, wherein the spectral density model is trained based on sample spectral information of a sample and a sample density corresponding to the sample spectral information;

[0009] The estimated mass of the target to be measured is calculated based on the estimated volume and the estimated density, and the estimated mass and spectral information of the target to be measured are input into the spectral nutritional content model of the target to be measured to obtain the nutritional content of the target to be measured, wherein the spectral nutritional content model is trained based on the sample spectral information of the sample and the sample nutritional content corresponding to the sample spectral information.

[0010] According to an embodiment of the present invention, the step of acquiring image information of the target to be measured and acquiring an estimated volume of the target to be measured according to the image information specifically includes:

[0011] Collecting image information of the target to be measured after it has been left stationary in the first container;

[0012] Acquire an image edge point in the image information as a first pixel point, and calculate a first estimated volume of the target to be measured according to a distance from the first pixel point to an edge of the first container, a distance from the first pixel point to a center of the image, a depth of the first container, and a bottom radius of the first container, wherein the first estimated volume is a volume of the target to be measured based on the first pixel point;

[0013] Repeat the above steps until N estimated volumes of N pixels are obtained, where N is greater than or equal to two;

[0014] A first average value is calculated based on the N estimated volumes, and the first average value is used as the estimated volume.

[0015] Specifically, this embodiment provides an implementation method for estimating the estimated volume of the target to be measured based on image information, by acquiring the image of the target to be measured, extracting a pixel point on the target to be measured in the image, and estimating the volume of the target to be measured based on the pixel point. After selecting multiple pixel points to measure and obtain multiple estimated volumes, the average value is taken to obtain an approximate estimated volume of the target to be measured.

[0016] According to an embodiment of the present invention, the step of calculating a first average value according to the N estimated volumes and using the first average value as the estimated volume specifically includes:

[0017] Obtaining a preset deviation and using the preset deviation as a gradient interval to establish a normal distribution function of N estimated volumes;

[0018] M estimated volumes within a normally distributed confidence interval are obtained, and the first average value is calculated based on the M estimated volumes, where M is less than N.

[0019] Specifically, this embodiment provides another implementation method for estimating the estimated volume of the target to be measured based on image information. In order to obtain an estimated volume that is closer to the actual volume of the target to be measured, a functional relationship diagram between each pixel point in the image and the corresponding volume value of the target to be measured is established, and the number of pixels with relatively close volume values ​​is classified into one category. Each category is distinguished according to the size of the volume value, with a preset deviation as a gradient. The trend of the pixel number and volume value classification data is fitted with an approximate normal distribution function, and the number of pixels within the confidence interval of the normal distribution is taken as the total valid points. All volume values ​​in the valid points are calculated and averaged, thereby obtaining an estimated volume that is closer to the actual volume of the target to be measured.

[0020] In one application scenario, the preset deviation is between 3 and 6%.

[0021] According to an embodiment of the present invention, the step of obtaining the spectral information of the target to be measured and inputting the spectral information into a spectral density model to obtain an estimated density of the target to be measured specifically includes:

[0022] Traversing the sample pool of the spectral density model according to the spectral information of the target to be measured, and obtaining sample spectral information corresponding to the spectral information of the target to be measured;

[0023] A sample density corresponding to the sample spectrum information is obtained, and the sample density is used as the estimated density.

[0024] Specifically, this embodiment provides an implementation method for obtaining the estimated density of the target to be measured based on a spectral density model. By using a pre-trained spectral density model, the spectral information of the target to be measured is input, and matching is performed within the spectral density model to obtain a sample spectrum corresponding to the spectrum of the target to be measured, and the sample density of the sample is retrieved.

[0025] According to an embodiment of the present invention, the spectral density model is obtained by training based on sample spectral information of the sample and the sample density corresponding to the sample spectral information, specifically including:

[0026] placing the sample of known mass into a second container, and filling the second container with an inert gas;

[0027] acquiring a first volume after the sample and the inert gas are mixed, and a first pressure in the second container at the first volume;

[0028] maintaining a constant temperature in the second container, changing a volume of the second container and obtaining a second volume of the second container, and a second pressure in the second container at the second volume;

[0029] Based on the Bomard law, a sample volume of the sample is calculated according to the first volume, the second volume, the first pressure and the second pressure;

[0030] The sample density is obtained based on the sample mass and sample volume;

[0031] Acquire sample spectrum information of the sample, and obtain a spectrum density sample according to the sample spectrum information and sample density training;

[0032] Repeat the above steps X times to obtain X spectral density samples, and obtain the spectral density model according to the X spectral density samples.

[0033] Specifically, this embodiment provides an implementation method for training a spectral density model. Based on a sample with known sample mass, the sample volume is obtained using the Bomard law, and then the sample density of the sample is obtained. At the same time, the spectrum of the sample is collected, and a spectral density sample corresponding to the sample spectrum and the sample density is established. The above steps are repeated multiple times for training, and then the spectral density model is obtained.

[0034] It should be noted that the sample mass can be weighed in advance using a balance.

[0035] According to an embodiment of the present invention, the step of inputting the estimated mass and spectral information of the target to be measured into the spectral nutritional content model of the target to be measured to obtain the nutritional content of the target to be measured specifically includes:

[0036] Traversing the sample pool of the spectral nutrient content model according to the spectral information of the target to be measured, and obtaining sample spectral information corresponding to the spectral information of the target to be measured;

[0037] Obtaining the sample nutrient content per unit mass corresponding to the sample spectral information, and the unit mass share included in the estimated mass;

[0038] The nutritional content of the target to be measured is obtained according to the unit mass share contained in the estimated mass and the sample nutritional content contained in each unit mass.

[0039] Specifically, this embodiment provides an implementation method for obtaining the nutritional content of the target to be measured based on a spectral nutritional content model, wherein sample spectral information is obtained in the spectral nutritional content model through the spectral information of the target to be measured, and the sample nutritional content per unit mass of the sample spectral information is retrieved, and at the same time, the unit mass share contained in the estimated mass is obtained based on the unit mass of the sample spectral information, thereby obtaining the nutritional content of the target to be measured.

[0040] According to an embodiment of the present invention, the spectral nutritional content model is obtained by training based on sample spectral information of the sample and the sample nutritional content corresponding to the sample spectral information, specifically including:

[0041] Obtaining the sample nutrient content of the sample per unit mass;

[0042] Acquiring sample spectrum information of the sample;

[0043] A spectral nutrient content sample is obtained by training according to the sample spectral information and the sample nutrient content per unit mass of the sample;

[0044] Repeat the above steps Y times to obtain Y spectral nutrient content samples, and obtain the spectral nutrient content model according to the Y spectral nutrient content samples.

[0045] Specifically, this embodiment provides an implementation method for training a spectral nutritional content model. According to the nutritional content contained in the sample per unit mass and the sample spectral information corresponding to the sample, a spectral nutritional content sample is established, and the above steps are repeated multiple times for training to obtain the spectral nutritional content model.

[0046] According to a second aspect of the present invention, a system based on the above-mentioned intelligent method for determining the nutritional content of dishes and foods is provided, comprising: a first shell, a second shell, an image detection module and a spectrum detection module;

[0047] The first shell is disposed above the second shell and can be snapped together with the second shell to form a receiving chamber for receiving the object to be measured;

[0048] The image detection module is connected to the first housing and is used to collect image information of the target to be detected;

[0049] The spectrum detection module is connected to the second housing and is used to collect spectrum information of the target to be detected;

[0050] Wherein, the first container is located in the second shell.

[0051] According to one embodiment of the present invention, at least the second shell is a cylindrical structure.

[0052] Specifically, this embodiment provides an implementation of the second shell, and by configuring the second shell to be a cylindrical structure, it is convenient to obtain the bottom radius of the second shell, thereby realizing the volume estimation of the target to be measured through the image of the target to be measured.

[0053] According to an embodiment of the present invention, the second shell is an inverted conical column structure.

[0054] The above one or more technical solutions in the present invention have at least one of the following technical effects: the present invention provides a method and system for quickly detecting the nutritional content of dish food by fusion graph, which realizes the recognition of dish food type, the establishment of image and dish food volume model, the establishment of spectrum and dish food density model, and the establishment of spectrum and dish food nutritional content model by utilizing optical graph technology, machine learning and data modeling algorithms, and then comprehensively estimates the quality and nutritional content of the dish food according to the dish volume.

[0055] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 It is a schematic diagram of the process of the method for rapidly detecting the nutritional content of dishes and foods by fusion graphs provided by the present invention;

[0058] Figure 2 This is one of the schematic diagrams of the assembly relationship of the detection device for intelligently determining the nutritional content of dishes and foods provided by the present invention;

[0059] Figure 3 This is the second schematic diagram of the assembly relationship of the detection device for intelligently determining the nutritional content of dishes and foods provided by the present invention;

[0060] Figure 4 It is one of the schematic diagrams of arrangement relationship for collecting the image information of the target to be tested in the method for quickly detecting the nutritional content of dishes and foods by integrating graphs provided by the present invention;

[0061] Figure 5 This is the second schematic diagram of the arrangement relationship for collecting the image information of the target to be tested in the method for quickly detecting the nutritional content of food dishes provided by the present invention through the fusion graph;

[0062] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention.

[0063] Reference numerals:

[0064] 10. first shell; 20. second shell; 30. first container;

[0065] 40. Image detection module; 50. Bottom spectrum detection module 60. Side spectrum detection module; Block;

[0066] 70: target to be tested; 810: processor; 820: communication interface;

[0067] 830: memory; 840: communication bus. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] The present application is described in detail below in conjunction with the drawings in the specification. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. In the description of the present application, unless otherwise specified, "at least one" includes one or more. "Multiple" refers to two or more. For example, at least one of A, B, and C includes: A exists alone, B exists alone, A and B exist at the same time, A and C exist at the same time, B and C exist at the same time, and A, B, and C exist at the same time. In the present application, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0070] Figure 1 It is a schematic diagram of the process of the method for rapidly detecting the nutritional content of dishes and foods by using the fusion graph provided by the present invention. Figure 1 The process of the method for quickly detecting the nutritional content of dishes and foods by fusion graphs provided by the present invention is demonstrated. The present invention obtains image information of the target 70 to be detected and obtains the estimated volume of the target 70 to be detected based on the image information.

[0071] Furthermore, the spectral information of the target 70 to be measured is obtained, and the spectral information is input into the spectral density model to obtain the estimated density of the target 70 to be measured.

[0072] Furthermore, the estimated mass of the target 70 to be measured is calculated based on the estimated volume and the estimated density, and the estimated mass and spectral information of the target 70 to be measured are input into the spectral nutritional content model of the target 70 to be measured to obtain the nutritional content of the target 70 to be measured.

[0073] It should be noted that the target to be measured 70 mentioned in the present invention is a dish food in a state after being crushed, and the internal state of the target to be measured 70 is uniform and stable.

[0074] Figure 2 and Figure 3 The first and second schematic diagrams of the assembly relationship of the detection device for intelligently determining the nutritional content of food dishes provided by the present invention are shown in FIG. Figure 3 A detection device for intelligently measuring the nutritional content of food dishes was demonstrated. A first container 30 was arranged in the second shell 20. A spectrum detection module was arranged inside the first container 30. The spectrum detection module included a bottom spectrum detection module 50 and a side spectrum detection module 60.

[0075] It should be noted that the present invention does not show the second container. The second container can be understood as a vessel for calculating the sample volume of the sample. By calculating the sample volume and obtaining the sample mass in advance, the sample density of the sample is directly obtained.

[0076] Furthermore, by collecting the sample spectrum information of the sample and combining it with the sample density, a spectrum density sample based on the sample is established.

[0077] Figure 4 and Figure 5 These are schematic diagrams 1 and 2 of the arrangement relationship for collecting image information of the target 70 to be tested in the method for rapidly detecting the nutritional content of food dishes provided by the present invention through the fusion of graphs. Figure 4 and Figure 5 The process of collecting image information of the target 70 to be measured is demonstrated.

[0078] In an application scenario, a tomato and egg dish is used as the target to be tested, and the protein content in the dish is used as the nutritional parameter to be tested, such as Figure 4 and Figure 5 As shown, after the target 70 to be measured has been left to stand for a period of time and the state of the crushed food is stable, the light source of the image detection module 40 illuminates the target 70 to be measured, and the camera completes image recognition of the target 70 to be measured and image acquisition of the target 70 to be measured and the opening boundary of the first container 30. The image recognition uses machine learning algorithms, convolutional neural networks, etc. to realize the recognition of the target 70 to be measured; after image acquisition, taking a certain pixel point (i) of the target 70 to be measured on the boundary of the first container 30 as an example, the horizontal distance between the opening boundary of the target 70 to be measured and the horizontal projection of the holding area of ​​the target 70 to be measured in the horizontal direction of the pixel point is obtained as J(i)F(i), where J(i) is a certain pixel point on the contour boundary of the target 70 to be measured, and F(i) is the projection point of the opening boundary of the first container 30. The first container 30 is a truncated cone with a height of AE, a radius of the larger circular bottom surface of the upper base of R, and a radius of the smaller circular bottom surface of the lower base of r. The vertical projection of a pixel point (i) on the boundary of the target 70 to be measured is J(i)D(i), that is, F(i)E. The radius of the boundary point (i) on the upper surface of the first container 30 is S(i), and the radius of the bottom of the lower surface is r. The estimated volume V of the target 70 to be measured in the first container 30 is calculated by formula (1):

[0079]

[0080] Where r is known, the S(i) value can be obtained by image processing of the target 70 to be measured, and BJ(i)D(i) is obtained using the projection size relationship (2),

[0081]

[0082]

[0083] Formulas (1), (2), and (3) can be used to calculate the estimated volume Vsample(i) of the target 70 under the condition that the pixel point (i) of the target 70 is used as a reference.

[0084] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention.

[0085] In some specific embodiments of the present invention, Figure 1 As shown, this scheme provides a method for rapidly detecting the nutritional content of dishes and foods by fusion atlas, comprising:

[0086] The food is ground into powder and the liquid is filtered to form a target 70 to be tested, and the target 70 to be tested is placed in the first container 30;

[0087] Acquire image information of the target 70 to be measured, and acquire an estimated volume of the target 70 to be measured according to the image information;

[0088] Acquire spectral information of the target 70 to be measured, and input the spectral information into a spectral density model to obtain an estimated density of the target 70 to be measured, wherein the spectral density model is trained based on sample spectral information of the sample and a sample density corresponding to the sample spectral information;

[0089] The estimated mass of the target 70 to be measured is calculated based on the estimated volume and the estimated density, and the estimated mass and spectral information of the target 70 to be measured are input into the spectral nutritional content model of the target 70 to be measured to obtain the nutritional content of the target 70 to be measured, wherein the spectral nutritional content model is trained based on the sample spectral information of the sample and the sample nutritional content corresponding to the sample spectral information.

[0090] In detail, the present invention provides a method for quickly detecting the nutritional content of dish food by fusion atlas, so as to solve the defect that the nutritional content of dish food cannot be accurately detected in the prior art. By utilizing optical atlas technology, machine learning and data modeling algorithms, the dish food type recognition, image and dish food volume model establishment, spectrum and dish food density model establishment, spectrum and dish food nutritional content model establishment are realized, and then the quality and nutritional content of the dish food are comprehensively estimated according to the dish volume.

[0091] In some possible embodiments of the present invention, Figure 4 and Figure 5 As shown, the step of obtaining image information of the target 70 to be measured and obtaining the estimated volume of the target 70 to be measured according to the image information specifically includes:

[0092] Collecting image information of the target 70 to be measured after it has been left stationary in the first container 30;

[0093] An image edge point in the image information is obtained as a first pixel point, and a first estimated volume of the target 70 to be measured is calculated according to a distance from the first pixel point to the edge of the first container 30, a distance from the first pixel point to the center of the image, a depth of the first container 30, and a bottom radius of the first container 30, wherein the first estimated volume is a volume of the target 70 to be measured based on the first pixel point;

[0094] Repeat the above steps until N estimated volumes of N pixels are obtained, where N is greater than or equal to two;

[0095] A first average value is calculated based on the N estimated volumes, and the first average value is used as the estimated volume.

[0096] Specifically, this embodiment provides an implementation method for estimating the estimated volume of the target to be measured 70 based on image information, by acquiring the image of the target to be measured 70, extracting a pixel point on the target to be measured 70 in the image, and estimating the volume of the target to be measured 70 based on the pixel point. After selecting multiple pixel points to measure and obtain multiple estimated volumes, the average value is taken to obtain an approximate estimated volume of the target to be measured 70.

[0097] In some possible embodiments of the present invention, the step of calculating a first average value according to the N estimated volumes and using the first average value as the estimated volume specifically includes:

[0098] Obtaining a preset deviation and using the preset deviation as a gradient interval to establish a normal distribution function of N estimated volumes;

[0099] M estimated volumes within a normally distributed confidence interval are obtained, and a first average value is calculated based on the M estimated volumes, where M is less than N.

[0100] Specifically, this embodiment provides another implementation method for estimating the estimated volume of the target 70 to be measured based on image information. In order to obtain an estimated volume that is closer to the actual volume of the target 70 to be measured, a functional relationship diagram between each pixel point in the image and the corresponding volume value of the target 70 to be measured is established, and the number of pixels with relatively close volume values ​​is classified into one category. Each category is distinguished according to the size of the volume value, with a preset deviation as a gradient. The trend of the pixel number and volume value classification data is fitted with an approximate normal distribution function, and the number of pixels within the confidence interval of the normal distribution is taken as the total valid points. All volume values ​​in the valid points are calculated and averaged, thereby obtaining an estimated volume that is closer to the actual volume of the target 70 to be measured.

[0101] In one application scenario, the preset deviation is between 3 and 6%.

[0102] In some possible embodiments of the present invention, the step of obtaining spectral information of the target 70 to be measured and inputting the spectral information into a spectral density model to obtain an estimated density of the target 70 to be measured specifically includes:

[0103] According to the spectrum information of the target 70 to be measured, the sample pool of the spectrum density model is traversed to obtain the sample spectrum information corresponding to the spectrum information of the target 70 to be measured;

[0104] A sample density corresponding to the sample spectral information is obtained, and the sample density is used as the estimated density.

[0105] Specifically, this embodiment provides an implementation method for obtaining the estimated density of the target to be measured 70 based on the spectral density model. By using a pre-trained spectral density model, the spectral information of the target to be measured 70 is input, and matching is performed within the spectral density model to obtain a sample spectrum corresponding to the spectrum of the target to be measured 70, and the sample density of the sample is retrieved.

[0106] In some possible embodiments of the present invention, the spectral density model is obtained by training based on sample spectral information of the sample and the sample density corresponding to the sample spectral information, specifically including:

[0107] placing a sample of known sample mass into a second container, and filling the second container with an inert gas;

[0108] obtaining a first volume after the sample and the inert gas are mixed, and a first pressure in the second container at the first volume;

[0109] maintaining a constant temperature in the second container, changing a volume of the second container and obtaining a second volume of the second container, and a second pressure in the second container at the second volume;

[0110] Based on the Bomard law, a sample volume of the sample is calculated according to the first volume, the second volume, the first pressure and the second pressure;

[0111] The sample density is obtained based on the sample mass and sample volume;

[0112] Acquire sample spectrum information of the sample, and obtain a spectrum density sample according to the sample spectrum information and sample density training;

[0113] Repeat the above steps X times to obtain X spectral density samples, and obtain a spectral density model based on the X spectral density samples.

[0114] Specifically, this embodiment provides an implementation method for training a spectral density model. Based on a sample with known sample mass, the sample volume is obtained using the Bomard law, and then the sample density of the sample is obtained. At the same time, the spectrum of the sample is collected, and a spectral density sample corresponding to the sample spectrum and the sample density is established. The above steps are repeated multiple times for training to obtain a spectral density model.

[0115] It should be noted that the sample mass can be weighed in advance using a balance.

[0116] In some possible embodiments of the present invention, the step of inputting the estimated mass and spectral information of the target 70 to be measured into the spectral nutritional content model of the target 70 to be measured to obtain the nutritional content of the target 70 to be measured specifically includes:

[0117] According to the spectral information of the target 70 to be measured, the sample pool of the spectral nutrient content model is traversed to obtain the sample spectral information corresponding to the spectral information of the target 70 to be measured;

[0118] Obtaining the sample nutrient content per unit mass corresponding to the sample spectral information, and estimating the unit mass share contained in the mass;

[0119] The nutritional content of the target 70 to be measured is obtained according to the unit mass share contained in the estimated mass and the sample nutritional content contained in each unit mass.

[0120] Specifically, this embodiment provides an implementation method for obtaining the nutritional content of the target to be measured 70 based on the spectral nutritional content model. The sample spectral information is obtained in the spectral nutritional content model through the spectral information of the target to be measured 70, and the sample nutritional content per unit mass of the sample spectral information is retrieved. At the same time, the unit mass share contained in the estimated mass is obtained based on the unit mass of the sample spectral information, and the nutritional content of the target to be measured 70 is obtained.

[0121] In some possible embodiments of the present invention, the spectral nutritional content model is obtained by training based on the sample spectral information of the sample and the sample nutritional content corresponding to the sample spectral information, specifically including:

[0122] Obtain the sample nutrient content of the sample within unit mass;

[0123] Obtaining sample spectrum information of the sample;

[0124] A spectral nutrient content sample is obtained by training according to the sample spectral information and the sample nutrient content per unit mass;

[0125] Repeat the above steps Y times to obtain Y spectral nutrient content samples, and obtain a spectral nutrient content model based on the Y spectral nutrient content samples.

[0126] Specifically, this embodiment provides an implementation method for training a spectral nutritional content model. According to the nutritional content contained in the sample per unit mass and the sample spectral information corresponding to the sample, a spectral nutritional content sample is established, and the above steps are repeated multiple times for training to obtain a spectral nutritional content model.

[0127] In some specific embodiments of the present invention, Figure 2 and Figure 3 As shown, the present solution provides a system based on the above-mentioned intelligent method for determining the nutritional content of dishes and foods, comprising: a first shell 10, a second shell 20, an image detection module 40 and a spectrum detection module; the first shell 10 is arranged above the second shell 20, and can be snapped together with the second shell 20 to form a accommodating chamber for accommodating the target 70 to be measured; the image detection module 40 is connected to the first shell 10, and is used to collect image information of the target 70 to be measured; the spectrum detection module is connected to the second shell 20, and is used to collect spectrum information of the target 70 to be measured; wherein the first container 30 is located in the second shell 20.

[0128] In detail, the present invention also provides an intelligent detection system for determining the nutritional content of dish food, which is used to solve the defect that the nutritional content of dish food cannot be accurately detected in the prior art. By utilizing optical mapping technology, machine learning and data modeling algorithms, the dish food type recognition, image and dish food volume model establishment, spectrum and dish food density model establishment, spectrum and dish food nutritional content model establishment are realized, and then the quality and nutritional content of the dish food are comprehensively estimated according to the dish volume.

[0129] In some possible embodiments of the present invention, at least the second shell 20 is a cylindrical structure.

[0130] Specifically, this embodiment provides an implementation of the second shell 20 , and by configuring the second shell 20 to be a cylindrical structure, it is convenient to obtain the bottom radius of the second shell 20 , and further to estimate the volume of the target 70 to be measured through the image of the target 70 to be measured.

[0131] In some possible embodiments of the present invention, the second housing 20 is an inverted conical column structure.

[0132] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the above-mentioned method of rapidly detecting the nutritional content of a dish food by fusion graph.

[0133] It should be noted that the electronic device in this embodiment can be a server, a PC, or other devices in specific implementation, as long as its structure includes the following: Figure 6 The processor 810, communication interface 820, memory 830 and communication bus 840 shown in the figure, wherein the processor 810, communication interface 820, memory 830 communicate with each other through the communication bus 840, and the processor 810 can call the logic instructions in the memory 830 to execute the above method. This embodiment does not limit the specific implementation form of the electronic device.

[0134] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for rapidly detecting the nutritional content of food dishes by fusion graphs, characterized in that: include: The dish food is crushed and the liquid is filtered to form an object to be tested, and the object to be tested is placed in a first container; Acquire image information of the target to be measured, and acquire an estimated volume of the target to be measured according to the image information; Acquire spectral information of the target to be measured, and input the spectral information into a spectral density model to obtain an estimated density of the target to be measured, wherein the spectral density model is trained based on sample spectral information of a sample and a sample density corresponding to the sample spectral information; The estimated mass of the target to be measured is calculated according to the estimated volume and the estimated density, and the estimated mass and spectral information of the target to be measured are input into the spectral nutritional content model of the target to be measured to obtain the nutritional content of the target to be measured, wherein the spectral nutritional content model is trained based on the sample spectral information of the sample and the sample nutritional content corresponding to the sample spectral information; The spectral density model is obtained by training based on sample spectral information of the sample and the sample density corresponding to the sample spectral information, specifically including: placing the sample of known mass into a second container, and filling the second container with an inert gas; acquiring a first volume after the sample and the inert gas are mixed, and a first pressure in the second container at the first volume; maintaining a constant temperature in the second container, changing a volume of the second container and obtaining a second volume of the second container, and a second pressure in the second container at the second volume; Based on the Bomard law, a sample volume of the sample is calculated according to the first volume, the second volume, the first pressure and the second pressure; The sample density is obtained based on the sample mass and sample volume; Acquire sample spectrum information of the sample, and obtain a spectrum density sample according to the sample spectrum information and sample density training; Repeat the above steps X times to obtain X spectral density samples, and obtain the spectral density model according to the X spectral density samples; The spectral nutritional content model is obtained by training based on the sample spectral information of the sample and the sample nutritional content corresponding to the sample spectral information, specifically including: Obtaining the sample nutrient content of the sample per unit mass; Acquiring sample spectrum information of the sample; A spectral nutrient content sample is obtained by training according to the sample spectral information and the sample nutrient content per unit mass of the sample; Repeat the above steps Y times to obtain Y spectral nutrient content samples, and obtain the spectral nutrient content model according to the Y spectral nutrient content samples.

2. The method for rapidly detecting the nutritional content of food by fusion graph according to claim 1, characterized in that: The step of obtaining the image information of the target to be measured and obtaining the estimated volume of the target to be measured according to the image information specifically includes: Collecting image information of the target to be measured after it has been left stationary in the first container; Acquire an image edge point in the image information as a first pixel point, and calculate a first estimated volume of the target to be measured according to a distance from the first pixel point to an edge of the first container, a distance from the first pixel point to a center of the image, a depth of the first container, and a bottom radius of the first container, wherein the first estimated volume is a volume of the target to be measured based on the first pixel point; Repeat the above steps until N estimated volumes of N pixels are obtained, where N is greater than or equal to two; A first average value is calculated based on the N estimated volumes, and the first average value is used as the estimated volume.

3. The method for rapidly detecting the nutritional content of food by fusion graph according to claim 2, characterized in that: The step of calculating a first average value according to the N estimated volumes and using the first average value as the estimated volume specifically includes: Obtaining a preset deviation and using the preset deviation as a gradient interval to establish a normal distribution function of N estimated volumes; M estimated volumes within a normally distributed confidence interval are obtained, and the first average value is calculated based on the M estimated volumes, where M is less than N.

4. The method for rapidly detecting the nutritional content of food by fusion graph according to claim 1, characterized in that: The step of acquiring the spectral information of the target to be measured and inputting the spectral information into a spectral density model to obtain an estimated density of the target to be measured specifically includes: Traversing the sample pool of the spectral density model according to the spectral information of the target to be measured, and obtaining sample spectral information corresponding to the spectral information of the target to be measured; A sample density corresponding to the sample spectrum information is obtained, and the sample density is used as the estimated density.

5. The method for rapidly detecting the nutritional content of food by fusion graph according to claim 1, characterized in that: The step of inputting the estimated mass and spectral information of the target to be measured into the spectral nutritional content model of the target to be measured to obtain the nutritional content of the target to be measured specifically includes: Traversing the sample pool of the spectral nutrient content model according to the spectral information of the target to be measured, and obtaining sample spectral information corresponding to the spectral information of the target to be measured; Obtaining the sample nutrient content per unit mass corresponding to the sample spectral information, and the unit mass share included in the estimated mass; The nutritional content of the target to be measured is obtained according to the unit mass share contained in the estimated mass and the sample nutritional content contained in each unit mass.

6. A detection system for the method for rapidly detecting the nutritional content of food dishes based on the fusion graph according to any one of claims 1 to 5, characterized in that: include: A first shell, a second shell, an image detection module and a spectrum detection module; The first shell is disposed above the second shell and can be snapped together with the second shell to form a receiving chamber for receiving the object to be measured; The image detection module is connected to the first housing and is used to collect image information of the target to be detected; The spectrum detection module is connected to the second housing and is used to collect spectrum information of the target to be detected; Wherein, the first container is located in the second shell.

7. The detection system of claim 6 for the method of rapidly detecting the nutritional content of food dishes by integrating atlas, characterized in that: The second shell is a cylindrical structure.

8. The detection system of claim 6 for the method of rapidly detecting the nutritional content of food by integrating atlas, characterized in that: The second shell is an inverted conical column structure.

Citation Information

Patent Citations

  • Rice nutrient information measuring method based on visible / near infrared multispectral imaging

    CN101210876A

  • Method and device for rapidly detecting nutritional information of tea tree based on hyperspectral imaging technique

    CN101915738A