Dinner plate identification method, device and equipment, storage medium and computer program product

By generating and using rich difficult sample data, training the meal plate recognition model has solved the problem of low difficulty sample data in the prior art, resulting in low accuracy of meal plate recognition, and achieving higher recognition accuracy.

CN119625456APending Publication Date: 2025-03-14CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411656366.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing meal plate recognition model has little difficulty in identifying meal plates, resulting in low recognition accuracy when actually identifying meal plates.

Method used

By obtaining meal plate pictures and food pictures in different stacking and/or hand occlusion states, sample pictures of different foods placed on meal plates in different states, and training meal plate recognition models through these sample pictures.

Benefits of technology

Through rich difficult sample data, the meal plate recognition model can learn more different features and more in line with the actual situation, thereby improving the accuracy of meal plate recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625456A_ABST
    Figure CN119625456A_ABST
Patent Text Reader

Abstract

The invention discloses a dinner plate recognition method and device, equipment, a storage medium and a computer program product, and relates to the technical field of computer technologies, and the method comprises the steps: obtaining a dinner plate picture and a food picture, and the dinner plate picture comprises dinner plates in different stacked and / or hand shielding states; according to the dinner plate pictures and the food pictures, generating sample pictures of different foods placed in the dinner plates in different states; and training the sample pictures to obtain a dinner plate recognition model, and performing dinner plate recognition by using the dinner plate recognition model. The identification accuracy of the dinner plate identification model is improved by generating the difficult sample data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a plate recognition method, a plate recognition device, a plate recognition equipment, a storage medium and a computer program product. Background Art

[0002] When training the existing plate recognition model, the sample data used for model training lacks difficult sample data, where difficult samples include but are not limited to plate stacking samples and hand occlusion samples. As a result, the trained plate recognition model has the problem of low recognition accuracy when actually recognizing plates.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present application is to provide a plate recognition method, a plate recognition device, a plate recognition equipment, a storage medium and a computer program product, aiming to solve the technical problem of low recognition accuracy of the plate recognition model due to the lack of difficult sample data.

[0005] To achieve the above objectives, the present application proposes a plate recognition method, the method comprising:

[0006] Acquire a dinner plate image and a food image, wherein the dinner plate image includes dinner plates in different stacking and / or hand-blocking states;

[0007] Generate sample pictures of different foods placed on plates in different states according to the plate picture and the food picture;

[0008] A plate recognition model is obtained through training with the sample images, and the plate recognition model is used to perform plate recognition.

[0009] In one embodiment, before the step of using the plate picture and the food picture, the method further includes:

[0010] Get a tray image with the meal tray placed on it;

[0011] Segmenting the dinner plate and the tray in the tray image to obtain an original dinner plate image and an empty tray image after the dinner plate is extracted;

[0012] A sample image of a pallet is synthesized from the empty pallet image;

[0013] The sample picture of the dinner plate and / or the original dinner plate picture are combined with the sample picture of the tray to obtain a new dinner plate picture.

[0014] In one embodiment, the step of synthesizing the sample image of the tray from the empty tray image comprises:

[0015] Selecting an initial pallet image from among the empty pallet images;

[0016] Based on each of the empty pallet images except the initial pallet image, the blank area of ​​the initial pallet image is filled to obtain a target pallet image as a sample image of the pallet, wherein the blank area is the area after the pallet is extracted.

[0017] In one embodiment, the step of combining the sample picture of the dinner plate and / or the original dinner plate picture with the sample picture of the tray comprises:

[0018] Arrange and combine the sample images of the dinner plates and / or the original dinner plate images to obtain a dinner plate combination;

[0019] The sample pictures of the dinner plates in the dinner plate combination and / or the original dinner plate pictures are randomly placed in the tray in the sample picture of the tray.

[0020] In one embodiment, after the step of generating sample pictures of different foods placed on plates in different states according to the plate picture and the food picture, the following steps are included:

[0021] Get the hand image;

[0022] The hand image and the sample image are combined to obtain a new sample image, wherein the new sample image includes dinner plate images with and without hand occlusion.

[0023] In one embodiment, the step of using the plate recognition model to perform plate recognition includes:

[0024] Collect pictures of actual plates during meals;

[0025] Recognize the actual plate image using a plate recognition model to obtain a valid area of ​​the plate;

[0026] The number of each type of dinner plates is calculated based on the total area of ​​the effective area.

[0027] In addition, to achieve the above-mentioned purpose, the present application also proposes a dinner plate recognition device, the dinner plate recognition device comprising: an acquisition module, used to acquire dinner plate pictures and food pictures, wherein the dinner plate pictures include dinner plates in different stacking and / or hand-blocking states;

[0028] A generating module, used for generating sample pictures of different foods placed on plates in different states according to the plate picture and the food picture;

[0029] The training module is used to obtain a plate recognition model through the sample image training, and use the plate recognition model to perform plate recognition.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a plate recognition device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the plate recognition method described above.

[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the plate identification method described above are implemented.

[0032] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the plate recognition method described above are implemented.

[0033] Compared with the existing plate recognition model, the plate recognition model has a problem of low recognition accuracy when actually recognizing plates due to the small amount of difficult sample data; the present application first obtains plate images and food images in different stacking and / or hand occlusion states, and trains the plate recognition model through sample images generated by food images and plate images in different states; based on rich and comprehensive difficult sample data, the plate recognition model can learn more different features during the training process, which is more in line with the actual situation, and effectively solves the problem of low recognition accuracy of the existing plate recognition model due to the small amount of difficult sample data. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

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

[0036] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the plate recognition method of the present application;

[0037] Figure 2 A schematic diagram of a sample image provided for the first embodiment of the plate recognition method of the present application;

[0038] Figure 3 A schematic diagram of a process provided for the second embodiment of the plate recognition method of the present application;

[0039] Figure 4 A schematic diagram of a tray image provided for the second embodiment of the dinner plate recognition method of the present application;

[0040] Figure 5 A schematic diagram of an original dinner plate picture provided for the second embodiment of the dinner plate recognition method of the present application;

[0041] Figure 6 A schematic diagram of an empty tray provided for the second embodiment of the plate identification method of the present application;

[0042] Figure 7 A schematic diagram of a tray synthesis process provided in the second embodiment of the dinner plate recognition method of the present application;

[0043] Figure 8 A schematic diagram of a dinner plate assembly provided in accordance with a second embodiment of the dinner plate identification method of the present application;

[0044] Fig. 9 A schematic diagram of a flow chart of arranging and combining dinner plates provided in the second embodiment of the dinner plate recognition method of the present application;

[0045] Fig.10 A schematic diagram of a dinner plate recognition method provided in accordance with a third embodiment of the present application;

[0046] Fig.11 This is a schematic diagram of the module structure of the plate recognition device of this application;

[0047] Fig.12 This is a schematic diagram of the device structure of the hardware operating environment involved in the plate recognition method of this application.

[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0051] It should be noted that the execution subject of this embodiment may be a plate recognition device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a processor, etc. capable of realizing the above functions. The following takes the plate recognition device as an example to illustrate this embodiment and the following embodiments.

[0052] Based on this, the present application embodiment provides a method for plate recognition, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the plate recognition method of the present application.

[0053] In this embodiment, the plate recognition method includes steps S10 to S30:

[0054] Step S10, obtaining a dinner plate picture and a food picture, wherein the dinner plate picture includes dinner plates in different stacking and / or hand-blocking states;

[0055] It should be noted that the method of obtaining plate images and food images can be to obtain them from public data sets, public channels, or to directly obtain them by shooting with terminal devices such as mobile phones, handheld cameras, etc., and the specific acquisition method is not limited; among them, the obtained plate images include single non-stacked plates, plates of different shapes, plates of different colors, stacked plates, plates with hand occlusion, plates without hand occlusion, etc., and the above-listed parts can be randomly combined to obtain a variety of plate images; food images include various different dishes, or similar dishes, and the above-mentioned specific plate images and food images obtained are not limited.

[0056] Step S20, generating sample pictures of different foods placed on plates in different states according to the plate picture and the food picture;

[0057] It should be noted that, because the dinner plate images include dinner plates in various states and the food includes various dishes, the dinner plates in various states and the various dishes can be combined to generate many sample images of different foods placed on dinner plates in different states.

[0058] In one embodiment, the method for generating sample images of different foods placed on plates in different states is to superimpose mask areas of the plate image and the food image, and generate dishes for each plate.

[0059] In one embodiment, after step S20, steps A10 to A20 are included:

[0060] Step A10, obtaining a hand image;

[0061] It should be noted that many hand images can be obtained from public data sets and public channels, or directly taken using terminal devices such as mobile phones and handheld cameras. Hand images include palm images and arm images, and the specific acquisition method is not limited.

[0062] Step A20, combining the hand image and the sample image to obtain a new sample image, wherein the new sample image includes the dinner plate images with and without hand occlusion.

[0063] It should be noted that the sample pictures are pictures of different foods placed on plates in different states. The sample pictures are combined with the acquired hand pictures to generate new sample pictures. The new sample pictures include pictures of food placed on plates in different states with hand occlusion and pictures of food placed on plates in different states without hand occlusion.

[0064] In this embodiment, by obtaining a hand image and combining it with a sample image, an image of a dinner plate with hand occlusion can be obtained, thereby enriching the diversity of the sample data, making the sample set closer to the actual application scenario, and helping to improve the effect of subsequent model training, so that the model can learn how to accurately identify the dinner plate when the hand is occluded, reducing recognition errors caused by the hand occluding the dinner plate.

[0065] Step S30, obtaining a plate recognition model through sample image training, and using the plate recognition model to perform plate recognition.

[0066] It should be noted that the sample images are used as sample data sets to train the plate recognition model, wherein the process of using the sample data sets to train the plate recognition model is not limited. The trained plate recognition model is used to perform plate recognition. Figure 2 , which are examples of stacked sample images and non-stacked sample images, wherein stacking indicates that there is occlusion between the dinner plates.

[0067] In this embodiment, first, images of plates and food in different stacking and / or hand occlusion states are obtained, and a plate recognition model is trained by using sample images generated from food images and images of plates in different states. Based on rich and comprehensive difficult sample data, the plate recognition model is able to learn more different features during the training process, which is more in line with the actual situation, and effectively solves the problem of low recognition accuracy of existing plate recognition models due to the lack of difficult sample data.

[0068] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can refer to the above introduction, and will not be repeated in the following. Figure 3 Before step S20, the plate recognition method further includes steps D10 to D40:

[0069] Step D10, obtaining a tray image of a meal plate placed on the tray;

[0070] It should be noted that the information can be obtained from public data sets and public channels, or by directly using terminal devices such as mobile phones and handheld cameras to take pictures of the food plates placed on the tray. The specific method of obtaining the information is not limited.

[0071] For example, Figure 4 Shown is one of the schematic diagrams of a tray image in which a dinner plate is placed on a tray, wherein the black portion is the tray and the green portion is the dinner plate.

[0072] Step D20, segmenting the dinner plate and the tray in the tray image to obtain the original dinner plate image and the empty tray image after the dinner plate is extracted;

[0073] It should be noted that the dinner plate and the tray are extracted from the tray image to obtain the original dinner plate image and the empty tray image after the dinner plate is extracted;

[0074] For example, Figure 5 As shown, the plate in the original plate picture is a single plate without any obstruction or stacking;

[0075] For example, Figure 6 As shown, the area shown at 200 is the blank area after the meal plate is extracted, and the area shown at 100 is the tray area.

[0076] Step D30, synthesizing a sample image of a pallet from the image of the empty pallet;

[0077] It should be noted that, since the dinner plate and the tray in the tray image are segmented, there is a gap in the tray, that is, a blank area after the dinner plate is extracted; a complete tray is synthesized using a tray synthesis algorithm to obtain a sample image of the tray.

[0078] Step D40, combining the sample picture of the dinner plate and / or the original dinner plate picture with the sample picture of the tray to obtain a new dinner plate picture.

[0079] It should be noted that the sample images of dinner plates and / or original dinner plate images are combined with the sample images of trays, that is, various dinner plates are placed on the tray image, for example, a red round dinner plate is placed on the tray, a red round, a green square, a yellow oval, three non-stacked dinner plates are placed on the tray, and five yellow round stacked dinner plates are placed on the tray, where stacking indicates that there is occlusion between the dinner plates.

[0080] In one embodiment, step D30, the plate recognition method includes steps E10 to E20:

[0081] Step E10, selecting an initial pallet image from each of the empty pallet images;

[0082] It should be noted that, through step D20, a plurality of empty pallet images are obtained, digital labels are affixed to the plurality of empty pallet images, and an empty pallet image is randomly selected as an initial pallet image with a label of 1.

[0083] Step E20, based on each empty pallet picture except the initial pallet picture, the blank area of ​​the initial pallet picture is filled to obtain a target pallet picture as a sample picture of the pallet, wherein the blank area is the area after the pallet is extracted.

[0084] It should be noted that the blank areas of the initial pallet image are filled with the empty pallet images (i.e., labeled 2, 3, 4, ...) except the initial pallet image, that is, the pixel values ​​of the blank areas of the initial pallet image are replaced with the pixel values ​​of the non-blank areas of other empty pallet images.

[0085] Exemplarily, the step E20 further includes:

[0086] In each of the empty pallet images except the initial pallet image, determining whether the blank area is a pallet area in each of the empty pallet images except the initial pallet image;

[0087] If the blank area is a pallet area, the pixel value of the blank area is replaced with the pixel value of the pallet area at the same position to obtain a new initial pallet image and a new blank area, and the process returns to the step of determining whether the blank area is a pallet area in each empty pallet image except the initial pallet image until all the blank areas are filled.

[0088] It should be noted that after the synthesis of the initial pallet image is completed, it is necessary to synthesize the empty pallet images other than the initial pallet image. First, the empty pallet images are traversed from the upper left corner. If a blank area is identified, the pixel value of the pallet area at the same position of the synthesized empty pallet image is replaced by the next empty pallet image until all blank areas are filled. The blank areas of all empty pallet images are filled using the above method of filling blank areas.

[0089] like Figure 7As shown, all empty tray images are digitally labeled. First, the empty tray images with label a=1 are synthesized, (a1, b1) is assigned to (0, 0), and the first pixel value under the coordinates (a1, b1) of the a-th image is read to determine whether the first pixel value is (255, 255, 255), where (255, 255, 255) is the pixel value of the blank area; if the first pixel value is (255, 255, 255), the second pixel value under the coordinates (a1, b1) of the a+1-th image is read to determine whether the second pixel value is (255, 255, 255); if the second pixel value is not (255, 255, 255), the second pixel value under the coordinates (a1, b1) of the a+1-th image is assigned to the first pixel value.

[0090] Determine whether coordinate a1 is the width of the a-th picture. If so, set b1=b1+1. If not, set a1=a1+1. Determine whether coordinate b1 is the length of the a-th picture. If so, read the pixel value at the coordinate (a1+1, b1+1) of the a-th picture as the first pixel value and execute the next step until all empty tray pictures are synthesized.

[0091] In this embodiment, the method of generating sample images of pallets by filling in the empty areas can reduce the need to collect a large number of actual pallet images to a certain extent. By using existing empty pallet images for processing, more samples can be obtained without additional shooting or collection. Only a small amount of labeled data is needed to generate a large amount of sample data for model training, reducing the cost and time of sample collection.

[0092] In another embodiment, step D40, the plate recognition method includes steps F10 to F20:

[0093] Step F10, arranging and combining the sample pictures of the dinner plates and / or the original dinner plate pictures to obtain a dinner plate combination;

[0094] It should be noted that the sample images of the plates and / or the original images of the plates are arranged and combined. For example, if the five plates are abc respectively, after arrangement and combination, [aab, ab, a, b, c, bc...] is obtained. The generated plate combination can be a single plate, multiple plates, stacked plates...

[0095] Step F20 , randomly placing the sample images of the plates in the plate combination and / or the original plate images in the tray in the sample images of the tray.

[0096] It should be noted that the arranged and combined single plate, multiple plates, stacked plates, etc. are randomly placed in the tray. Figure 8 As shown, Figure 8 It is one of the images obtained by randomly placing the sample images and / or original images of the plates in the plate combination on the tray.

[0097] like Fig. 9 As shown, it is a flow chart of the steps of arranging and combining plates in this embodiment. First, the plate images (sample images of plates, original plate images, sample images of plates and original plate images) are arranged and combined to obtain n arrangements and combinations, each of which has m plates. i (i=0,1,2,3...n) indicates the number of the arrangement and combination, and j (j=0,1,2,3...m) indicates the number of the plate in the arrangement and combination. After reading the information of the jth plate of the ith arrangement and combination, the coordinates (x, y) of the center of the circumscribed circle of the jth plate are randomly generated, and it is determined whether the jth plate is within the range of the tray according to the range of the circumscribed circle. Exemplarily, the specific determination method is to determine whether the leftmost (the horizontal coordinate of the center minus the radius of the circumscribed circle), the rightmost (the horizontal coordinate of the center plus the radius of the circumscribed circle), the topmost (the vertical coordinate of the center minus the radius of the circumscribed circle), and the bottommost (the vertical coordinate of the center plus the radius of the circumscribed circle) of the circumscribed circle exceed the range of the tray.

[0098] If the jth plate is not within the range of the tray, the coordinates of the center of the circumscribed circle of the jth plate (x1, y1) are regenerated to continue to determine whether the jth plate is within the range of the tray; if the jth plate is within the range of the tray, determine whether the jth plate overlaps with other plates within the range of the tray. The specific judgment method is whether the distance between the center of the circumscribed circle of the jth plate and the center of the circumscribed circle of other plates is less than the sum of the radii of the two. If less than, it means that there is stacking and occlusion between the plates.

[0099] If the j-th plate does not overlap with other plates within the range of the tray, regenerate the coordinates of the center of the circumscribed circle of the j-th plate, and continue to determine whether the j-th plate is within the range of the tray; if the j-th plate overlaps with other plates within the range of the tray, rearrange the plates and determine whether the synthesis of all plates in the i-th arrangement and combination has been completed.

[0100] If the synthesis of all the plates in the i-th permutation and combination is not completed, read the information of the j+1 plate in the i-th permutation and combination, and execute the subsequent steps; if the synthesis of all the plates in the i-th permutation and combination is completed, determine whether all the permutations and combinations have been completed. If they are completed, end; if not, read the information of the first plate of the next permutation and combination, and continue to execute the subsequent steps until all the permutations and combinations are completed.

[0101] In this embodiment, by arranging and combining sample images of plates and / or original plate images, a large number of different plate combinations can be obtained. The plate combinations are randomly placed in the sample images of the tray, further increasing the diversity of the samples; different placement positions, angles, and quantity combinations provide more learning materials for the model. When encountering plates of different shapes and sizes and different plates in actual scenes, the model trained in this diversity can more accurately identify and process the plates. In addition, compared with actually collecting a large number of different plates on the tray, generating sample images by arranging and combining and randomly placing them can save the cost and time of sample collection. On the basis of limited samples, a large number of diversified samples can be generated to meet the needs of model training and improve the efficiency of sample utilization.

[0102] In this embodiment, by performing segmentation and synthesis operations on the tray image, various different combinations of plates and trays can be obtained, among which difficult sample images of plates stacked on a tray can be obtained; the original plate images obtained by segmentation can be combined to obtain stacked difficult sample images, which enriches the sample data used for model training and makes the training set more comprehensive, covering various complex situations that may arise in practical applications; the plate recognition model is made more adaptable to various interference factors and complex scenarios, which not only enhances the recognition accuracy in adaptive applications, but also the plate recognition model can respond in milliseconds on low-configuration devices, reducing the cost of using the plate recognition model.

[0103] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be repeated in the following. On this basis, a method for applying a plate recognition model, the above step S30, the plate recognition method further includes steps T10 to T30:

[0104] Step T10, collecting pictures of actual meal plates during dining;

[0105] It should be noted that the actual plate pictures during dining are collected by cameras and terminal devices. The actual plate pictures are plates with food placed on trays. The plates in actual scenarios may include: stacked plates that block each other, plates blocked by hands, plates with similar dishes, non-stacked plates, plates not blocked by hands, etc.

[0106] Fig.10 A schematic diagram of the plate recognition model identifying an actual plate image.

[0107] Step T20, identifying the actual plate image through a plate recognition model to obtain a valid area of ​​the plate;

[0108] It should be noted that the trained plate recognition model is used to recognize the actual plate images collected, and image processing is performed on the actual plate images collected to separate the foreground and background, and obtain the effective area of ​​each type of plate, as well as the pixel-level mask at the effective area of ​​each type of plate;

[0109] Step T30, calculating the number of each type of plates according to the total area of ​​the effective area.

[0110] It should be noted that the number of each type of plates is obtained by rounding up the total area of ​​the effective area of ​​each type of plates and the reference unit area of ​​each type of plates. For example, the total area of ​​the effective area of ​​Class A is 15 square centimeters, and the total area of ​​the effective area of ​​Class B is 12 square centimeters. The reference unit of Class A plates is 4 square centimeters, and the reference unit of Class B plates is 5 square centimeters. The number of Class A plates is 15÷4≈3.75, so the number of Class A plates is 4, and the number of Class B plates is 12÷5≈2.4, so the number of Class B plates is 3.

[0111] In this embodiment, the actual plate image is recognized using a plate recognition model, which can quickly and accurately determine the effective area of ​​the plate, and calculate the number of each type of plate based on the total area of ​​the effective area, thereby avoiding the tediousness and errors of manual counting and improving the accuracy of plate recognition.

[0112] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the plate recognition method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0113] This application also provides a plate identification device, please refer to Fig.11 , the plate recognition device comprises:

[0114] An acquisition module 10 is used to acquire dinner plate pictures and food pictures, wherein the dinner plate pictures include dinner plates in different stacking and / or hand-blocking states;

[0115] A generating module 20, for generating sample pictures of different foods placed on plates in different states according to the plate picture and the food picture;

[0116] The training module 30 is used to obtain a plate recognition model through the sample image training, and use the plate recognition model to perform plate recognition.

[0117] Optionally, the generating module 20 is further used to: obtain a tray image of the dinner plate placed on the tray;

[0118] Segmenting the dinner plate and the tray in the tray image to obtain an original dinner plate image and an empty tray image after the dinner plate is extracted;

[0119] A sample image of a pallet is synthesized from the empty pallet image;

[0120] The sample picture of the dinner plate and / or the original dinner plate picture are combined with the sample picture of the tray to obtain a new dinner plate picture.

[0121] Optionally, the generating module 20 is further used to: select an initial pallet picture from each of the empty pallet pictures;

[0122] Based on each of the empty pallet images except the initial pallet image, the blank area of ​​the initial pallet image is filled to obtain a target pallet image as a sample image of the pallet, wherein the blank area is the area after the pallet is extracted.

[0123] Optionally, the generating module 20 is further used to: arrange and combine the sample pictures of the dinner plates and / or the original dinner plate pictures to obtain a dinner plate combination;

[0124] The sample pictures of the dinner plates in the dinner plate combination and / or the original dinner plate pictures are randomly placed in the tray in the sample picture of the tray.

[0125] Optionally, the generating module 20 is further used to: obtain a hand picture;

[0126] The hand image and the sample image are combined to obtain a new sample image, wherein the new sample image includes dinner plate images with and without hand occlusion.

[0127] The meal plate recognition device is also used to: collect pictures of actual meal plates during meals;

[0128] Recognize the actual dinner plate image using a dinner plate recognition model to obtain a valid area of ​​the dinner plate;

[0129] The number of each type of dinner plates is calculated based on the total area of ​​the effective area.

[0130] The plate recognition device provided by the present application adopts the plate recognition method in the above embodiment, which can solve the technical problem that the plate recognition model has low recognition accuracy due to the small amount of difficult sample data. Compared with the prior art, the beneficial effects of the plate recognition device provided by the present application are the same as the beneficial effects of the plate recognition method provided by the above embodiment, and the other technical features of the plate recognition device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0131] The present application provides a plate identification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the plate identification method in the first embodiment described above.

[0132] Reference below Fig.12 , which shows a schematic diagram of the structure of a plate recognition device suitable for implementing the embodiment of the present application. The plate recognition device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The illustrated plate identification device is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present application.

[0133] like Fig.12 As shown, the plate recognition device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the plate recognition device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a picture sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the plate identification device to communicate with other devices wirelessly or by wire to exchange data. Although the plate identification device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0134] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0135] The plate recognition device provided by the present application adopts the plate recognition method in the above embodiment, which can solve the technical problem that the plate recognition model has low recognition accuracy due to the lack of difficult sample data. Compared with the prior art, the beneficial effects of the plate recognition device provided by the present application are the same as the beneficial effects of the plate recognition method provided by the above embodiment, and the other technical features of the plate recognition device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0136] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0137] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0138] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the dinner plate recognition method in the above-mentioned embodiment.

[0139] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0140] The computer-readable storage medium may be included in the plate recognition device; or may exist independently without being assembled into the plate recognition device.

[0141] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the plate recognition device, the plate recognition device: obtains a plate picture and a food picture, wherein the plate picture includes plates in different stacking and / or hand-occluded states; generates sample pictures of different foods placed on plates in different states based on the plate picture and the food picture; obtains a plate recognition model through training with the sample pictures, and uses the plate recognition model to perform plate recognition.

[0142] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0143] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0144] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0145] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned plate recognition method, and can solve the technical problem that the plate recognition model has low recognition accuracy due to the small amount of difficult sample data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the plate recognition method provided in the above-mentioned embodiment, and will not be elaborated here.

[0146] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned plate identification method are implemented.

[0147] The computer program product provided by the present application can solve the technical problem that the recognition accuracy of the plate recognition model is low due to the lack of difficult sample data. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the plate recognition method provided by the above embodiment, which will not be elaborated here.

[0148] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for identifying a plate, characterized in that: The method comprises: Acquire a dinner plate image and a food image, wherein the dinner plate image includes dinner plates in different stacking and / or hand-blocking states; Generate sample pictures of different foods placed on plates in different states according to the plate picture and the food picture; A dinner plate recognition model is obtained through training with the sample images, and the dinner plate recognition model is used to perform dinner plate recognition.

2. The plate recognition method according to claim 1, characterized in that: Before the step of using the plate picture and the food picture, the method further includes: Get a tray image with the meal tray placed on it; Segmenting the dinner plate and the tray in the tray image to obtain an original dinner plate image and an empty tray image after the dinner plate is extracted; A sample image of a pallet is synthesized from the empty pallet image; The sample picture of the dinner plate and / or the original dinner plate picture are combined with the sample picture of the tray to obtain a new dinner plate picture.

3. The plate recognition method according to claim 2, characterized in that: The step of synthesizing a sample image of a pallet from the empty pallet image comprises: Selecting an initial pallet image from among the empty pallet images; Based on each of the empty pallet images except the initial pallet image, the blank area of ​​the initial pallet image is filled to obtain a target pallet image as a sample image of the pallet, wherein the blank area is the area after the pallet is extracted.

4. The method for identifying a plate according to claim 2, wherein: The step of combining the sample picture of the dinner plate and / or the original dinner plate picture with the sample picture of the tray comprises: Arrange and combine the sample images of the dinner plates and / or the original dinner plate images to obtain a dinner plate combination; The sample pictures of the dinner plates in the dinner plate combination and / or the original dinner plate pictures are randomly placed in the tray in the sample picture of the tray.

5. The method for identifying a plate according to claim 1, wherein: After the step of generating sample pictures of different foods placed on plates in different states according to the plate picture and the food picture, the method further comprises: Get the hand image; The hand image and the sample image are combined to obtain a new sample image, wherein the new sample image includes dinner plate images with and without hand occlusion.

6. The method for identifying a plate according to claim 1, wherein: The step of using the plate recognition model to perform plate recognition includes: Collect pictures of actual plates during meals; Recognize the actual dinner plate image using a dinner plate recognition model to obtain a valid area of ​​the dinner plate; The number of each type of dinner plates is calculated based on the total area of ​​the effective area.

7. A plate recognition device, characterized in that: The plate identification device comprises: An acquisition module, used to acquire dinner plate pictures and food pictures, wherein the dinner plate pictures include dinner plates in different stacking and / or hand-blocking states; A generating module, used for generating sample pictures of different foods placed on plates in different states according to the plate picture and the food picture; The training module is used to obtain a plate recognition model through the sample image training, and use the plate recognition model to perform plate recognition.

8. A plate recognition device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the plate recognition method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the plate recognition method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the plate recognition method according to any one of claims 1 to 6 are implemented.