Food calorie identification method

By acquiring food image data, using deep learning and measurement theory to quantify volume and mass, and building a nonlinear model with dynamic system theory, the problem of low accuracy of food calorie calculation is solved, and personalized diet management and healthy diet control are achieved.

CN120336670APending Publication Date: 2025-07-18BEIJING SPECIAL MEDICAL INTERNET BIOTECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510541593.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify food calories, especially when considering food morphology changes and cooking methods, resulting in low calorie calculation accuracy and unable to meet the needs of personalized health management.

Method used

By acquiring food image data, using deep learning to extract three-dimensional spatial data, combining Lebesgue measurements and Radon measurements for volume and mass quantification, a nonlinear relationship model is constructed based on dynamic system theory, dynamically adjusting the caloric calculation, and fusing volume and caloric data through the integrated model to provide real-time feedback.

Benefits of technology

It realizes accurate quantification of food calories, can adapt to diverse cooking conditions, provide personalized dietary management suggestions, help users effectively control calorie intake and improve healthy eating habits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336670A_ABST
    Figure CN120336670A_ABST
Patent Text Reader

Abstract

The invention relates to the field of food nutriology and health management, and discloses a food calorie identification method, which comprises the following steps: acquiring food image data, extracting three-dimensional space data by using deep learning, and quantifying the volume and mass of food by using Lebesgue measurement and Radon measurement; then, a nonlinear relation model between the calorie and the food amount is constructed based on a power system theory, and calorie calculation is dynamically adjusted; the volume and calorie data are fused through the integrated model, a final food calorie value is obtained, and real-time feedback is provided in combination with target calorie set by a user. Calculation parameters can be adjusted according to different food types and cooking modes, high accuracy and adaptability are achieved, a user can be helped to effectively manage caloric intake, and the healthy diet target is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of food nutrition and health management, and particularly to a method for identifying food calories. Background Art

[0002] With the continuous growth of the demand for health management and diet control, the accurate identification of food calories has become an important research direction. Traditional food calorie calculation methods mostly rely on artificial experience or standard data tables based on food categories. These methods usually do not consider the effects of food form, volume change, and cooking methods on calories, resulting in large errors in calorie estimation. In addition, existing image recognition technologies have low accuracy when dealing with foods with irregular shapes and are difficult to adapt to various different food forms and cooking methods.

[0003] To make up for these deficiencies, although some food image recognition methods based on deep learning have been proposed, these methods mainly focus on the recognition of food categories and lack effective support for the precise quantification of volume and mass. In particular, the calorie changes of foods in various cooking states have not been fully considered. Existing technologies are difficult to achieve precise modeling between food calories and their physical characteristics, and thus cannot provide effective diet control and calorie management suggestions for users.

[0004] In addition, traditional food calorie calculation methods usually do not consider the personalized needs and diet goals of users and are difficult to provide dynamic feedback and adjustment strategies. This greatly reduces the adaptability and accuracy of traditional methods in practical applications, especially in the face of complex and diverse diet scenarios, and cannot meet the needs of personalized health management. Therefore, there is an urgent need for a new method to solve the deficiencies in the existing technology and provide a more accurate and personalized calorie recognition and management solution. Summary of the Invention

[0005] Aiming at the deficiencies of the existing technology, the present invention provides a method for identifying food calories, which solves the problems of low accuracy in calculating food calories and inability to consider food form changes and cooking method differences in the existing technology.

[0006] To achieve the above objectives, the present invention is realized through the following technical solutions: A method for identifying food calories, comprising the following steps: Obtain image data of the food, perform image processing, and extract the morphological features and three-dimensional spatial data of the food; Based on measure theory, quantify the three-dimensional volume data of the food to calculate the volume and mass of the food; Based on the theory of dynamic systems, construct a non-linear relationship model between calories and the amount of food to dynamically adjust the calorie calculation of the food; Fuse the relationship between the volume and calories of the food through an integrated model to obtain the food calorie value; Provide calorie feedback to the user according to the calculation result of the food quantity and calories.

[0007] Preferably, the step of acquiring the image data of the food and performing image processing includes: Perform denoising processing on the food image to remove background interference and image noise; Extract the contour information of the food, and separate the food contour from the background by means of edge detection; Convert the two-dimensional image into three-dimensional space data, and use three-dimensional reconstruction technology to obtain the volume information of the food.

[0008] Preferably, the step of calculating the volume and mass of the food by quantifying the three-dimensional volume data of the food based on measure theory includes: Quantify the acquired three-dimensional food data. First, calculate the volume of the food area through the Lebesgue measure, where the volume The calculation formula is:

[0009] Among them, is the three-dimensional area of the food, is the volume element in three-dimensional space; After the volume calculation is completed, integrate the mass distribution in the food area through the Radon measure to calculate the mass of the food. The formula is:

[0010] Among them, is the local area of the food area, is the mass distribution of the food in this area, and the total mass of the food is calculated based on this formula; By combining the volume and mass calculations, determine the ratio of the total mass to the volume of the food, and provide input data for subsequent calorie estimation.

[0011] Preferably, the step of constructing a non-linear relationship model between calories and food quantity based on dynamic system theory includes: Construct a differential equation model of food calories changing with time, expressed as:

[0012] Among them, represents the change rate of food calories with time, is a non-linear function of calorie change, reflecting the influence of volume and cooking state on calorie change. The calorie is the calorie of the food, is the volume of the food, is the state variable of the food; The differential equation model is discretized using numerical methods to obtain a difference equation:

[0013] where, represents the food calorie at time , is the time step, is the non - linear rate of change based on the current calorie, volume, and state at time to update the food calorie value.

[0014] Preferably, it further includes an optimization step for the non - linear relationship model, specifically: Using attractor theory to analyze the long - term stable state of food calories, and predicting the calorie change trend of food during multiple cooking processes for different cooking methods and food states; Based on the attractor optimization model, by simulating the calorie changes of food at different time steps, adjusting the parameters of calorie calculation, and optimizing the prediction accuracy of food calories to adapt to the calorie calculation after multiple cookings.

[0015] Preferably, the step of fusing the relationship between the volume and calorie of food through an integrated model to obtain the food calorie value includes: By combining the non - linear relationship model between food volume and calorie , a mapping function between food volume and calorie is established , expressed as:

[0016] where, is the food calorie, is the food volume, is the food state or cooking method, and the function represents the non - linear relationship between volume and calorie, which is adjusted according to the type and cooking method of food; Using the integrated model to fuse the calculated relationship between volume and calorie. First, standardize the food volume to map the volume value to an appropriate range; Weightedly fuse the standardized volume value with the calorie calculation result to obtain the final food calorie value , where the fusion model is calculated by the following formula:

[0017] where, is the finally estimated food calorie value, is the preliminary calorie value directly calculated based on volume and mass, and is the weighting coefficient, which is dynamically adjusted according to different food types and states.

[0018] Preferably, the step of providing calorie feedback to the user according to the calculation result of the food quantity and calories includes: Compare the calculated food calories with the target calories set by the user, and calculate the difference in food calories ; Provide real-time feedback according to the difference If , it prompts the user that the current food calories exceed the target value and recommends reducing food intake; if , it prompts the user that the current food calories are lower than the target value and recommends increasing food intake.

[0019] The present invention also provides a food calorie recognition device, including: A processing module for receiving food image data and performing image processing to extract the morphological features and three-dimensional data of the food; A measurement module for accurately quantifying the volume and mass of the food based on measure theory; A dynamic system module for constructing a non-linear relationship model between calories and food quantity and dynamically calculating the calories of the food; An integration module for fusing the relationship between food quantity and calories through a model and outputting an accurate calorie value; A feedback module for providing feedback according to the calorie calculation result and optimizing the calorie estimation process.

[0020] The present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method as described above is implemented.

[0021] The present invention also provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method as described above is implemented.

[0022] The present invention provides a food calorie recognition method. It has the following beneficial effects: By combining image processing, measure theory, and dynamic system theory, the present invention can accurately quantify the volume and mass of food and accurately calculate the calories of food through a dynamic model, avoiding errors in traditional methods.

[0023] The present invention adopts an attractor optimization model and an integration algorithm, which can dynamically adjust calorie calculation parameters according to changes in different cooking methods and food types, so as to adapt to diverse foods and cooking conditions.

[0024] The calorie feedback mechanism provided by the present invention can compare the user's target calories with the actual calorie intake, and give diet adjustment suggestions in real time to help users effectively manage food intake and improve healthy eating habits.

[0025] By collecting the user's historical diet data, the system of the present invention can provide personalized diet recommendations, automatically adjust calorie targets and diet strategies to meet the health needs of different users.

[0026] By using the Lebesgue measure and Radon measure in measure theory, the present invention can handle foods with irregular shapes, provide more accurate quantification of volume and mass, and ensure the reliability of calorie estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a schematic flowchart of the method of the present invention; Figure 2 is a schematic structural diagram of the device of the present invention; Figure 3 is a schematic structural diagram of the computer device of the present invention.

[0028] Among them, 100, processing module; 200, measurement module; 300, power system module; 400, integration module; 500, feedback module; 40, computer device; 41, processor; 42, memory; 43, storage medium. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0030] Please refer to the attach Figure 1 , the present invention provides a method for identifying food calories, which can accurately calculate the volume, mass and calories of food, and provide real-time feedback based on these data to help users effectively manage their diet.

[0031] As Figure 1 shown, the method for identifying food calories may include the following steps: S1. Obtain the image data of the food, perform image processing, and extract the morphological features and three-dimensional spatial data of the food; S2. Based on measure theory, calculate the volume and mass of the food by quantifying the three-dimensional volume data of the food; S3. Based on the dynamic system theory, construct a non-linear relationship model between the amount of heat and the amount of food, and dynamically adjust the heat calculation of food; S4. Integrate the relationship between the volume and heat of food through an integrated model to obtain the food heat value; S5. Provide heat feedback to the user according to the calculation results of the amount of food and heat.

[0032] The following will explain each step of the method of the present invention in detail.

[0033] For step S1, in this embodiment, first, image data of food is acquired through an image acquisition device. The main purpose of this step is to obtain the visual information of the food and provide data support for subsequent food quantification and calorie estimation.

[0034] The image acquisition device can be a high-definition camera, a camera, or a 3D scanner, etc., to ensure that a sufficiently clear and high-resolution food image is acquired. To improve the accuracy of recognition, it is recommended to take pictures from multiple angles to ensure that the image can cover all the key parts of the food. The image data from multiple perspectives can avoid the loss of morphological information caused by the limitation of the shooting angle.

[0035] Exemplarily, when the food is a vegetable or a fruit, there may be complex shapes and curved surfaces. Using images from multiple angles can fully capture these details and ensure an accurate understanding of the food shape during subsequent processing.

[0036] After the image acquisition is completed, it enters the image preprocessing stage. In this embodiment, the image preprocessing mainly includes two steps: denoising and contour extraction.

[0037] In terms of image denoising processing, common image denoising algorithms can be adopted, such as Gaussian blur or mean filtering, etc. This step is mainly used to remove the background noise in the image, ensure that the contour information of the food is more prominent, and reduce interference. This step is to ensure the accuracy during subsequent analysis. Especially for relatively complex food shapes, denoising processing helps to reduce the errors caused by noise.

[0038] Subsequently, contour extraction is performed on the denoised image. Contour extraction is usually carried out through edge detection algorithms, such as the Canny edge detection algorithm or the Sobel operator, etc. These methods can effectively extract the edges of the food, thereby clarifying the outer contour of the food and preparing for subsequent three-dimensional space data conversion. Through contour extraction, the boundary of the food can be clearly determined, which is crucial for subsequent calculation of the food volume and three-dimensional reconstruction.

[0039] After completing the above processing, this embodiment continues to extract the three-dimensional spatial data of the image. Through existing three-dimensional reconstruction techniques, two-dimensional image data can be converted into an object model in three-dimensional space. The three-dimensional reconstruction technique can generate a three-dimensional image based on a deep learning model or by methods such as photometric stereo method and structured light method.

[0040] Exemplarily, using a three-dimensional reconstruction model based on a convolutional neural network (CNN) can convert two-dimensional image data into a depth map, and then generate a three-dimensional volume model of the food through the depth map. This three-dimensional model accurately represents the volume information of the food in space and provides the necessary data basis for subsequent volume quantification and quality calculation.

[0041] It should be noted that in this embodiment, the generated three-dimensional spatial data is very crucial. This data is not only used for subsequent volume calculation, but also will be an important parameter in food calorie calculation. In this process, the three-dimensional spatial data can help the system accurately identify the shape of the food, and thus provide more reliable input data for calorie estimation.

[0042] After the above steps, this embodiment can obtain the image data, morphological characteristics, and three-dimensional spatial data of the food, ensuring that the subsequent steps can perform accurate calculations of volume and quality with sufficient image data support. These data provide a basis for further calculating the calorie of the food through measure theory, dynamical system theory, etc. in the subsequent steps.

[0043] For step S2, in this embodiment, based on the obtained three-dimensional food data, measure theory is used for quantification calculation to determine the volume and quality of the food. This process is crucial for subsequent calorie calculation. To ensure the accuracy of calorie estimation, first, the physical properties of the food must be accurately measured.

[0044] After image processing and three-dimensional reconstruction are completed, the obtained three-dimensional data provides the shape and volume information of the food. In this embodiment, the Lebesgue measure and Radon measure are used to quantify the volume and quality of the food. The applications of these two measures in this embodiment are described in detail below.

[0045] First, the Lebesgue measure is used to calculate the total volume of the food. The Lebesgue measure is a standard volume calculation method, which obtains its volume by integrating the object region in three-dimensional space. In actual operation, the volume of the food can be calculated by integrating its three-dimensional spatial data. Specifically, the volume is calculated by the following formula:

[0046] where is a three - dimensional region of food, is a volume element. According to the three - dimensional spatial data of the food, represents the overall area of the food, represents the volume elements within that area. By segmenting the three - dimensional data of the food, it is divided into multiple small volume units, and these units are integrated to finally obtain the total volume of the food.

[0047] In this process, the details of the three - dimensional data are crucial. For example, in the case of foods with complex shapes (such as fruits and vegetables, baked goods, etc.), the Lebesgue measure can quantify the volume of the food through a high - precision integration method to ensure the accuracy of the calculation results.

[0048] Secondly, the Radon measure is used to calculate the mass of the food. The Radon measure is an important method for measuring the mass distribution of objects with irregular shapes or distributions, especially suitable for food objects with irregular or complex shapes. Its basic principle is to calculate the mass of the food within a specific area through integration.

[0049] In this embodiment, the Radon measure is used to calculate the mass of the food . Assume that the shape of the food in three - dimensional space can be divided into multiple small regions, and the mass of each small region is represented by the function . The calculation formula of the Radon measure is as follows:

[0050] where, represents the mass within the region , is the mass distribution function within that region, is the volume element within the region, is a certain local region of the food area.

[0051] Specifically, the Radon measure obtains the total mass within the region by integrating each local small region of the food area. Since the shape of the food is usually irregular, the Radon measure can take this complex shape into account, accurately calculate the mass of each small region through the integration method, and finally obtain the total mass of the entire food.

[0052] Assume that when dealing with a food with a complex shape, such as an apple. The shape of the apple is not a regular geometric shape and its mass cannot be directly calculated by a simple geometric volume formula. Therefore, using the Radon measure, the apple can be divided into multiple small regions, and the mass of each region is described by , where It may be related to factors such as the density and texture of the food. By integrating these small regions, the mass of the entire apple can ultimately be obtained.

[0053] In the application, through this method, the Radon measure can effectively handle food objects with complex shapes, ensuring the accuracy of the mass calculation results. The mass contributions of each small region are comprehensively considered, thus avoiding the errors that may be brought by simplified models.

[0054] After obtaining the volume and mass of the food, it can provide data support for subsequent calorie calculations. Since the calculation of calories is usually closely related to the volume and mass of the food, this embodiment provides an accurate basis for calorie calculation through measure theory.

[0055] For step S3, in this embodiment, when constructing the non-linear relationship model between calories and the amount of food, the dynamic system theory is adopted. This process involves modeling the change of food calories over time through differential equations and dynamically adjusting the calorie calculation process through this model.

[0056] Specifically, the calories of the food are a dynamic variable, and its change is affected by multiple factors, including the food volume , the cooking state of the food, etc. In order to capture this complex non-linear relationship, differential equations are used to describe the change of calories over time. The differential equation can be written as:

[0057] where represents the change rate of calories, is a non-linear function describing the change of calories, depending on the current calories , the food volume and the cooking method and other factors. This function will have different expressions under different cooking conditions. Its basic meaning is that the change of food calories is not only related to the current volume and cooking method, but also affected by the historical calorie state, reflecting the dynamic characteristics of food calories.

[0058] For example, during the cooking process, the change of food calories over time may be affected by factors such as heat conduction and evaporation, and these changes are non-linear. By constructing this differential equation, we can track the change of food calories in real time and adjust the estimated value of calories.

[0059] Next, numerical methods are used to discretize the above differential equation to obtain the form of a difference equation:

[0060] Among them, is the time step, representing the time interval for each calculation, is the moment of the food calorie, is the food volume, is the cooking method or state of the food, is at the moment the rate of change based on the current calorie, volume and cooking state.

[0061] Through this difference equation, the calorie value at each moment can be gradually updated according to the initial calorie, volume and cooking method of the food. This calculation process can dynamically adjust the estimation of food calories to better reflect the changes of food in different cooking states.

[0062] Exemplarily, when processing a kind of meat food, assuming that the cooking temperature is constantly rising, the evaporated water will cause changes in calories. In this case, the non-linear function will take into account the changes in food volume and the gradual transfer of calories during the cooking process, and then accurately calculate the changes in calories.

[0063] In addition, the attractor theory can further optimize the calorie calculation. In a dynamic system, an attractor refers to the stable state that the system tends to after a certain period of time. Through the attractor theory, the calorie change trend of food during multiple cooking processes can be analyzed, and the final stable calorie value can be predicted accordingly. The attractor theory can help find the long-term stable state of food calories in multiple calculations, avoid excessive dynamic adjustments, and improve the stability and accuracy of calorie calculation.

[0064] Specifically, the attractor can be expressed as the final stable value of the food calorie system in multiple cooking processes. The calculation method of the attractor is as follows:

[0065] Among them, is the attractor, representing the stable value of food calories, is at the moment of the food calorie. By analyzing the calorie change trend under different cooking methods and states, the final stable value of food calories can be calculated, further optimizing the calorie estimation process.

[0066] Exemplarily, if the cooking method of the food is relatively complex and different cooking steps will have different effects on calories, the attractor theory will help determine a final stable calorie value without having to perform excessive calculations at each moment, thus improving the efficiency and accuracy of calorie estimation.

[0067] When food undergoes multiple cooking processes, each cooking affects the change in food calories, and these changes gradually tend towards the stable calorie value represented by the attractor. In this case, the attractor optimization model can, through multiple calculations, ultimately determine the stable state of food calories without having to perform complex calorie calculations every time. By simulating the calorie changes of food at different time steps, the calories can be optimized after each cooking step to ensure that the calculated result of food calories is close to the final stable value.

[0068] In practical applications, due to different cooking methods, the change in food calories has a certain degree of uncertainty. To adapt to this uncertainty, the attractor optimization model adjusts the calculation parameters based on the calorie data obtained during the actual cooking process. Specifically, based on the calorie changes after each cooking, the parameters in the model can be dynamically adjusted to ensure that the accuracy of calorie calculation is continuously improved. The calculated result of calories after each cooking is compared with the expected value of the attractor. If there is a deviation, the parameters are optimized and adjusted, so that the final calculated result of calories is more accurate.

[0069] To ensure the effectiveness of the attractor optimization model, the stability of the model needs to be verified through multiple experiments. After each calorie calculation, its result is compared with the final stable value predicted by the attractor model. By adjusting the parameters and model configuration, the accuracy of calorie calculation is gradually improved. In this way, the attractor optimization model can effectively cope with the uncertainty of calorie changes during the cooking process and provide more stable and accurate calorie estimation.

[0070] In summary, in this embodiment, a non - linear relationship model between food calories and food quantity is constructed through the dynamic system theory, and the function of dynamically adjusting food calories is realized through the discretized calculation of differential equations. Through the optimization of the attractor theory, the stability and reliability of calorie estimation can be further improved, ensuring the efficiency and accuracy of this method in practical applications.

[0071] For step S4, in this embodiment, the food volume data and calorie data obtained from the previous steps are effectively fused to calculate the final food calorie value. In this process, the construction and application of the integrated model are the key. Its core idea is to fuse data from different sources according to the changes in factors such as food volume and cooking method to finally obtain an accurate calorie value.

[0072] First, the volume of the food and the calories The relationship between them is usually complex and non - linear. In this embodiment, the food volume and the cooking method Changes will directly affect the calories of food. To obtain more reliable results in this complex relationship, in this embodiment, an integrated model is constructed to organically combine these factors.

[0073] The core idea of the integrated model is to construct a mapping function , which establishes a connection between the volume of food and the cooking method and the final calories. This function can be expressed by the following formula:

[0074] where is the finally calculated calories of food, is the volume of food, is the cooking method. This mapping function describes the combined effect of food volume and cooking method on calories. The specific form of the function depends on food type, cooking method and other related factors. This function can be obtained by fitting experimental data to ensure the accuracy of the mapping relationship.

[0075] Exemplarily, when calculating the calories of a grilled meat food, the volume of the food is directly related to the cooking time and temperature . The larger the volume, the longer the cooking time, and the more complex the calculation of calories. The integrated model will comprehensively consider these factors and dynamically adjust the function to obtain an accurate calorie value.

[0076] The fusion steps of the integrated model include the following aspects: Data standardization: Since the dimensions of food volume and cooking method are different, to ensure the stability and accuracy of the model, it is first necessary to standardize the input data. The volume data and the cooking method will be converted into standardized data with the same dimension to eliminate the influence of dimension differences on the final result.

[0077] Weighted fusion: The integrated model also needs to consider the importance of different data sources. Especially when dealing with multiple input data, it is crucial to assign reasonable weights to different data. In this embodiment, a weighted fusion method is adopted, and the influence of the food volume and cooking method is weighted by the weighting coefficients and to obtain the final calorie value. The weighted fusion formula is as follows:

[0078] where is the final food calorie value, is the preliminary calculation result based on the food volume and mass, is the calorie mapping function calculated comprehensively from the food volume and cooking method, and are the weight coefficients, representing the relative importance of volume and cooking method in calorie calculation.

[0079] Model training and optimization: To ensure the accuracy of weighted fusion, the model needs to be trained and optimized with experimental data. The experimental data can be fitted with the volume, mass, and calorie data of real foods to determine the optimal weight coefficients and so that the calculation result of the fusion model can be as close as possible to the actual value.

[0080] For example, for different types of foods (such as fruits and meats), the impact of volume on calories may be different. Therefore, by training on multiple food data sets, the weighted coefficients for different types of foods are determined to further optimize the performance of the integrated model.

[0081] Through the application of the integrated model, an accurate food calorie value can finally be obtained. This value is not only based on the food volume and cooking method but also ensures the reliability of calorie estimation by comprehensively considering other factors (such as cooking temperature, time, etc.).

[0082] The integrated model fusion step in this embodiment effectively combines multiple influencing factors such as volume and cooking method, can calculate the calories of foods more accurately, and provides more precise data support for subsequent steps (such as calorie feedback to users).

[0083] For step S5, in this embodiment, based on the food calories calculated in the foregoing steps and combined with the target calories set by the user, real-time calorie feedback is provided to help the user adjust their diet. This step forms a feedback mechanism based on the comparison between the dynamically calculated calorie value and the target value to guide the user to better control their food intake.

[0084] First, the system needs to compare the final calorie value of the food with the target calorie value set by the user to calculate the difference between the two . The specific calculation formula is as follows:

[0085] where, represents the food calorie value calculated by the system, is the target calorie value set by the user. This difference It can be used to determine whether the user's current food intake meets the requirements of a healthy diet.

[0086] Exemplarily, assume that the user's target calorie is 500 kcal, and the calorie of the food calculated by the system is 600 kcal, then the difference is 100 kcal, indicating that the calorie currently consumed by the user exceeds the target value.

[0087] Next, according to the magnitude of the difference the system will give different feedback suggestions. When it indicates that the food calorie exceeds the target value, the system will prompt the user that the current food intake is excessive and recommend reducing the intake; when it indicates that the food calorie is lower than the target value, the system will recommend that the user appropriately increase the food intake to meet the needs of a healthy diet. If it indicates that the user's current food intake meets the target calorie and the existing eating habits can be maintained.

[0088] To more intuitively convey the feedback information, this embodiment can display the calorie calculation result to the user in the form of a graphical interface or voice prompt. Through real-time feedback, the user can immediately adjust their diet strategy to achieve better calorie control effect.

[0089] During the feedback process, the system can further record the user's historical calorie data and adjust the feedback strategy according to these data. This personalized adjustment based on historical data can improve the adaptability of the system and make the calorie feedback more in line with the user's health goals.

[0090] For example, if the user often consumes more calories than the target value in the past period, the system can appropriately adjust the target calorie according to the historical trend and give appropriate diet suggestions. The system will provide personalized diet adjustment suggestions for the user through data analysis to help the user gradually develop good eating habits.

[0091] Furthermore, based on the user's long-term calorie intake pattern, the system can also provide the user with a more detailed healthy diet plan. For example, based on the calorie calculation results at multiple time points, the system can analyze and recommend that the user optimize the diet structure, such as increasing the intake of low-calorie foods and reducing the intake of high-calorie foods.

[0092] To ensure the effectiveness of the calorie feedback mechanism, the system can also continuously optimize the calorie estimation and feedback strategy through the feedback mechanism. After each food intake, the system adjusts the model parameters of calorie calculation by collecting user feedback data (such as the actual intake of food) to improve the accuracy of future estimation.

[0093] Through this process of dynamic adjustment and optimization, the system can adapt to the needs of different users, provide customized dietary management advice for each user, and ensure that the calorie intake always meets the health goals.

[0094] In summary, in this embodiment, step S5 calculates the calories of food in real time, compares them with the goals set by the user, provides feedback, and adjusts the user's dietary strategy according to the feedback.

[0095] Generally speaking, the present invention obtains the image data of food, uses deep learning technology to extract three-dimensional space data, quantifies the volume and mass of food by combining Lebesgue measure and Radon measure; then constructs a non-linear relationship model between food calories, volume, and cooking methods based on the theory of dynamic systems, and dynamically adjusts the calculation by simulating calorie changes; then fuses the volume and calorie data through an integrated model to obtain the final food calorie value; finally, compares the calculation result with the user's target calories, provides real-time feedback, and optimizes the dietary strategy to help users accurately control calorie intake and achieve the purpose of health management.

[0096] The food calorie recognition device described below can be correspondingly referred to the food calorie recognition method described above.

[0097] Please refer to the attached Figure 2 , the present invention also provides a food calorie recognition device, including: A processing module 100, configured to receive food image data and perform image processing to extract the morphological features and three-dimensional data of the food; A measurement module 200, configured to accurately quantify the volume and mass of food based on measure theory; A dynamic system module 300, configured to construct a non-linear relationship model between calories and the amount of food and dynamically calculate the calories of food; An integration module 400, configured to fuse the relationship between the amount of food and calories through a model and output an accurate calorie value; A feedback module 500, configured to provide feedback based on the calorie calculation result and optimize the calorie estimation process.

[0098] The device in this embodiment can be used to execute the above method embodiment, and its principle and technical effect are similar, which will not be elaborated here.

[0099] Please refer to the attached Figure 3 , the present invention also provides a computer device 40, including: a processor 41 and a memory 42. The memory 42 stores a computer program executable by the processor, and when the computer program is executed by the processor, it executes the above method.

[0100] The present invention also provides a storage medium 43, on which a computer program is stored, and when the computer program is run by a processor 41, the above method is executed.

[0101] Among them, the storage medium 43 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, abbreviated as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, abbreviated as EPROM), programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), read-only memory (Read-Only Memory, abbreviated as ROM), magnetic memory, flash memory, magnetic disk or optical disc.

[0102] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for identifying food calories, characterized in that, It includes the following steps: Obtain the image data of the food, perform image processing, and extract the morphological features and three-dimensional spatial data of the food; Based on measure theory, by quantifying the three-dimensional volume data of the food, calculate the volume and mass of the food; Based on dynamic system theory, construct a non-linear relationship model between calories and the amount of food, and dynamically adjust the calorie calculation of the food; Fuse the relationship between the volume and calories of the food through an integrated model to obtain the calorie value of the food; According to the calculation results of the amount of food and calories, provide calorie feedback to the user.

2. The food calorie recognition method according to claim 1, wherein, The step of obtaining the image data of the food and performing image processing includes: Perform denoising processing on the food image to remove background interference and image noise; Extract the contour information of the food, and separate the food contour from the background through edge detection methods; Convert the two-dimensional image into three-dimensional spatial data, and use three-dimensional reconstruction technology to obtain the volume information of the food.

3. The food calorie recognition method according to claim 1, characterized in that The step of calculating the volume and mass of the food by quantifying the three-dimensional volume data of the food based on measure theory includes: Quantify the obtained three-dimensional food data. First, calculate the volume of the food area through the Lebesgue measure, where the volume is calculated by the formula: ; Among them, is the three-dimensional region of the food, is the volume element in the three-dimensional space; After the volume calculation is completed, integrate the mass distribution in the food area through Radon measure to calculate the mass of the food. The formula is: ; Among them, is a local area of the food area, is the mass distribution of the food in this area, and the total mass of the food is calculated based on this formula; By combining volume and mass calculations, determine the ratio of the total mass to volume of the food, and provide input data for subsequent calorie estimation.

4. The food calorie recognition method according to claim 1, characterized in that The step of constructing a non-linear relationship model between calories and the amount of food based on dynamic system theory includes: Construct a differential equation model for the change of food calories over time, expressed as: ; Among them, represents the rate of change of food calories over time, is a non-linear function of the calorie change, reflecting the influence of volume and cooking state on the calorie change, and the calorie is the calorie of the food, is the volume of the food, is the state variable of the food; Use numerical methods to discretize the differential equation model to obtain a difference equation: ; Among them, represents the food calorie at time is the time step, and is the non - linear change rate based on the current calorie, volume and state to update the food calorie value.

5. The food calorie recognition method according to claim 4, wherein It also includes an optimization step for the non-linear relationship model. Specifically: Use attractor theory to analyze the long-term stable state of food calories, and predict the calorie change trend of food during multiple cooking processes for different cooking methods and food states; Based on the attractor optimization model, by simulating the calorie change of food at different time steps, adjust the parameters of calorie calculation, and optimize the prediction accuracy of food calories to adapt to the calorie calculation after multiple cookings.

6. The food calorie recognition method according to claim 1, characterized in that, The step of fusing the relationship between the volume and calories of the food through an integrated model to obtain the calorie value of the food includes: By combining the non-linear relationship model between food volume and calories a mapping function between food volume and calories is established , expressed as: ; Among them, is the food calorie, is the food volume, is the food state or cooking method, and the function represents the non-linear relationship between the volume and the calorie, and this relationship is adjusted according to the type and cooking method of the food; Using an integrated model to fuse the relationship between the calculated volume and heat, first standardize the food volume and map the volume value to an appropriate range; The standardized volume value and the heat calculation result are weighted and fused to obtain the final food calorie value , where the fusion model is calculated by the following formula: ; Among them, is the finally estimated food calorie value, is the preliminary calorie value directly calculated based on volume and mass, and are weighting coefficients, which are dynamically adjusted according to different food types and states.

7. The food calorie recognition method according to claim 1, characterized in that The step of providing calorie feedback to the user according to the calculation results of the amount of food and calories includes: Compare the calculated food calories with the target calories set by the user, and calculate the difference in food calories ; Based on the difference Provide real-time feedback. If , it prompts the user that the current food calorie exceeds the target value and recommends reducing food intake; if , it prompts the user that the current food calorie is lower than the target value and recommends increasing food intake.

8. A food calorie recognition device for performing the food calorie recognition method according to any one of claims 1-7, characterized in that It includes: A processing module for receiving food image data and performing image processing to extract the morphological features and three-dimensional data of the food; A measurement module for accurately quantifying the volume and mass of the food based on measure theory; A dynamic system module for constructing a non-linear relationship model between calories and the amount of food and dynamically calculating the calories of the food; An integration module for fusing the relationship between the amount of food and calories through a model and outputting an accurate calorie value; A feedback module for providing feedback according to the calorie calculation results and optimizing the calorie estimation process.

9. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the food calorie recognition method according to any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the food calorie recognition method according to any one of claims 1-7.