| Literature DB >> 35885091 |
Hongyang Li1, Guanci Yang1,2,3.
Abstract
In order to automatically perceive the user's dietary nutritional information in the smart home environment, this paper proposes a dietary nutritional information autonomous perception method based on machine vision in smart homes. Firstly, we proposed a food-recognition algorithm based on YOLOv5 to monitor the user's dietary intake using the social robot. Secondly, in order to obtain the nutritional composition of the user's dietary intake, we calibrated the weight of food ingredients and designed the method for the calculation of food nutritional composition; then, we proposed a dietary nutritional information autonomous perception method based on machine vision (DNPM) that supports the quantitative analysis of nutritional composition. Finally, the proposed algorithm was tested on the self-expanded dataset CFNet-34 based on the Chinese food dataset ChineseFoodNet. The test results show that the average recognition accuracy of the food-recognition algorithm based on YOLOv5 is 89.7%, showing good accuracy and robustness. According to the performance test results of the dietary nutritional information autonomous perception system in smart homes, the average nutritional composition perception accuracy of the system was 90.1%, the response time was less than 6 ms, and the speed was higher than 18 fps, showing excellent robustness and nutritional composition perception performance.Entities:
Keywords: YOLOv5; autonomous perception; nutritional information; smart home; social robot
Year: 2022 PMID: 35885091 PMCID: PMC9324181 DOI: 10.3390/e24070868
Source DB: PubMed Journal: Entropy (Basel) ISSN: 1099-4300 Impact factor: 2.738
Figure 1Overall architecture diagram of food-recognition algorithm based on YOLOv5.
A total of 32 basic ingredients and their calibrated quantities.
| Vegetables, Potatoes, Fruits | Meat, Eggs, Dairy | Seafood | Whole Grains | ||||
|---|---|---|---|---|---|---|---|
| Sweet potatoes, 200 g | Cabbage, 250 g | Potatoes, 200 g | Tomato, 250 g | Cauliflower, 300 g | Chicken, 500 g | Fish, 500 g | Tofu, 200 g |
| Green peppers, 200 g | Vermicelli, 150 g | Water spinach, 250 g | Eggplant, 300 g | Oranges, 250 g | Pork, 300 g | Shrimp, 300 g | Rice, 200 g |
| Caster sugar, 50 g | Cantaloupe, 250 g | Peaches, 250 g | Pears, 250 g | Cherries, 250 g | Eggs, 150 g | - | Peanuts, 100 g |
| Kiwi, 250 g | Mango, 250 g | Strawberries, 250 g | Banana, 250 g | Apple, 250 g | Cream, 100 g | - | Corn, 200 g |
| - | - | - | - | - | Milk, 100 g | - | Wheat flour, 150 g |
Nutritional composition of main ingredients of green pepper shredded pork.
| Name | Weight (g) | Carbohydrates (g) | Protein (g) | Fat (g) | Dietary Fiber (g) | Cholesterol (mcg) | Energy (kJ) |
|---|---|---|---|---|---|---|---|
| Green pepper | 200 | 11.6 | 2.8 | 0.6 | 4.2 | 0 | 266 |
| Pork | 300 | 7.2 | 39.6 | 111.0 | 0 | 240 | 4902 |
| Total | 500 | 18.8 | 42.4 | 111.6 | 4.2 | 240 | 5168 |
| Carotene (mg) | Vitamin A (mcg) | Vitamin E (mg) | Vitamin C (mg) | Vitamin B1 (mg) | Vitamin B2 (mg) | Vitamin B3 (mg) | Vitamin B6 (mg) |
| 680.0 | 114 | 1.76 | 124.0 | 0.06 | 0.08 | 1.00 | 4.60 |
| 0 | 54.0 | 0.60 | 3.7 | 0.66 | 0.48 | 10.50 | 1.35 |
| 680.0 | 168.0 | 2.36 | 127.7 | 0.72 | 0.56 | 11.50 | 5.95 |
| Vitamin B9 (mcg) | Vitamin B12 (mcg) | Choline (mg) | Biotin (mcg) | Calcium (mg) | Iron (mg) | Sodium (mg) | Magnesium (mg) |
| 87.60 | 0 | 0 | 0 | 30 | 1.4 | 4.4 | 30 |
| 2.67 | 1.08 | 0 | 0 | 18 | 4.8 | 178.2 | 48 |
| 90.27 | 1.08 | 0 | 0 | 48 | 6.2 | 182.6 | 78 |
| Phosphorus (mg) | Manganese (mg) | Copper (mg) | Potassium (mg) | Selenium (mcg) | Zinc (mg) | Fatty Acids (g) | |
| 66 | 0.28 | 0.22 | 418 | 1.20 | 0.44 | 0 | |
| 486 | 0.09 | 0.18 | 612 | 36.00 | 6.18 | 0 | |
| 552 | 0.37 | 0.40 | 1030 | 37.20 | 6.62 | 0 |
Taboo foods.
| Taboo Food | Group | Related Food | Related Dishes |
|---|---|---|---|
| Seafood | Seafood Allergy | Fish, Shrimp, Crab and Shellfish | Braised Prawns, Steamed Fish |
| Meat | Vegetarian | Pork, Beef, Mutton, Chicken, Duck, Fish, Shrimp, Crab Shells, Eggs, Milk | Green Pepper Shredded Pork, Barbecued Pork, Braised Pork, Corn Rib Soup, Tomato Scrambled Eggs, Steamed Egg Drop, Spicy Chicken, Braised Prawns, Steamed Fish |
| Pork | Hui People | Pork | Green Pepper Shredded Pork, Char Siew, Braised Pork, Corn Pork Rib Soup |
| Cold Food | Pregnant | Lotus Root, Kelp, Bean Sprouts, Water Spinach, Vermicelli, Duck Eggs, Duck Blood, Duck Meat, Crab, Snail, Soft-Shelled Turtle, Eel, Banana, Cantaloupe, Persimmon, Watermelon and Other Fruits | Garlic Water Spinach, Fried Dough Sticks, Hot and Sour Powder |
Figure 2Smart home experimental environment. (a) The built experimental environment. (b) Floor plan of experimental environment.
Figure 3Overall workflow of the autonomous perception system for dietary nutritional information in smart homes.
Recognition evaluation of food test set.
| Food Category |
|
|
|
|
|---|---|---|---|---|
| Candied Sweet Potatoes | 0.842 | 0.900 | 0.941 | 0.826 |
| Vinegar Cabbage | 0.835 | 0.838 | 0.889 | 0.816 |
| Char Siew | 0.764 | 0.688 | 0.811 | 0.695 |
| Fried Potato Slices | 0.923 | 0.988 | 0.990 | 0.91 |
| Scrambled Eggs with Tomatoes | 0.793 | 0.988 | 0.965 | 0.911 |
| Dry Pot Cauliflower | 0.967 | 0.724 | 0.924 | 0.832 |
| Braised Pork | 0.726 | 0.925 | 0.918 | 0.800 |
| Cola Chicken Wings | 0.695 | 0.799 | 0.794 | 0.676 |
| Spicy Chicken | 0.882 | 0.937 | 0.958 | 0.853 |
| Rice | 0.971 | 0.844 | 0.961 | 0.824 |
| Mapo Tofu | 0.840 | 0.975 | 0.986 | 0.940 |
| Green Pepper Shredded Pork | 0.794 | 0.913 | 0.926 | 0867 |
| Cookies | 0.917 | 0.850 | 0.933 | 0.786 |
| Hot And Sour Powder | 0.847 | 0.937 | 0.970 | 0.892 |
| Garlic Water Spinach | 0.900 | 0.895 | 0.958 | 0.909 |
| Garlic Roasted Eggplant | 0.857 | 0.759 | 0.894 | 0.789 |
| Small Steamed Bun | 0.891 | 0.814 | 0.896 | 0.734 |
| Fried Shrimps | 0.943 | 0.962 | 0.977 | 0.916 |
| Corn Rib Soup | 0.948 | 0.975 | 0.988 | 0.922 |
| Fritters | 0.824 | 0.886 | 0.881 | 0.751 |
| Fried Peanuts | 0.960 | 0.938 | 0.967 | 0.907 |
| Steamed Egg Drop | 0.735 | 0.963 | 0.950 | 0.860 |
| Steamed Fish | 0.927 | 0.945 | 0.974 | 0.783 |
| Milk | 0.884 | 0.728 | 0.833 | 0.603 |
| Cantaloupe | 0.988 | 0.988 | 0.993 | 0.993 |
| Peach | 0.904 | 0.988 | 0.990 | 0.966 |
| Pear | 0.992 | 0.988 | 0.992 | 0.957 |
| Cherry | 0.991 | 0.988 | 0.993 | 0.988 |
| Orange | 0.991 | 0.988 | 0.993 | 0.993 |
| Kiwi | 0.991 | 1 | 0.995 | 0.990 |
| Mango | 0.989 | 1 | 0.995 | 0.995 |
| Strawberry | 1 | 1 | 0.995 | 0.982 |
| Banana | 0.993 | 1 | 0.995 | 0.944 |
| Apple | 0.98 | 0.975 | 0.994 | 0.993 |
| Mean | 0.897 | 0.914 | 0.948 | 0.871 |
Top-1 and Top-5 accuracy rates of different image recognition algorithms on the test set.
| Algorithm | Test Set | |
|---|---|---|
| Top-1 Accuracy (%) | Top-5 Accuracy (%) | |
| Squeezenet | 62.36 | 90.26 |
| VGG16 | 78.45 | 95.67 |
| ResNet | 77.24 | 95.19 |
| DenseNet | 78.12 | 95.53 |
| This paper | 80.25 | 96.15 |
Test scenario settings.
| No. | Scenario Information |
|---|---|
| C1 | 1 person eats 1–3 foods |
| C2 | 2 people eat 2–4 foods |
| C3 | 3 people eat 3, 4, 6 foods |
| C4 | 4 people eat 4, 6, 8 foods |
| C5 | 5 people eat 6, 8, 9 foods |
Statistical results of the response time of the system for different test sets.
| Test Set | System Response Time in Different Scenarios (ms) | Mean | ||||
|---|---|---|---|---|---|---|
| C1 | C2 | C3 | C4 | C5 | ||
| a | 3.8 | - | - | - | - | 3.8 |
| b | 4.0 | 4.2 | - | - | - | 4.1 |
| c | 4.5 | 4.5 | 4.6 | - | - | 4.5 |
| d | - | 4.5 | 4.7 | 4.7 | - | 4.6 |
| e | - | - | 4.7 | 4.9 | 5.2 | 4.9 |
| f | - | - | - | 4.9 | 5.3 | 5.1 |
| g | - | - | - | - | 5.5 | 5.5 |
Statistical results of recognition speed of the system for different test sets.
| Test Set | Recognition Speed in Different Scenarios (fps) | Mean | ||||
|---|---|---|---|---|---|---|
| C1 | C2 | C3 | C4 | C5 | ||
| a | 26.3 | - | - | - | - | 26.3 |
| b | 25.0 | 23.8 | - | - | - | 24.4 |
| c | 22.2 | 22.2 | 21.7 | - | - | 22.0 |
| d | - | 22.2 | 21.3 | 21.3 | - | 21.6 |
| e | - | - | 21.3 | 20.4 | 19.2 | 20.3 |
| f | - | - | - | 20.4 | 18.9 | 19.7 |
| g | - | - | - | - | 18.2 | 18.2 |
Statistical results of nutritional composition perception accuracy for different test sets.
| Test Set | Nutritional Composition Perception Accuracy in Different Scenarios (%) | Mean | ||||
|---|---|---|---|---|---|---|
| C1 | C2 | C3 | C4 | C5 | ||
| a | 89.7 | - | - | - | - | 89.7 |
| b | 96.8 | 88.2 | - | - | - | 92.5 |
| c | 91.4 | 94.7 | 93.8 | - | - | 93.3 |
| d | - | 98.5 | 94.3 | 98.9 | - | 97.2 |
| e | - | - | 97.2 | 94.2 | 98.1 | 96.5 |
| f | - | - | - | 83.3 | 78.4 | 80.9 |
| g | - | - | - | - | 80.3 | 80.3 |
Figure 4Box plots of nutritional composition perception accuracy for test sets of different scenarios. (a) C1 scenario test set. (b) C2 scenario test set. (c) C3 scenario test set. (d) C4 scenario test set. (e) C5 scenario test set.
Figure 5System diet evaluation effect chart.