Cooking scene detection method, system, electronic device and storage medium
By training a cooking scene classification model and combining information on pot lids, tools, ingredients, and pots, the cooking scene category is identified to achieve oil fume concentration detection. This solves the objectivity and universality problems of oil fume concentration detection in existing technologies and improves the accuracy and consistency of detection.
Patent Information
- Application Number
- CN202110168940.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-07
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-02-07
AI Technical Summary
Existing oil fume concentration detection methods based on image processing lack objectivity and universality, and are unable to unify standards, resulting in inaccurate classification.
By collecting multiple original cooking images, marking the cooking scene categories, including pot lid information, cooking tool information, ingredient information and pot information, and training a cooking scene classification model, the model is used to identify the cooking scene categories to achieve accurate detection of oil fume concentration.
It achieves scientific, objective and universal oil fume concentration recognition based on cooking scene categories, avoids the difficulty in distinguishing oil fume concentration categories due to cooking image resolution and smear issues, and improves the accuracy and consistency of detection.
Smart Images

Figure CN112883859B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to a cooking scene detection method, system, electronic device and storage medium. Background Art
[0002] The kitchen is an essential scene for every family to cook every day. The effect of kitchen fume treatment directly affects the health and quality of life of family members. With the continuous updating and development of technology, the gear adjustment of the traditional range hood is no longer the only way to adjust the air volume. The visual-based fume concentration detection technology has gradually entered people's field of vision.
[0003] The existing oil fume concentration detection based on image processing usually uses the frame difference method to detect the difference between the foreground and the background to preliminarily detect the motion area in the current image, and then uses the variance-based smoothness strategy and the grayscale average to eliminate the motion interference area, and finally determines the threshold through the grayscale histogram to classify the oil fume concentration, thereby obtaining the oil fume concentration in the current image frame. This method divides the threshold into intervals based on prior knowledge when dividing the oil fume concentration, and there is no unified standard, which makes the classification not universal. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the defects of the existing technology in the oil smoke concentration based on image processing that lack objectivity and universality, and to provide a cooking scene detection method, system, electronic device and storage medium.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] A training method for a cooking scene classification model, comprising:
[0007] Collecting a plurality of original cooking images, wherein the original cooking images are marked with cooking scene categories, the cooking scene categories correspond to multi-dimensional scene information, and the multi-dimensional scene information includes at least one of pot cover information, cooking tool information, food information, and pot information in addition to oil fume concentration category information;
[0008] The cooking scene classification model is trained using the collected multiple original cooking images. The cooking scene classification model takes the original cooking images as input and takes the cooking scene categories corresponding to the input original cooking images as output.
[0009] Preferably, the oil fume concentration category information is obtained by the following steps:
[0010] While collecting the original cooking image, the original oil fume concentrations of a plurality of oil fume concentration collection points distributed in a regular polygon above the cookware are respectively collected;
[0011] Calculate the average value of multiple collected original oil fume concentrations to obtain an average oil fume concentration;
[0012] The oil fume concentration category information is determined according to the average oil fume concentration.
[0013] A cooking scene detection method, comprising:
[0014] Collect current cooking images;
[0015] The current cooking image is input into a trained cooking scene classification model, and the current cooking scene category is output, wherein the cooking scene classification model is trained using any of the above-mentioned cooking scene classification model training methods.
[0016] Preferably, after the step of outputting the current cooking scene category, the method further includes:
[0017] Controlling the operating gear of the range hood according to the oil smoke concentration category information corresponding to the current cooking scene category;
[0018] or,
[0019] After the step of outputting the current cooking scene category, the method further includes:
[0020] Determine the current oil fume concentration value according to a preset mapping relationship and the current cooking scene category, wherein the preset mapping relationship is used to characterize the corresponding relationship between the cooking scene category and the oil fume concentration value;
[0021] The operating gear of the range hood is controlled according to the determined current oil fume concentration value.
[0022] A training system for a cooking scene classification model, comprising:
[0023] a first image acquisition module, configured to acquire a plurality of original cooking images, wherein the original cooking images are marked with cooking scene categories, the cooking scene categories correspond to multi-dimensional scene information, and the multi-dimensional scene information includes at least one of pot cover information, cooking tool information, food information, and pot information in addition to the oil smoke concentration category information;
[0024] The training module is used to train a cooking scene classification model using the collected multiple original cooking images, wherein the cooking scene classification model takes the original cooking images as input and takes the cooking scene categories corresponding to the input original cooking images as output.
[0025] Preferably, the training system further comprises:
[0026] A plurality of oil fume concentration collection modules are distributed in a regular polygon above the cookware, and are used to respectively collect the original oil fume concentration while the first image collection module collects the original cooking image;
[0027] A calculation module, used for calculating the average value of a plurality of collected original oil fume concentrations to obtain an average oil fume concentration;
[0028] The first determination module is used to determine the oil fume concentration category information according to the average oil fume concentration.
[0029] A cooking scene detection system, comprising:
[0030] A second image acquisition module, used for acquiring the current cooking image;
[0031] The classification module is used to input the current cooking image into a trained cooking scene classification model and output the current cooking scene category, wherein the cooking scene classification model is trained using any of the above-mentioned cooking scene classification model training methods.
[0032] Preferably, the detection system further comprises:
[0033] The first control module is used to control the operating gear of the range hood according to the oil fume concentration category information corresponding to the current cooking scene category;
[0034] or,
[0035] The detection system also includes:
[0036] A second determination module is used to determine the current oil fume concentration value according to a preset mapping relationship and the current cooking scene category, wherein the preset mapping relationship is used to characterize the corresponding relationship between the cooking scene category and the oil fume concentration value;
[0037] The second control module is used to control the operating gear of the range hood according to the determined current oil fume concentration value.
[0038] A range hood comprises a detection system for any of the above cooking scenarios.
[0039] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any one of the above-mentioned methods for training a cooking scene classification model, or implements any one of the above-mentioned methods for detecting a cooking scene.
[0040] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of any of the above-mentioned training methods for cooking scene classification models, or implements the steps of any of the above-mentioned detection methods for cooking scenes.
[0041] The positive progressive effect of the present invention is that the present invention can identify the cooking scene category corresponding to the cooking image based on the cooking scene classification model, wherein the cooking scene category corresponds to multi-dimensional scene information including oil fume concentration category information and pot cover information, cooking tool information, food information, pot information, etc., thereby, the cooking scene category can be identified based on image classification, and then the oil fume concentration category can be identified. Compared with directly identifying the oil fume concentration of the cooking image, the present invention is based on the recognition of the cooking scene category, which can avoid the situation where the oil fume concentration category is difficult to distinguish due to problems such as the resolution of the cooking image itself and ghosting, and is more scientific, objective and universal. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Flow chart of a method for training a cooking scene classification model according to Embodiment 1 of the present invention.
[0043] Figure 2 Schematic diagram of cooking scene classification in the training method of the cooking scene classification model according to Example 1 of the present invention.
[0044] Figure 3 The present invention is a flowchart of obtaining oil smoke concentration category information in the training method of the cooking scene classification model according to Example 1 of the present invention.
[0045] Figure 4 Schematic diagram of the distribution of oil smoke concentration collection points in the training method of the cooking scene classification model according to Example 1 of the present invention.
[0046] Figure 5 Flow chart of a method for detecting oil fume concentration according to Example 2 of the present invention.
[0047] Figure 6 Flow chart of a method for detecting oil fume concentration according to Example 3 of the present invention.
[0048] Figure 7 Schematic diagram of the modules of the training system of the cooking scene classification model according to Example 4 of the present invention.
[0049] Figure 8 Schematic diagram of the modules of the oil fume concentration detection system according to Example 5 of the present invention.
[0050] Fig. 9 Schematic diagram of the modules of the oil fume concentration detection system according to Example 6 of the present invention.
[0051] Fig.10 Schematic diagram of the structure of an electronic device according to Embodiment 8 of the present invention. DETAILED DESCRIPTION
[0052] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0053] Example 1
[0054] This embodiment provides a method for training a cooking scene classification model. Figure 1 , the training method of this embodiment includes:
[0055] S111, collecting multiple original cooking images;
[0056] S112: training a cooking scene classification model using the collected multiple original cooking images.
[0057] In this embodiment, firstly, the relevant scene images of the cooking area are collected, and then the relative positions of the two cooking areas are determined according to the relative positions of the oil fume identification area in the whole scene, so as to obtain the original cooking images of the cooking areas. In addition, in this embodiment, the cooking scene classification model takes the original cooking image as input and takes the cooking scene category corresponding to the input original cooking image as output. The original cooking image is marked with a cooking scene category, and the cooking scene category corresponds to multi-dimensional scene information. The multi-dimensional scene information includes at least one of pot cover information, cooking tool information, food information, and pot information in addition to the oil fume concentration category information.
[0058] Specifically, the fume concentration category corresponding to the fume concentration category information can be divided in combination with the range hood gear. For example, when the common range hood gears include three gears: smokeless, small, medium, and large, the fume concentration category can be divided into three categories: smokeless, small, medium, and large. Pot cover information can include whether there is a pot cover, the material of the pot cover, etc., cooking tool information can include whether there is a cooking tool, the category of cooking tools, etc. (wherein the category of cooking tools can include, for example, a spatula, a soup spoon, etc.), ingredient information can include whether there is an ingredient, the amount of ingredients, etc., and pot information can include the category of pot, the material of pot, etc. (wherein the category of pot can include, for example, an iron pot, a casserole, etc.).
[0059] It should be understood that there is a potential connection between pot cover information, cooking tool information, ingredient information, pot information, etc. and oil fume concentration category information or oil fume concentration numerical value. For example, under the same cooking conditions, the oil fume concentration generated when the pot is covered with a pot cover is often less than the oil fume concentration generated when the pot is not covered with a pot cover. For another example, under the same cooking conditions, the oil fume concentration generated when stir-frying with a spatula is often greater than the oil fume concentration generated when stir-frying without a spatula. In this way, the classification of cooking scene categories can be closer to life scenes, and the recognition accuracy of cooking scene categories can be higher, thereby making the recognition accuracy of oil fume concentration categories higher.
[0060] Figure 2A method of dividing the cooking scene categories in this embodiment is shown, which divides the cooking scene categories into 19 categories in a tree structure. Specifically, different nodes are used as classification basis. For example, the root node represents the potential scene information in the collected cooking image, and the leaf node represents the overall oil smoke situation of the single-frame cooking image, which is represented by the presence or absence. For the situation where there are ingredients in the pot, the oil smoke concentration category information in the cooking image is directly given. And each category corresponds to a specific multi-dimensional scene information. For example, the multi-dimensional scene information corresponding to the cooking scene category numbered 01 includes multiple scene information such as pot cover, transparent pot cover, content, smoke, small and medium smoke, etc. For another example, the multi-dimensional scene information corresponding to the cooking scene category numbered 09 includes pot cover, no content, oil smoke, 80% probability of small and medium smoke, and 20% probability of large smoke. Therefore, the division of the cooking scene categories in this embodiment can not only use the multi-dimensional scene information to describe the information contained in the cooking image in detail, but also facilitate the accurate distinction of the cooking image.
[0061] Further, Figure 2 It also shows that in the current cooking process, the pot cover information, cooking tool information, ingredient information, etc. are often correlated with the oil fume concentration category or the oil fume concentration value. For example, when there is a spatula in the cooking image and there are ingredients in the pot, if the cooking image captured in the current frame has blurred shadows, it can generally be considered that the captured cooking image is a stir-fry image. At this time, the oil fume concentration is often high, which is consistent with the oil fume situation in basic real scenarios.
[0062] Reference Figure 3 In this embodiment, the oil fume concentration category information can be obtained by the following steps:
[0063] S121, while collecting the original cooking image, respectively collecting the original oil fume concentrations at a plurality of oil fume concentration collection points distributed in a regular polygon above the cookware;
[0064] S122, calculating the average value of the collected multiple original oil fume concentrations to obtain an average oil fume concentration;
[0065] S123. Determine oil fume concentration category information according to the average oil fume concentration.
[0066] Reference Figure 4In this embodiment, three oil fume concentration collection modules placed 10-15 cm above the cookware area in an equilateral triangle can be used as oil fume concentration collection points to collect the original oil fume concentration, ensuring that the oil fume concentration collection module can achieve the purpose of real-time detection of the current oil fume concentration as much as possible under an acceptable high temperature environment. In addition, since the real-time concentration of each point in the rising process of the oil fume itself will have certain differences, the average of the oil fume concentration obtained at the three collection points is used as the actual oil fume concentration value at the current moment to improve the accuracy of oil fume concentration detection and avoid the occurrence of oil fume concentration detection hysteresis. Further, in this embodiment, the oil fume concentration collection module preferably uses a PM2.5 sensor to overcome the defects of inaccurate detection, interference from unexpected obstacles, and inability to detect in real time in the traditional infrared reflection method and physical particle detection, but this embodiment is not limited to this.
[0067] This embodiment is based on the cooking scene classification model and can identify the cooking scene category corresponding to the cooking image, wherein the cooking scene category corresponds to multi-dimensional scene information including oil fume concentration category information and pot cover information, cooking tool information, food information, pot information, etc., thereby realizing the recognition of the cooking scene category based on image classification, and then realizing the recognition of the oil fume concentration category. Compared with directly identifying the oil fume concentration of the cooking image, this embodiment is based on the recognition of the cooking scene category and can avoid the situation where the oil fume concentration category is difficult to distinguish due to problems such as the resolution and ghosting of the cooking image itself, and is more scientific, objective and universal.
[0068] Example 2
[0069] This embodiment provides a cooking scene detection method, referring to Figure 5 , the detection method of this embodiment includes:
[0070] S21, collecting current cooking images;
[0071] S22: Input the current cooking image into the trained cooking scene classification model, and output the current cooking scene category.
[0072] In this embodiment, the cooking scene classification model is trained using the training method of the cooking scene classification model provided in Example 1, so that the current cooking scene category of the output current cooking image corresponds to multi-dimensional scene information including oil fume concentration category information. Therefore, the oil fume concentration category information corresponding to the current cooking image can be determined based on the identification of the cooking scene category to which the current cooking image belongs.
[0073] Reference Figure 5 , this embodiment further includes after step S22:
[0074] S23, controlling the operating gear of the range hood according to the oil fume concentration category information corresponding to the current cooking scene category.
[0075] In this embodiment, the current cooking scene category is recognized based on the current cooking image, and then the current oil fume concentration category information is recognized. Based on the recognized current oil fume concentration category information, the range hood operating position is controlled. For example, when the current oil fume concentration category information is small or medium smoke, the range hood is controlled to operate in the small or medium smoke position.
[0076] Based on Example 1, this embodiment not only realizes the scientific, objective and accurate detection of the cooking scene, but also realizes the automatic control of the operating gear of the range hood, which reduces the burden on the user and is conducive to improving the user experience.
[0077] Example 3
[0078] This embodiment provides a cooking scene detection method, referring to Figure 6 , the detection method of this embodiment includes:
[0079] S31, collecting current cooking images;
[0080] S32: Input the current cooking image into a trained cooking scene classification model, and output the current cooking scene category.
[0081] In this embodiment, the cooking scene classification model is trained using the training method of the cooking scene classification model provided in Example 1, so that the current cooking scene category of the output current cooking image corresponds to multi-dimensional scene information including oil fume concentration category information. Therefore, the oil fume concentration category information corresponding to the current cooking image can be determined based on the identification of the cooking scene category to which the current cooking image belongs.
[0082] Reference Figure 6 , this embodiment further includes after step S32:
[0083] S33, determining the current oil smoke concentration value according to the preset mapping relationship and the current cooking scene category;
[0084] S34, controlling the operating gear of the range hood according to the determined current oil fume concentration value.
[0085] Specifically, the preset mapping relationship is used to characterize the correspondence between the cooking scene category and the oil fume concentration value, so as to realize the quantification of the oil fume concentration in the cooking scene category, and then realize the gear control of the range hood based on the oil fume concentration value, so as to avoid the mismatch between the division of the oil fume concentration category information corresponding to the cooking scene classification model and the operating gear of the range hood. For example, when the oil fume concentration category information corresponds to four oil fume concentration categories and the operating gear of the range hood only corresponds to three gears, the operating gear of the range hood can be determined based on the oil fume concentration value.
[0086] Based on Example 1, this embodiment not only realizes the scientific, objective and accurate detection of the cooking scene, but also realizes the automatic control of the operating gear of the range hood, which reduces the burden on the user and is conducive to improving the user experience.
[0087] Example 4
[0088] This embodiment provides a training system for a cooking scene classification model. Figure 7 , the training system of this embodiment includes:
[0089] A first image acquisition module 411, used for acquiring a plurality of original cooking images;
[0090] The training module 412 is used to train the cooking scene classification model using the collected multiple original cooking images.
[0091] In this embodiment, firstly, the relevant scene images of the cooking area are collected, and then the relative positions of the two cooking areas are determined according to the relative positions of the oil fume identification area in the whole scene, so as to obtain the original cooking images of the cooking areas. In addition, in this embodiment, the cooking scene classification model takes the original cooking image as input and takes the cooking scene category corresponding to the input original cooking image as output, the original cooking image is marked with the cooking scene category, and the cooking scene category corresponds to the multi-dimensional scene information. The multi-dimensional scene information includes at least one of pot cover information, cooking tool information, food information, and pot information in addition to the oil fume concentration category information.
[0092] Specifically, the fume concentration category corresponding to the fume concentration category information can be divided in combination with the range hood gear. For example, when the common range hood gears include three gears: smokeless, small, medium, and large, the fume concentration category can be divided into three categories: smokeless, small, medium, and large. Pot cover information can include whether there is a pot cover, the material of the pot cover, etc., cooking tool information can include whether there is a cooking tool, the category of cooking tools, etc. (wherein the category of cooking tools can include, for example, a spatula, a soup spoon, etc.), ingredient information can include whether there is an ingredient, the amount of ingredients, etc., and pot information can include the category of pot, the material of pot, etc. (wherein the category of pot can include, for example, an iron pot, a casserole, etc.).
[0093] It should be understood that there is a potential connection between pot cover information, cooking tool information, ingredient information, pot information, etc. and oil fume concentration category information or oil fume concentration numerical value. For example, under the same cooking conditions, the oil fume concentration generated when the pot is covered with a pot cover is often less than the oil fume concentration generated when the pot is not covered with a pot cover. For another example, under the same cooking conditions, the oil fume concentration generated when stir-frying with a spatula is often greater than the oil fume concentration generated when stir-frying without a spatula. In this way, the classification of cooking scene categories can be closer to life scenes, and the recognition accuracy of cooking scene categories can be higher, thereby making the recognition accuracy of oil fume concentration categories higher.
[0094] Figure 2 A method of dividing the cooking scene categories in this embodiment is shown, which divides the cooking scene categories into 19 categories in a tree structure. Specifically, different nodes are used as classification basis. For example, the root node represents the potential scene information in the collected cooking image, and the leaf node represents the overall oil smoke situation of the single-frame cooking image, which is represented by the presence or absence. For the situation where there are ingredients in the pot, the oil smoke concentration category information in the cooking image is directly given. And each category corresponds to a specific multi-dimensional scene information. For example, the multi-dimensional scene information corresponding to the cooking scene category numbered 01 includes multiple scene information such as pot cover, transparent pot cover, content, smoke, small and medium smoke, etc. For another example, the multi-dimensional scene information corresponding to the cooking scene category numbered 09 includes pot cover, no content, oil smoke, 80% probability of small and medium smoke, and 20% probability of large smoke. Therefore, the division of the cooking scene categories in this embodiment can not only use the multi-dimensional scene information to describe the information contained in the cooking image in detail, but also facilitate the accurate distinction of the cooking image.
[0095] Further, Figure 2 It also shows that in the current cooking process, the pot cover information, cooking tool information, ingredient information, etc. are often correlated with the oil fume concentration category or the oil fume concentration value. For example, when there is a spatula in the cooking image and there are ingredients in the pot, if the cooking image captured in the current frame has blurred shadows, it can generally be considered that the captured cooking image is a stir-fry image. At this time, the oil fume concentration is often high, which is consistent with the oil fume situation in basic real scenarios.
[0096] Reference Figure 7 In this embodiment, the training system may further include:
[0097] Multiple oil fume concentration collection modules 421 are used to collect the original oil fume concentrations at multiple oil fume concentration collection points distributed in a regular polygon above the cookware while collecting the original cooking image;
[0098] The calculation module 422 is used to calculate the average value of the collected multiple original oil fume concentrations to obtain the average oil fume concentration;
[0099] The first determination module 423 is used to determine the oil fume concentration category information according to the average oil fume concentration.
[0100] Reference Figure 4 In this embodiment, three oil fume concentration collection modules placed 10-15 cm above the cookware area in an equilateral triangle can be used as oil fume concentration collection points to collect the original oil fume concentration, ensuring that the oil fume concentration collection module can achieve the purpose of real-time detection of the current oil fume concentration as much as possible under an acceptable high temperature environment. In addition, since the real-time concentration of each point in the rising process of the oil fume itself will have certain differences, the average of the oil fume concentration obtained at the three collection points is used as the actual oil fume concentration value at the current moment to improve the accuracy of oil fume concentration detection and avoid the occurrence of oil fume concentration detection hysteresis. Further, in this embodiment, the oil fume concentration collection module preferably uses a PM2.5 sensor to overcome the defects of inaccurate detection, interference from unexpected obstacles, and inability to detect in real time in the traditional infrared reflection method and physical particle detection, but this embodiment is not limited to this.
[0101] This embodiment is based on the cooking scene classification model and can identify the cooking scene category corresponding to the cooking image, wherein the cooking scene category corresponds to multi-dimensional scene information including oil fume concentration category information and pot cover information, cooking tool information, food information, pot information, etc., thereby realizing the recognition of the cooking scene category based on image classification, and then realizing the recognition of the oil fume concentration category. Compared with directly identifying the oil fume concentration of the cooking image, this embodiment is based on the recognition of the cooking scene category and can avoid the situation where the oil fume concentration category is difficult to distinguish due to problems such as the resolution and ghosting of the cooking image itself, and is more scientific, objective and universal.
[0102] Example 5
[0103] This embodiment provides a cooking scene detection system, referring to Figure 8 , the detection system of this embodiment includes:
[0104] The second image acquisition module 51 is used to acquire the current cooking image;
[0105] The classification module 52 is used to input the current cooking image into the trained cooking scene classification model and output the current cooking scene category.
[0106] In this embodiment, the cooking scene classification model is trained using the training system of the cooking scene classification model provided in Example 3, so that the current cooking scene category of the output current cooking image corresponds to the multi-dimensional scene information including the oil fume concentration category information. Therefore, the oil fume concentration category information corresponding to the current cooking image can be determined based on the identification of the cooking scene category to which the current cooking image belongs.
[0107] Reference Figure 8 , the detection system of this embodiment also includes:
[0108] The first control module 53 is used to control the operating gear of the range hood according to the oil fume concentration category information corresponding to the current cooking scene category.
[0109] In this embodiment, the current cooking scene category is recognized based on the current cooking image, and then the current oil fume concentration category information is recognized. Based on the recognized current oil fume concentration category information, the range hood operating position is controlled. For example, when the current oil fume concentration category information is small or medium smoke, the range hood is controlled to operate in the small or medium smoke position.
[0110] Based on Example 4, this embodiment not only realizes the scientific, objective and accurate detection of the cooking scene, but also realizes the automatic control of the operating position of the range hood, which reduces the burden on the user and is conducive to improving the user experience.
[0111] Example 6
[0112] This embodiment provides a cooking scene detection system, referring to Fig. 9 , the detection system of this embodiment includes:
[0113] The second image acquisition module 61 is used to acquire the current cooking image;
[0114] The classification module 62 is used to input the current cooking image into the trained cooking scene classification model and output the current cooking scene category.
[0115] In this embodiment, the cooking scene classification model is trained using the training system of the cooking scene classification model provided in Example 3, so that the current cooking scene category of the output current cooking image corresponds to the multi-dimensional scene information including the oil fume concentration category information. Therefore, the oil fume concentration category information corresponding to the current cooking image can be determined based on the identification of the cooking scene category to which the current cooking image belongs.
[0116] Reference Fig. 9 , the detection system of this embodiment also includes:
[0117] A second determination module 63, configured to determine a current oil smoke concentration value according to a preset mapping relationship and a current cooking scene category;
[0118] The second control module 64 is used to control the operating gear of the range hood according to the determined current oil fume concentration value.
[0119] Specifically, the preset mapping relationship is used to characterize the correspondence between the cooking scene category and the oil fume concentration value, so as to realize the quantification of the oil fume concentration in the cooking scene category, and then realize the gear control of the range hood based on the oil fume concentration value, so as to avoid the mismatch between the division of the oil fume concentration category information corresponding to the cooking scene classification model and the operating gear of the range hood. For example, when the oil fume concentration category information corresponds to four oil fume concentration categories and the operating gear of the range hood only corresponds to three gears, the operating gear of the range hood can be determined based on the oil fume concentration value.
[0120] Based on Example 4, this embodiment not only realizes the scientific, objective and accurate detection of the cooking scene, but also realizes the automatic control of the operating position of the range hood, which reduces the burden on the user and is conducive to improving the user experience.
[0121] Example 7
[0122] The present embodiment provides a range hood, including the cooking scene detection system provided in Embodiment 4 or 5. Based on Embodiment 4 or 5, the present embodiment not only realizes the scientific, objective and accurate detection of the cooking scene, but also realizes the automatic control of the operating gear of the range hood, thereby reducing the burden on the user and improving the user experience.
[0123] Example 8
[0124] The present embodiment provides an electronic device, which can be expressed in the form of a computing device (for example, a server device), including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it can implement the training method of the cooking scene classification model provided in Embodiment 1, or the detection method of the cooking scene provided in Embodiment 2 or 3.
[0125] Fig.10 FIG. 4 shows a schematic diagram of the hardware structure of this embodiment. Fig.10 As shown, the electronic device 9 specifically includes:
[0126] At least one processor 91, at least one memory 92, and a bus 93 for connecting different system components (including the processor 91 and the memory 92), wherein:
[0127] The bus 93 includes a data bus, an address bus, and a control bus.
[0128] The memory 92 includes a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .
[0129] Memory 92 also includes a program / utility 925 having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0130] The processor 91 executes various functional applications and data processing by running the computer program stored in the memory 92, such as the training method of the cooking scene classification model provided in Example 1 of the present invention, or the cooking scene detection method provided in Example 2 or 3.
[0131] The electronic device 9 can further communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication can be performed through an input / output (I / O) interface 95. In addition, the electronic device 9 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 96. The network adapter 96 communicates with other modules of the electronic device 9 through a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 9, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0132] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0133] Example 9
[0134] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program implements the steps of the training method for the cooking scene classification model provided in Embodiment 1, or the steps of the cooking scene detection method provided in Embodiment 2 or 3.
[0135] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0136] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the training method for implementing the cooking scene classification model described in Example 1, or the steps of the cooking scene detection method provided in Example 2 or 3.
[0137] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0138] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A method for training a cooking scene classification model, characterized in that: include: Collecting a plurality of original cooking images, wherein the original cooking images are marked with cooking scene categories, the cooking scene categories correspond to multi-dimensional scene information, and the multi-dimensional scene information includes at least one of pot cover information, cooking tool information, food information, and pot information in addition to oil fume concentration category information; Using the collected multiple original cooking images to train a cooking scene classification model, the cooking scene classification model takes the original cooking images as input and takes the cooking scene categories corresponding to the input original cooking images as output; The oil fume concentration category information is obtained by the following steps: While collecting the original cooking image, the original oil fume concentrations of a plurality of oil fume concentration collection points distributed in a regular polygon above the cookware are respectively collected; Calculate the average value of multiple collected original oil fume concentrations to obtain an average oil fume concentration; The oil fume concentration category information is determined according to the average oil fume concentration.
2. A cooking scene detection method, characterized in that: include: Collect current cooking images; Inputting the current cooking image into a trained cooking scene classification model, and outputting the current cooking scene category, wherein the cooking scene classification model is trained using the training method for the cooking scene classification model according to claim 1; After the step of outputting the current cooking scene category, the method further includes: Controlling the operating gear of the range hood according to the oil smoke concentration category information corresponding to the current cooking scene category; or, After the step of outputting the current cooking scene category, the method further includes: Determine the current oil fume concentration value according to a preset mapping relationship and the current cooking scene category, wherein the preset mapping relationship is used to characterize the corresponding relationship between the cooking scene category and the oil fume concentration value; The operating gear of the range hood is controlled according to the determined current oil fume concentration value.
3. A training system for a cooking scene classification model, characterized in that: include: a first image acquisition module, configured to acquire a plurality of original cooking images, wherein the original cooking images are marked with cooking scene categories, the cooking scene categories correspond to multi-dimensional scene information, and the multi-dimensional scene information includes at least one of pot cover information, cooking tool information, food information, and pot information in addition to the oil smoke concentration category information; A training module, used to train a cooking scene classification model using the collected multiple original cooking images, wherein the cooking scene classification model takes the original cooking images as input and takes the cooking scene categories corresponding to the input original cooking images as output; The training system also includes: A plurality of oil fume concentration collection modules are distributed in a regular polygon above the cookware, and are used to respectively collect the original oil fume concentration while the first image collection module collects the original cooking image; A calculation module, used for calculating the average value of a plurality of collected original oil fume concentrations to obtain an average oil fume concentration; The first determination module is used to determine the oil fume concentration category information according to the average oil fume concentration.
4. A cooking scene detection system, characterized in that: include: A second image acquisition module, used for acquiring the current cooking image; a classification module, configured to input the current cooking image into a trained cooking scene classification model and output the current cooking scene category, wherein the cooking scene classification model is trained using the training method for the cooking scene classification model according to claim 3; The detection system also includes: The first control module is used to control the operating gear of the range hood according to the oil fume concentration category information corresponding to the current cooking scene category; or, The detection system also includes: A second determination module is used to determine the current oil fume concentration value according to a preset mapping relationship and the current cooking scene category, wherein the preset mapping relationship is used to characterize the corresponding relationship between the cooking scene category and the oil fume concentration value; The second control module is used to control the operating gear of the range hood according to the determined current oil fume concentration value.
5. A range hood, characterized in that: A cooking scene detection system comprising the cooking scene as claimed in claim 4.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the training method of the cooking scene classification model as claimed in claim 1, or implements the detection method of the cooking scene as claimed in claim 2.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for training a cooking scene classification model as claimed in claim 1 are implemented, or the steps of the method for detecting a cooking scene as claimed in claim 2 are implemented.
Citation Information
Patent Citations
Method and system for correcting smoke identification effect of range hood and range hood
CN110296448A
Multi-sensor fused range hood rotation speed control method and range hood
CN110469883A