Menu generation method and system, electronic equipment and product
By pre-processing and structured processing of menu image data, combined with visual understanding and natural language processing technology, the menu image data is automatically generated, which solves the problems of low menu generation efficiency, poor accuracy and insufficient flexibility in the existing technology, and achieves efficient, accurate and personalized menu generation.
Patent Information
- Application Number
- CN202510621160.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the process of menu generation, the existing technology has problems such as high labor and time costs, difficulty in ensuring accuracy, lack of convenience and flexibility, and complicated processing of dishes pictures, which is difficult to meet merchants' rapid response to market changes and personalized needs.
By obtaining the original menu image data, performing light correction, angle correction, size scaling and denoising processing, text is extracted using visual understanding model and OCR technology, combining NLP for slicing and attribute recognition, structured dish data is generated, and menu image data is generated based on background image data.
It improves the efficiency and accuracy of menu generation, enhances flexibility and convenience, can quickly respond to market changes, meet personalized needs, and saves labor and time costs.
Smart Images

Figure CN120541256A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a menu generation method, system, electronic equipment and product. Background Art
[0002] In the current catering industry, there are two main ways to create menus: manual entry and simple template application. Among them, the manual entry method refers to the catering business staff entering the name, price, description and other information of the dishes one by one in the catering software, and then manually adding pictures of the dishes to create a menu. This method is more common in small catering businesses because it is simple to operate and does not require complex technical support. Simple template application is that the merchant selects a template from the fixed menu templates provided by the catering software or online platform, and then fills in the dish information. These templates usually have preset formats and layouts, such as common classification arrangements and graphic and text matching styles. The merchant only needs to replace the text and picture content according to the requirements of the template to complete the menu production.
[0003] However, in the process of using the existing technology, the inventors found that the existing technology has at least the following problems:
[0004] 1) High labor and time costs: When manually entering dish information, staff usually need to enter various dish information one by one, including dish name, price, description and picture. For restaurants with a large number of dishes, this process may take hours or even days to complete. If the dish information is updated later, such as price adjustment or dish description modification, users usually need to manually re-enter the information, which is extremely inefficient and requires a lot of manpower and time.
[0005] 2) Accuracy is difficult to guarantee: Manual data entry is prone to errors such as typos, incorrect prices, and missing information. These errors can lead to misunderstandings when customers place orders, affecting the customer experience and even causing financial losses to businesses. For example, incorrect prices can lead to undercharging or overcharging customers, while missing information can prevent customers from understanding key dish information, affecting their ordering decisions.
[0006] 3) Lack of convenience and flexibility: Both manual entry and simple template application methods lack convenience and flexibility. In today's fast-paced business environment, businesses need to be able to quickly respond to market changes, such as launching new dishes, adjusting prices, and changing menu styles. However, existing menu creation methods are cumbersome and difficult to meet businesses' needs for rapid adjustments. Furthermore, menus based on simple templates are relatively simple, making it difficult to meet businesses' personalized needs and highlighting the restaurant's unique characteristics and style.
[0007] 4) Complicated image processing: Existing technologies typically require specialized image processing software to edit menu images, including resizing, cropping, and coloring. This process then requires uploading them to the menu, increasing operational complexity and time costs, and is particularly challenging for businesses unfamiliar with image processing software. Furthermore, the matching and layout of images with menu information also requires manual effort, which can easily lead to inconsistencies. Summary of the Invention
[0008] The present invention aims to solve the above technical problems at least to a certain extent, and provides a menu generation method, system, electronic device and product.
[0009] In order to achieve the above object, the present invention adopts the following technical solutions:
[0010] In a first aspect, the present invention provides a menu generation method, comprising:
[0011] Get the original menu image data;
[0012] Performing text extraction processing on the original menu image data to obtain basic dish data;
[0013] Structuring the basic dish data to obtain structured dish data;
[0014] Menu image data is generated according to the structured menu data.
[0015] In one possible design, after obtaining the original menu image data, the method further includes:
[0016] The original menu image data is subjected to light correction, angle correction, size scaling, normalization and / or denoising processing to obtain pre-processed menu image data, so as to perform text extraction processing on the pre-processed menu image data.
[0017] In one possible design, text extraction is performed on the original menu image data to obtain basic dish data, including:
[0018] Performing text region detection and segmentation processing on the original menu image data to obtain a dish text region;
[0019] Performing text recognition processing on the dish text area to obtain dish text data;
[0020] Segmenting the dish text data to obtain a plurality of sub-dish text data;
[0021] Attribute recognition processing is performed on multiple sub-dish text data to obtain multiple sub-dish text data bound with attribute tags, and the multiple sub-dish text data bound with attribute tags are set as basic dish data.
[0022] In one possible design, when segmenting the dish text data, a rule-based segmentation method and a content-aware segmentation method are implemented.
[0023] In one possible design, the basic dish data is structured to obtain structured dish data, including:
[0024] Standardizing the basic dish data to obtain standardized dish data;
[0025] The standardized dish data is converted into structured dish data according to a specified format.
[0026] In one possible design, before generating the menu image data, the method further includes:
[0027] Acquiring background image data so as to generate menu image data according to the structured dish data and the background image data;
[0028] Correspondingly, obtaining background image data includes:
[0029] Generate initial background image data using the first large model;
[0030] The second largest model is used to perform layout design on the initial background image data to obtain background image data bound with basic layout information.
[0031] In one possible design, before generating the menu image data, the method further includes:
[0032] The dish image data is received so as to generate menu image data according to the dish image data and the structured dish data.
[0033] In a second aspect, the present invention provides a menu generation system, comprising:
[0034] Image acquisition module, used to obtain original menu image data;
[0035] A text extraction module, in communication with the image acquisition module, for performing text extraction processing on the original menu image data to obtain basic dish data;
[0036] a structured processing module, in communication with the text extraction module, configured to perform structured processing on the basic dish data to obtain structured dish data;
[0037] The menu generating module is in communication with the structured processing module and is used to generate menu image data according to the structured dish data.
[0038] In a third aspect, the present invention provides an electronic device, comprising:
[0039] a memory for storing computer program instructions; and
[0040] The processor is configured to execute the computer program instructions to complete the operation of any one of the menu generation methods described above.
[0041] In a fourth aspect, the present invention provides a computer program product, comprising a computer program or instructions, wherein the computer program or instructions, when executed by a computer, implements a menu generating method as described in any one of the above.
[0042] The beneficial effects of the present invention are:
[0043] The present invention discloses a menu generation method, system, electronic device and product, which can improve the efficiency of menu generation and enhance the accuracy, flexibility and convenience of menu generation. Specifically, during the implementation of the present invention, the original menu image data is acquired in advance, and the original menu image data is subjected to text extraction processing to obtain basic dish data, and then the basic dish data is structured to obtain structured dish data; at the same time, background image data is acquired; finally, menu image data is generated according to the structured dish data. Based on this, the present invention can automatically generate menu image data, improve the efficiency of menu production, help save manpower and time costs, and at the same time help improve the accuracy, flexibility and convenience of menu generation, and has the value of promotion and application.
[0044] Other beneficial effects of the present invention will be further described in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flowchart of the menu generation method in Example 1;
[0046] Figure 2 This is a module block diagram of the menu generation system in Example 2;
[0047] Figure 3 This is a module block diagram of the electronic device in Example 3. DETAILED DESCRIPTION
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be briefly introduced below in conjunction with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0049] Example 1:
[0050] This embodiment discloses a menu generation method, which can be executed by, but is not limited to, a computer device or a virtual machine with certain computing resources, such as a personal computer, a smart phone, a personal digital assistant, or a wearable device, or by a virtual machine.
[0051] like Figure 1 As shown, a menu generation method may include but is not limited to the following steps:
[0052] S1. Obtain original menu image data.
[0053] Specifically, in this embodiment, it supports the use of cameras on mobile devices such as smartphones and tablets to shoot materials including dish information, such as inventory lists, lists of dishes on sale, and old menus to be replaced. During the shooting process, the mobile device can automatically make a preliminary assessment of the shooting environment, such as light intensity and shooting angle, and provide corresponding shooting prompts to help users obtain high-quality original menu image data; for example, when the light is dim, the user is prompted to turn on the flash or adjust the shooting position; when the shooting angle is tilted too much, the user is prompted to adjust the angle to ensure that the horizontal and vertical directions of the menu image are correct. In this embodiment, the material to be shot can be a paper material or a related material displayed on an electronic screen, which is not limited here. Of course, the user can also actively upload images stored in local devices in formats such as JPG, PNG, or BMP, thereby obtaining the original menu image data.
[0054] In this embodiment, batch entry and updating of product information is supported. Users can import information for multiple dishes at once, or modify and update existing dish information in batches, improving work efficiency. For example, when a user launches a new dish or adjusts the price of a dish, they can quickly enter the information through batch operations.
[0055] In step S1, after obtaining the original menu image data, the method further includes:
[0056] The original menu image data is subjected to light correction, angle correction, size scaling, normalization and / or denoising processing to obtain pre-processed menu image data, so as to perform text extraction processing on the pre-processed menu image data.
[0057] In this embodiment, after the original menu image data is acquired, it is pre-processed with light correction, angle correction, size scaling, normalization and / or denoising to improve image quality, enhance image readability and recognizability, and lay a good foundation for subsequent text extraction.
[0058] Specifically, in this embodiment, the light correction processing is to automatically adjust the brightness and contrast of the image according to the brightness distribution of the image to ensure that the dish information can be clearly seen under different lighting conditions; the angle correction processing is to automatically calculate the tilt angle of the image by detecting the feature points in the image, and perform rotation correction on it to make the image appear horizontal or vertical; the size scaling processing is to adjust the image size to a fixed resolution (such as 448×448 or higher resolution) to reduce the information loss caused by subsequent text extraction processing; the normalization processing is used to ensure that the pixel values in the image are distributed within the range of [0,1], and further contrast adjustment and edge sharpening processing can be performed to better capture image details; the denoising processing is to use a filtering algorithm to remove noise interference in the image to make the image clearer.
[0059] Based on step S1, compared with the traditional method of manually entering dish information, this embodiment greatly shortens the time for menu production by combining one-click photography with automated preprocessing. Under the traditional method, if a restaurant with 100 dishes takes an average of 5 minutes to manually enter the information of each dish (including dish name, price, description, picture association, etc.), it will take a total of 500 minutes, or about 8.3 hours. However, using the shooting method in this embodiment to collect menu image data, assuming that it takes 30 minutes to shoot the menu images of 100 dishes, and 30 minutes for preprocessing and menu generation, it only takes 1 hour in total, which is more than 8 times more efficient; at the same time, for the update of dish information in the later stage, there is no need to manually modify them one by one, and it can be completed quickly through batch operations, which further improves work efficiency and enables merchants to respond to market changes more promptly, such as launching new dishes, adjusting prices, etc.
[0060] S2. Perform text extraction on the original menu image data to obtain basic dish data.
[0061] In step S2, text extraction is performed on the original menu image data to obtain basic dish data, including:
[0062] S201. Perform text region detection and segmentation processing on the original menu image data to obtain dish text regions.
[0063] Specifically, in this embodiment, a Qwen-VL type visual understanding model is used to quickly and accurately locate and detect the text area of the original menu image data, and further segment the text area, so that even if the original menu image data contains complex backgrounds, patterns or other interfering elements, the dish text area can be accurately extracted.
[0064] S202. Perform text recognition processing on the dish text area to obtain dish text data.
[0065] Specifically, in this embodiment, OCR (optical character recognition) technology is combined to recognize the text in the dish text area, which can support multiple languages including Chinese, English, Japanese and Korean, as well as various regular fonts and special fonts, and can accurately process texts of various fonts, sizes and styles.
[0066] S203. Segment the dish text data to obtain a plurality of sub-dish text data.
[0067] In this embodiment, the text data of the dishes is segmented using a rule-based segmentation method and a content-aware segmentation method. The content-aware segmentation method utilizes NLP (Natural Language Processing) technologies, such as sentence segmentation, paragraph recognition, title detection, and punctuation usage, to achieve content-based text segmentation.
[0068] Specifically, in this embodiment, the dish text data can be initially segmented using a rule-based segmentation method, such as using the rule that the name precedes the number and the price follows the number. For example, if the dish text data is "Kung Pao Chicken 38 Yuan Classic Sichuan Cuisine...", segmenting it using the rule-based segmentation method will result in "[Kung Pao Chicken][38 Yuan][Classic Sichuan Cuisine...]". During the segmentation process of the dish text data, NLP word segmentation technology can be further used in combination with a preset deep learning model to segment data that cannot be segmented using the rule-based segmentation method, such as segmenting the data "Kung Pao Chicken 38" without a price symbol, to address complex scenarios that cannot be handled by the rules.
[0069] S204. Perform attribute recognition processing on the multiple sub-dish text data to obtain multiple sub-dish text data bound with attribute tags, and set the multiple sub-dish text data bound with attribute tags as basic dish data.
[0070] Specifically, in this embodiment, a pre-trained classification model can be used to perform attribute recognition processing on the identified multiple sub-dish text data to determine whether it belongs to the product name, price or description; for example, for multiple sub-dish text data "Kung Pao Chicken 38 yuan classic Sichuan dish, the chicken is tender and the peanuts are crispy", it can be known through attribute recognition processing that "Kung Pao Chicken" is the product name, "38 yuan" is the price, and "classic Sichuan dish, the chicken is tender and the peanuts are crispy" is the description, thereby separating the attribute labels such as product name, price and description.
[0071] Based on the above steps S201 to S204, this embodiment combines visual understanding models, OCR technology, deep learning models and NLP word segmentation technology to achieve high-precision recognition of basic dish data in the original menu image data. Compared with traditional text recognition methods, this embodiment can more accurately process texts of various fonts, sizes and styles, and effectively overcome the recognition error problems caused by factors such as complex fonts and poor image quality. Through precise detection and segmentation of text areas, as well as in-depth understanding and analysis of text content, this embodiment can comprehensively and accurately extract multi-dimensional information such as dish names, prices, descriptions and classifications, avoiding the problem of misclassification due to negligence such as typos, price errors or information omissions during manual entry, and can provide reliable data support for subsequent menu generation.
[0072] S3. Structural processing is performed on the basic dish data to obtain structured dish data.
[0073] In step S3, the basic dish data is structured to obtain structured dish data, including:
[0074] S301. Standardize the basic dish data to obtain standardized dish data.
[0075] Specifically, in this embodiment, the correspondence between the sub-dish text data in the basic dish data is determined through layout analysis, and the page layout structure and hierarchical relationship can be analyzed to identify layout elements such as titles and classification labels, and establish a hierarchical correspondence between product information. At the same time, the sub-dish text data of each attribute are unified in format. For example, the price is uniformly converted into a specified format, such as retaining two decimal places, and the price is unified in "yuan". Special symbols and formats in the description are uniformly processed to obtain standardized dish data. For example, classification labels such as "hot dishes", "cold dishes" or "staple foods" for the sub-dish text data in the basic dish data can be identified, and the corresponding sub-dish text data can be classified into corresponding categories. At the same time, the correspondence between product categories, names and prices is clarified, and then the format is unified to make the dish data more structured and organized.
[0076] S302. Convert the standardized dish data into structured dish data according to a specified format.
[0077] Specifically, in this embodiment, the standardized dish data can be converted into a specified format with the help of existing multimodal large models such as glm-4v-plus, such as structured JSON (JavaScript Object Notation) or array format, which is not limited here.
[0078] S4. Generate menu image data based on the structured dish data and the background image data.
[0079] In this embodiment, the structured dish data is inserted into the background image data according to the layout corresponding to the basic layout information, so as to obtain the final menu image data.
[0080] It should be noted that, based on the above steps S1 to S4, menu image data with a solid color background can be generated. To meet the personalized user needs of generating menu image data with a pattern background, this embodiment further makes the following improvements:
[0081] Before generating the menu image data, the method further includes:
[0082] a. Obtaining background image data to generate menu image data based on the structured dish data and the background image data;
[0083] Correspondingly, background image data is obtained.
[0084] In step a, obtaining background image data includes:
[0085] a01. Generate initial background image data using the first large model.
[0086] As an example, in this embodiment, the first large model adopts Doubao's Wenshengtu large model (HighAesGeneralV21L). In the process of generating the initial background image data, the user is allowed to define (or default) the background image of the menu through interactive design, and the prompt words for image generation are prepared according to the defined content, and then the initial background image data is generated.
[0087] a02. Use the second largest model to perform layout design on the initial background image data to obtain background image data bound with basic layout information.
[0088] As an example, in this embodiment, the second large model adopts Alibaba's Qwen2.5-Coder-32B-Instruct large model, which has powerful coding capabilities and can generate HTML (Hypertext Markup Language) code to further design the layout of the initial background image data. During implementation, the overall system architecture layout of the initial background image data can be designed first, and the page structure can be planned, such as including the header area (store name, introduction, logo), classification area, product area, footer area (business hours, address), etc., and HTML is used to draw a wireframe diagram to determine the basic layout structure; then, through product interaction, users are allowed to select and set custom options, such as menu layout details such as font size, color, and spacing. The corresponding custom menu generation prompt words are written based on the user's selection, and Tailwind CSS is used for responsive layout to form the final background image data bound to the basic layout information.
[0089] Based on the above steps a01 to a02, this embodiment can be based on the existing large model. With simple interactions, such as allowing users to select a menu template with a preferred style / layout style, upload a custom background image, select a background image style, etc., the user's needs can be converted into prompt words, so that the large model can generate a menu (including background image data) that meets the user's needs and has a specific style, such as Chinese classical style, modern minimalist style, romantic pastoral style, etc., to meet the positioning and cultural atmosphere of different restaurants. On this basis, users can further flexibly set visual elements such as font size, color and font style, as well as change existing visual elements such as store logos, online store order QR codes and product images (if any) when generating menus, to achieve personalized customization of menus, highlight the characteristics and style of the restaurant, meet the diverse personalized needs of users, and create a unique menu. In contrast, existing technologies are mostly limited to general templates and are difficult to meet the personalized needs of merchants.
[0090] It should be noted that, in order to meet the user's personalized needs for synchronously displaying dish images in the menu, this embodiment further makes the following improvements: before generating the menu image data, the method further includes:
[0091] The dish image data is received so as to generate menu image data according to the dish image data and the structured dish data.
[0092] This embodiment can improve the efficiency of menu generation, and enhance the accuracy, flexibility, and convenience of menu generation. Specifically, during the implementation of this embodiment, the original menu image data is acquired in advance, and the original menu image data is subjected to text extraction processing to obtain basic dish data, and then the basic dish data is structured to obtain structured dish data; at the same time, background image data is acquired; finally, Based on this, this embodiment can automatically generate menu image data, improve the efficiency of menu production, and help save manpower and time costs. Generating menu image data based on the structured dish data is also conducive to improving the accuracy, flexibility, and convenience of menu generation, which is helpful for the digital transformation of small and medium-sized catering enterprises and has the value of promotion and application.
[0093] Example 2:
[0094] This embodiment discloses a menu generation system for implementing the menu generation method in embodiment 1; Figure 2 As shown, the menu generation system includes:
[0095] Image acquisition module, used to obtain original menu image data;
[0096] A text extraction module, in communication with the image acquisition module, for performing text extraction processing on the original menu image data to obtain basic dish data;
[0097] a structured processing module, in communication with the text extraction module, configured to perform structured processing on the basic dish data to obtain structured dish data;
[0098] The menu generating module is in communication with the structured processing module and is used to generate menu image data according to the structured dish data.
[0099] By adopting this embodiment, menu image data with a solid color background can be generated.
[0100] As another embodiment of the menu generation system, based on the above menu generation system, the menu generation system further includes:
[0101] A background image acquisition module, used to acquire background image data;
[0102] The background image acquisition module is in communication with the menu generation module so that the menu generation module generates menu image data according to the structured dish data and the background image data.
[0103] By adopting this embodiment, menu image data with a background pattern can be further generated.
[0104] It should be noted that the working process, working details and technical effects of the menu generation system provided in this embodiment 2 can be found in embodiment 1 and will not be described in detail here.
[0105] Example 3:
[0106] Based on the embodiment 1 or 2, this embodiment discloses an electronic device, which may be a smart phone, a tablet computer, a laptop computer or a desktop computer. The electronic device may be called a user terminal, a portable terminal, a desktop terminal, etc. Figure 3 As shown, the electronic equipment includes:
[0107] a memory for storing computer program instructions; and
[0108] The processor is configured to execute the computer program instructions to complete the operation of the menu generation method as described in any one of the embodiments 1.
[0109] Specifically, the processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen.
[0110] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 is used to store at least one instruction, which is executed by the processor 301 to implement the menu generation method provided in Example 1 of the present application.
[0111] In some embodiments, the terminal may optionally include a communication interface 303 and at least one peripheral device. The processor 301, memory 302, and communication interface 303 may be connected via a bus or signal lines. Each peripheral device may be connected to the communication interface 303 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 304, a display screen 305, and a power supply 306.
[0112] The communication interface 303 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0113] The radio frequency circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 304 communicates with a communication network and other communication devices via electromagnetic signals.
[0114] The display screen 305 is used to display a UI (User Interface). The UI may include any combination of graphics, text, icons, and videos.
[0115] The power supply 306 is used to supply power to various components in the electronic device.
[0116] Example 4:
[0117] Based on any one of Embodiments 1 to 3, this embodiment discloses a computer program product, including a computer program or instructions, which, when executed by a computer, implements a menu generation method as described in any one of Embodiment 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0118] Obviously, those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0119] Finally, it should be noted that the above embodiments are intended only to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art will appreciate that modifications may be made to the technical solutions described in the above embodiments, or that some of the technical features may be replaced with equivalents. Such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A menu generation method, characterized in that: include: Get the original menu image data; Performing text extraction processing on the original menu image data to obtain basic dish data; Structuring the basic dish data to obtain structured dish data; Menu image data is generated according to the structured menu data.
2. A menu generation method according to claim 1, characterized in that: After obtaining the original menu image data, the method further includes: The original menu image data is subjected to light correction, angle correction, size scaling, normalization and / or denoising processing to obtain pre-processed menu image data, so as to perform text extraction processing on the pre-processed menu image data.
3. A menu generation method according to claim 1, characterized in that: Perform text extraction on the original menu image data to obtain basic dish data, including: Performing text region detection and segmentation processing on the original menu image data to obtain a dish text region; Performing text recognition processing on the dish text area to obtain dish text data; Segmenting the dish text data to obtain a plurality of sub-dish text data; Attribute recognition processing is performed on multiple sub-dish text data to obtain multiple sub-dish text data bound with attribute tags, and the multiple sub-dish text data bound with attribute tags are set as basic dish data.
4. A menu generation method according to claim 3, characterized in that: When segmenting the dish text data, a rule-based segmentation method and a content-aware segmentation method are used.
5. A menu generation method according to claim 1, characterized in that: The basic dish data is structured to obtain structured dish data, including: Standardizing the basic dish data to obtain standardized dish data; The standardized dish data is converted into structured dish data according to a specified format.
6. A menu generation method according to claim 1, characterized in that: Before generating the menu image data, the method further includes: Acquiring background image data so as to generate menu image data according to the structured dish data and the background image data; Correspondingly, obtaining background image data includes: Generate initial background image data using the first large model; The second largest model is used to perform layout design on the initial background image data to obtain background image data bound with basic layout information.
7. A menu generation method according to claim 1, characterized in that: Before generating the menu image data, the method further includes: The dish image data is received so as to generate menu image data according to the dish image data and the structured dish data.
8. A menu generation system, characterized in that: include: Image acquisition module, used to obtain original menu image data; A text extraction module, in communication with the image acquisition module, for performing text extraction processing on the original menu image data to obtain basic dish data; a structured processing module, in communication with the text extraction module, configured to perform structured processing on the basic dish data to obtain structured dish data; The menu generating module is in communication with the structured processing module and is used to generate menu image data according to the structured dish data.
9. An electronic device, characterized in that: include: a memory for storing computer program instructions; as well as, A processor is configured to execute the computer program instructions to complete the operation of the menu generation method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or the instruction is executed by a computer, the menu generating method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Electronic menu generation method, device and apparatus
CN111192346A
Marked menu identification method and device based on indentation detection
CN116740733A
Method for deciding food menu image using text data
KR1020160004550A
System, method and user experience for skew detection and correction and generating a digitized menu
US20230106967A1