Intelligent store patrol method, device, storage medium and electronic device
The multi-modal model is used to generate image text descriptions and combined with the scene large language model to identify open events, which solves the problem that the existing system is difficult to handle open events, and achieves effective identification and reporting of cross-contamination and other events in the kitchen scene. It reduces inspection costs and improves the efficiency and accuracy of smart store inspections.
Patent Information
- Application Number
- CN202410848459.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-27
AI Technical Summary
The existing intelligent store patrol system is difficult to effectively handle open events, such as determining whether there is a cross-contamination event in the kitchen scene. Because cross-contamination is a concept without a direct and clear concrete representation, it is difficult for the system to achieve good results.
A multi-modal model is used to generate text descriptions of image data, and combined with the scene large language model generated by store inspection scene training, the text descriptions and inspection questions are processed, and target answers are generated to identify and report open events. The method includes generating global and regional text descriptions based on image data, using a scene large language model to identify open events, and reporting issues.
It achieves effective identification and reporting of open events, reduces inspection costs, improves the efficiency and accuracy of smart store inspections, avoids the need to develop multiple detection models separately, and unifies the detection of multiple inspection items.
Smart Images

Figure CN118396125B
Abstract
Description
Technical Field
[0001] The present application relates to artificial intelligence technology, and in particular to an intelligent store inspection method, device, storage medium and electronic device. Background Art
[0002] With the advancement of artificial intelligence and video acquisition and processing technology, remote video store inspection systems have been increasingly widely used.
[0003] Remote video store inspections utilize artificial intelligence technology to automatically detect pre-defined events of interest through video. For example, in restaurant operations, operators need to conduct inspections of various aspects of the store, such as hygiene, food quality, and service quality. Specific inspections, such as those for chefs not wearing chef hats or uniforms, can now be automatically performed through video store inspections. Specifically, pre-trained object detection models can be used to detect objects without chef hats or uniforms, generating corresponding alarm messages. This can help save labor and improve inspection efficiency.
[0004] However, the current intelligent store inspection system cannot handle some open events well. For example, it cannot use video to determine whether there is a cross-contamination incident in the back kitchen scene. Since the cross-contamination incident is a conceptual definition without a direct and clear concrete representation, the existing store inspection system is difficult to achieve a good effect. Summary of the Invention
[0005] The present application provides an intelligent store inspection method, device, storage medium and electronic device, which can realize remote intelligent inspection for open events.
[0006] To achieve the above objectives, this application adopts the following technical solutions:
[0007] An intelligent store inspection method, comprising:
[0008] Based on the collected current image data, a text description corresponding to the current image data is generated using a multimodal model; wherein the multimodal model is generated by tuning a general multimodal model based on a pre-set artificial rule area, and the tuned multimodal model is used to process the current image data and image detection results to generate the text description, and the text description is used to describe the existence of an entity within the artificial rule area. The text description includes a global text description and a regional text description, and the global text description is generated by inputting the current image data into the multimodal model, and the regional text description is generated by inputting each sub-region image generated based on the current image data into the multimodal model;
[0009] The text description and the inspection question are combined into an input question, and the input question is processed using a large language model generated by training for the store inspection scenario to generate a target answer corresponding to the input question;
[0010] Reporting and reminding questions based on the target answers;
[0011] The scene language model is generated by optimizing the store inspection rules of the store inspection scene on the basis of a general language model, wherein the store inspection rules at least include rules corresponding to open events, and the sub-region image is generated in the following manner:
[0012] Using the scene visual detection model generated by training for store inspection scenarios, visual detection is performed on the collected current image data to generate the image detection result; and, based on the positional relationship between different entities identified in the image detection result, positional de-overlapping and merging are performed on the current image data to generate the sub-region image; or,
[0013] In the image frame of the current image data, an image of a fixed area is divided as the sub-area image according to an area division method set by the system; or,
[0014] In the image frame of the current image data, an image of a fixed area is divided as the sub-area image according to an area division method determined by interaction with external input.
[0015] Preferably, when the text description includes multiple sub-text descriptions, the step of combining the text description and the inspection question into an input question includes:
[0016] Each of the sub-text descriptions is combined with each of all the inspection questions to obtain the input question; or, each of the sub-text descriptions is matched with each inspection question, and the successfully matched sub-text descriptions and inspection questions are combined to obtain the input question; or, multiple sub-text descriptions are spliced into a text description, and are combined with each of all the inspection questions to obtain the input question.
[0017] Preferably, matching each sub-text description with each inspection question includes:
[0018] Performing feature extraction on each sub-text description to obtain sub-text features;
[0019] Extract features from each inspection problem to obtain inspection problem features;
[0020] The subtext features and the inspection question features are compared for similarity, and it is determined that the subtext description and the inspection question corresponding to the subtext features and the inspection question features whose similarity is greater than or equal to a set threshold are successfully matched.
[0021] Preferably, the confidence level of generating the text description is determined based on the confidence level of the image detection result and the confidence level of the multimodal model output.
[0022] An intelligent store inspection device, comprising: a multimodal processing unit, a large language model processing unit, and a reporting unit;
[0023] The multimodal processing unit is configured to generate a text description corresponding to the current image data using a multimodal model based on the collected current image data; wherein the multimodal model is generated by tuning a general multimodal model based on a pre-set artificial rule region, and the tuned multimodal model is used to process the current image data and image detection results to generate the text description, wherein the text description is used to describe the existence of an entity within the artificial rule region, and the text description includes a global text description and a regional text description, wherein the global text description is generated by inputting the current image data into the multimodal model, and the regional text description is generated by inputting each sub-region image generated based on the current image data into the multimodal model;
[0024] The large language model processing unit is configured to combine the text description and the inspection question into an input question, process the input question using the large language model trained and generated for the store inspection scenario, and generate a target answer corresponding to the input question;
[0025] The reporting unit is used to report and remind questions based on the target answer;
[0026] The large language model is generated by optimizing the store inspection rules of the store inspection scenario on the basis of a general large language model, wherein the store inspection rules at least include rules corresponding to open events, and the method of generating the sub-region image includes:
[0027] Using the scene visual detection model generated by training for store inspection scenarios, visual detection is performed on the collected current image data to generate the image detection result; and, based on the positional relationship between different entities identified in the image detection result, positional de-overlapping and merging are performed on the current image data to generate the sub-region image; or,
[0028] In the image frame of the current image data, an image of a fixed area is divided as the sub-area image according to an area division method set by the system; or,
[0029] In the image frame of the current image data, an image of a fixed area is divided as the sub-area image according to an area division method determined by interaction with external input.
[0030] Preferably, when the text description includes multiple sub-text descriptions, in the large language model processing unit, the step of combining the text description and the inspection question into an input question includes:
[0031] Each of the sub-text descriptions is combined with each of all the inspection questions to obtain the input question; or, each of the sub-text descriptions is matched with each inspection question, and the successfully matched sub-text descriptions and inspection questions are combined to obtain the input question; or, multiple sub-text descriptions are spliced into a text description, and are combined with each of all the inspection questions to obtain the input question.
[0032] Preferably, in the large language model processing unit, matching each sub-text description with each inspection question includes:
[0033] Performing feature extraction on each sub-text description to obtain sub-text features;
[0034] Extract features from each inspection problem to obtain inspection problem features;
[0035] The subtext features and the inspection question features are compared for similarity, and it is determined that the subtext description and the inspection question corresponding to the subtext features and the inspection question features whose similarity is greater than or equal to a set threshold are successfully matched.
[0036] A computer-readable storage medium stores computer instructions, which, when executed by a processor, can implement any of the above-mentioned intelligent store patrol methods.
[0037] An electronic device comprising at least a computer-readable storage medium and a processor;
[0038] The processor is configured to read executable instructions from the computer-readable storage medium and execute the instructions to implement any of the above-mentioned intelligent store patrol methods.
[0039] As can be seen from the above technical solution, in this application, first, based on the collected image data, a multimodal model is used to generate a text description of the corresponding image data, converting the image information into text information; next, the text description and the inspection question are combined into an input question, and the input question is processed using a scene language model generated for the store inspection scenario to generate a target answer corresponding to the inspection question, such as whether the content of the text description meets the illegal operation defined by the inspection question; the scene language model here is based on the various inspection rules of the store inspection scenario and is tuned and generated on the basis of a general language model, and the inspection rules include rules corresponding to open events. The scene language model trained and generated can effectively identify open events; finally, based on the target answer, the inspection problem is reported and reminded. Through the above processing, the visual detection results are first converted into text descriptions by the multimodal model, and then the inspection language model's recognition ability for various text description events including open events is used to process the text description of the image and the inspection question, and the answer to whether there is an inspection problem (including issues related to open events) is obtained, thereby enabling the effective identification and reporting of various inspection problems including open events during smart store inspections. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a basic flow chart of the intelligent store inspection method in this application;
[0041] Figure 2 This is a schematic diagram of the specific process of the intelligent store inspection method in a specific embodiment of this application;
[0042] Figure 3 Schematic diagram of the basic structure of the intelligent store patrol device in this application;
[0043] Figure 4 This is a schematic diagram of the basic structure of the electronic device provided in this application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical means and advantages of this application clearer, the application is further described in detail below with reference to the accompanying drawings.
[0045] Figure 1 This is a basic flow chart of the intelligent store inspection method in this application. The intelligent store inspection method in this application is carried out for a certain store inspection scene, such as the back kitchen scene, the front store scene, etc. Figure 1 As shown, the method includes:
[0046] Step 101: Based on the collected current image data, a text description corresponding to the current image data is generated using a multimodal model.
[0047] The captured image data can be a set of multiple frames for use in action recognition or entity state change recognition, or a single frame for use in static entity recognition. Hereinafter, the image data being processed is referred to as the current image data.
[0048] The multimodal model in this application is used to process an input image and generate a text description for describing the input image. Thus, the information expressed by the current image data can be described in text form.
[0049] Determining the text description of the current image data through the multimodal model may be determining a single-level text description, or, preferably, to improve inspection accuracy and coverage, the text description may be a multi-level text description of the current image data.
[0050] Specifically, in the simplest sense, a single-level text description means that the multimodal model processes the complete current image data to generate a global text description of the current image data; a multi-level text description means that in order to make the text description of the current image data more comprehensive, one or more sub-region images are generated based on the current image data, and the sub-region image only includes the content of a part of the region in the complete image screen. The multimodal model processes both the complete current image data and the different sub-region images divided out to generate a global text description corresponding to the entire current image data and a regional text description for the part of the sub-region images. The sub-region image can be an image within a certain image region in a single-frame image, or an image within the same image region in multiple frames of images. In more detail, the sub-region image can be divided using the output result of image detection on the current image data, or it can be divided into sub-regions according to a region division method preset by the system or a region division method determined through interaction with the outside.
[0051] In step 102, the text description and the inspection question are combined into an input question, and the input question is processed using a large scene language model generated by training for store inspection scenarios to generate a target answer corresponding to the input question.
[0052] A textual description of the current scenario has been generated in step 101. In this step, the textual description of the actual scenario and the externally input inspection question to be checked are combined to form the input question. For example, the textual description of the actual scenario may include "a food box is placed on a trash can" and the inspection question may be "is there cross contamination in the kitchen?" These two are combined to form the input question "a food box is placed on a trash can. Determine whether there is cross contamination in the kitchen."
[0053] The input question is input into the pre-trained large language model of the scenario, which judges and processes the relevant questions and outputs the target answer, such as the existence of cross-contamination behavior.
[0054] The scenario-based large language model is pre-tuned and generated based on the general large language model, based on the store inspection rules for the store inspection scenario. To identify open-ended events, these store inspection rules include at least rules corresponding to open-ended events, but can also include rules for other specific events. These store inspection rules can be either store-specific inspection rules or industry-wide rules such as industry standards. For example, in a back-of-house inspection scenario, these rules could include store regulations such as dress code and operating procedures for kitchen staff, as well as industry-wide standards such as hygiene regulations. The scenario-based large language model generated through this training can analyze text descriptions for the various store inspection rules used in training (including rules for open-ended events) to identify whether they meet inspection requirements.
[0055] Step 103: Report the problem and give a reminder based on the target answer.
[0056] This concludes the basic intelligent store inspection method described in this application. This method utilizes a multimodal model to implement textual descriptions of the current image data. Furthermore, a large language model for scenes that can identify open events is used to analyze and process the scene text description and inspection questions, generating target answers. This determines whether the text description contains inspection questions (including open events). Finally, based on the target answers output by the large language model, issues are reported and reminders are issued. This effectively enables automated inspections of open events, significantly reducing inspection costs.
[0057] On the basis of the above basic scheme, as mentioned above, in order to use the multimodal model to better perform multi-level text description of the current image data, the current image data can be pre-detected, and the sub-region images can be divided based on the image detection results, so that the multimodal model can generate multi-level text descriptions. In order to complete the division of the sub-region images in the above manner, Figure 1 On the basis of the solution shown, the following processing may be further included in step 100 before step 101:
[0058] Step 100: Use the scene visual detection model generated by training for store inspection scenarios to perform visual detection on the collected image data and generate image detection results.
[0059] The scene vision detection model performs visual inspection on the current image data, generating image detection results and obtaining entity and attribute information in the scene. For example, in a kitchen scene, the image detection results may include the detection of a freezer and its location, a dishcloth and its location, etc. Typically, each entity and attribute has a confidence level, which represents the trustworthiness of the entity or attribute.
[0060] The scene visual detection model used in this step can be pre-trained and generated for the current store inspection scene. Specifically, it can be tuned and trained based on the general visual detection model using sample data of the store inspection scene. The training and generation of the store inspection detection model can be carried out using existing methods.
[0061] Through step 100, the image detection result for the current scene can be obtained, which includes each detected entity and corresponding position information. Based on this position information, the sub-region image can be divided.
[0062] The specific implementation of the intelligent store inspection method in this application is described below through a specific embodiment. In this specific embodiment, it includes using a visual detection model to perform image detection processing on the current image data.
[0063] Figure 2 This is a flow chart of the intelligent store inspection method in a specific embodiment of this application. In this specific embodiment, it is assumed that the store inspection scene is a kitchen scene, and the current image data is a single frame image taken by a camera. Figure 2 As shown, the method includes:
[0064] Step 201: Pre-train and generate a scene vision detection model.
[0065] When training a scene vision detection model, first, image data of the store inspection scene (the back kitchen scene in this embodiment) is collected and analyzed, and the entity objects and attributes involved in the scene are labeled. For example, it is necessary to collect image data of the back kitchen, label various entities appearing in the image, such as sinks, refrigerators, microwave ovens, rags, personnel, etc., and indicate the attributes of the entities, which may include color, shape, etc.
[0066] Next, we use the labeled dataset to fine-tune and train a visual detection model for the back-kitchen scene based on the general visual detection model. The resulting scene visual detection model will achieve better detection results in this store inspection scenario than the general visual object detection model.
[0067] The training process in this step can be implemented using existing implementations. A small number of samples are collected and fine-tuned based on a publicly available object detection model to obtain a scene vision detection model optimized for kitchen scenarios.
[0068] Furthermore, to better enable the method of this embodiment to identify open-ended events, it is preferable to implement full-element detection of the store inspection scene when training the scene vision detection model. Specifically, an open-ended event is a general conceptual event, not specific to a specific event. A specific event refers to an event description that specifies specific entities, attributes, relationships, and behaviors. For example, detecting the absence of a chef's hat in a video is a specific event, specifying that the entity objects are a person and a chef's hat, and that the person's attribute or behavior is not wearing a chef's hat. Another example is detecting the presence of a mouse in a video, which is a specific event that specifies the specific entity mouse. Open-ended events, on the other hand, do not specify the specific entity objects, attributes, relationships, or behaviors to be detected; they simply define a class of conceptual events, such as detecting cross-contamination in the kitchen. Because open-ended events do not specify specific entity objects, attributes, etc. to be detected, a comprehensive understanding and description of the video scene is required. Therefore, when training the scene vision detection model in this step, all elements of the store inspection scene should be used for model training, so that the trained scene vision detection model can detect as many elements of the current scene as possible.
[0069] At the same time, in existing store inspection systems, different inspection items often require the use of different technical solutions, and the cost of technical development and deployment is high. For example, to detect whether the kitchen staff are wearing work clothes and work hats, it is necessary to develop a work clothes detection model and a work hat detection model, and then deploy them; to detect whether there is garbage on the ground, image comparison is often used to develop and deploy image comparison detection models. The entire process consumes a lot of technical development resources. One inspection item requires a corresponding model, and multiple inspection items require multiple models, and the deployment cost is very high. In this embodiment, the scene visual detection model generated by training realizes the full-factor detection of the store inspection scene, so that the comprehensive image detection results can be used to achieve unified detection of multiple inspection items.
[0070] Step 202: Pre-train and generate a large scene language model.
[0071] The inspection events to be detected in store inspection scenarios may involve manually defined rules and general standards for store inspection scenarios. For example, in the back kitchen scenario, manually defined rules may include: the location of the raw food area and the cooked food area, the use of different colored dishcloths in the raw and cooked food areas, employee uniforms for specific positions, and items not placed on microwave ovens. General standards for back kitchen scenarios may include industry standards for back kitchen hygiene. These inspection rules, including manually defined rules and general standards, are described in text, recorded one by one, and fed into a general large language model via "prompts" for fine-tuning. This yields a scenario-specific large language model with better performance for store inspection scenarios. Taking the back kitchen scenario as an example, a list of inspection rules is formed by combining industry standards for back kitchen hygiene regulations and manually defined rules. This is fed into the general large language model via "prompts," resulting in a back kitchen-specific large language model that incorporates back kitchen hygiene and behavioral standards.
[0072] Of course, to identify open events, store inspection rules include corresponding rules for these events, such as rules for cross-contamination in the kitchen. Furthermore, to uniformly detect various inspection items, the training of the scenario-based large language model includes store inspection rules corresponding to various inspection items.
[0073] Based on the generation of store inspection rules, the optimization and training of the scenario-based large language model can be achieved using various existing methods. For example, sample pairs of various input questions and target answers can be generated based on the store inspection rules for training the scenario-based large language model.
[0074] Step 203: Process the collected current frame image using the scene vision detection model to generate an image detection result.
[0075] In this embodiment, the scene visual detection model trained and generated in step 201 is a full-factor detection model. This step uses the model to perform visual detection processing on the current frame image to generate an image detection result including various factors in the current scene.
[0076] Step 204 : Generate a text description of the current frame image using a multimodal model based on the current frame image and the image detection result.
[0077] As previously mentioned, the text description of the current frame image can be a single-level text description, including a global text description of the current frame image. The text description of the current frame image can also be a multi-level text description, including a global text description of the current frame image and regional text descriptions of sub-region images within the current frame image. In this embodiment, a multi-level text description is used to describe all information in the current frame image in detail without omission, enabling more comprehensive inspections and more inspection items.
[0078] To obtain a multi-level text description, one or more sub-region images can be generated based on the current frame image before the multimodal model is used to process the current frame image. The current frame image and all sub-region images, along with their corresponding image detection results, are then fed into the multimodal model. In other words, the current frame image and its image detection results are fed into the multimodal model to obtain a global text description for the current frame image. Each sub-region image and its corresponding image detection result for that sub-region are then fed into the multimodal model to obtain a regional text description corresponding to the sub-region image.
[0079] When generating a subregion image, this embodiment performs positional de-duplication and merging based on the positional relationships between different entities identified in the image detection results for the current frame image to generate the subregion image. For example, if the image detection results include "sink detected, food detected," and the spatial relationship between the food and sink in the image is determined to determine that they intersect, the image regions corresponding to the food and sink are integrated into a single image subregion. This is then fed into the multimodal model along with the corresponding image detection results "sink detected, food detected," resulting in a textual description of the subregion image: "Food is in the sink."
[0080] In addition to the method of generating sub-region images using image detection results in this embodiment, a region division method can also be determined in the current frame image based on interaction with external input. Fixed regions can then be divided according to this region division method to serve as sub-region images. For example, a user can manually set a cooked food area and a raw food area by inputting the position coordinates of the corresponding regions in the image. When dividing the sub-region images, the cooked food area image and the raw food area image are extracted from the current frame image according to the set position coordinates. The divided sub-region images are input into the multimodal model along with the image detection results corresponding to the areas (for example, a red rag is placed in the cooked food area). This yields the image description "a red rag is present in the image." Combined with the information that the input sub-region image is a "cooked food area" image, the image description "a red rag is present in the cooked food area" can be further obtained.
[0081] Alternatively, the system can pre-configure a region division method for the current image data, and then divide a fixed region into sub-region images according to the region division method.
[0082] The above-mentioned multimodal model can be implemented by using existing multimodal models, such as the CLIP model or the BLIP model and their corresponding image description models evolved on this basis.
[0083] Alternatively, an existing general multimodal model can be fine-tuned and trained to generate a scene-based multimodal model. This model can then be used to learn about manually defined areas (e.g., the prepared food area and the raw food area). This allows for the generation of textual descriptions of these areas based on the input image. For example, the textual description "There is a red rag in the prepared food area" can be directly generated based on the input image. In other words, the fine-tuned multimodal model can be used to process the current frame image and image detection results to generate a textual description that includes the presence of entities within the manually defined area.
[0084] Each text description has a confidence level, which is used to determine whether the text description should be used as the final text description for subsequent processing steps. When each text description is generated in the multimodal model, the confidence level of the text description is obtained. In this embodiment, to better adjust the overall detection and accuracy, the confidence level output by the multimodal model can be used instead of directly as the confidence level of each text description. Instead, the confidence level of the image detection is further considered based on the confidence level output by the multimodal model to comprehensively determine the confidence level of each text description. This comprehensively determined confidence level of the text description is referred to as the modified confidence level of the text description. In other words, in this embodiment, the modified confidence level of the text description is jointly determined based on the confidence level of the image detection and the confidence level of the corresponding text description output by the multimodal model. The specific joint determination method can be determined based on actual conditions, for example, it can be a weighted fusion method such as weighted averaging. After determining the modified confidence level of each text description, a confidence threshold can be set, and text descriptions with a modified confidence level greater than or equal to the confidence threshold are used as the final text description for subsequent processing steps. By determining the above-mentioned corrected confidence, some areas with low image detection confidence and their corresponding generated text descriptions can be filtered out to reduce false detections in the final inspection output.
[0085] Step 205: Combine the text description and the inspection question into an input question.
[0086] The text description generated in step 204 may generally be a plurality of sub-text descriptions, wherein the global text description may include one or more sub-text descriptions, and each regional text description may also include one or more sub-text descriptions.
[0087] Inspection questions are usually external input, or they can be default inspection questions preset by the system. There can also be one or more inspection questions.
[0088] When the text description and the inspection question are combined into an input question, each sub-text description and each inspection question may be considered to obtain the input question.
[0089] Specifically, when combining to determine the input question, each sub-text description can be combined with each of all inspection questions to obtain the corresponding input question; or, each sub-text description can be matched with each inspection question, and the successfully matched sub-text descriptions and inspection questions can be combined to obtain the input question.
[0090] Among them, the process of matching the sub-text description with the inspection question can specifically include: extracting features from each sub-text description to obtain sub-text features; extracting features from each inspection question to obtain inspection question features; combining each sub-text feature and each inspection question feature to perform similarity comparison, finding a combination of sub-text features and inspection question features with a similarity greater than or equal to a set threshold, and determining that the sub-text description and inspection question corresponding to the combination are successfully matched. The threshold set for matching here can be set according to actual needs and can be adjusted in real time during the system inspection process. For example, when the target answer output by the large language model in the subsequent scenario has a high false alarm rate due to a high false detection rate, the set threshold can be increased, which may lead to more matching failures and reduce input problems, but can improve the accuracy of the answers to the input questions.
[0091] By pre-matching sub-text descriptions and inspection questions, irrelevant text descriptions and inspection questions can be excluded in advance. There is no need to combine them into input questions and send them to the scene large language model for processing. This can simplify the processing of the large language model and improve the system processing efficiency.
[0092] When the text description and the inspection question are combined into an input question, all sub-text descriptions may be concatenated into one text description, and then the concatenated text description is combined with each of the inspection questions to obtain the input question.
[0093] Step 206: Use the scenario-based large language model to process the input question and obtain the target answer.
[0094] The training of step 202 generates a scenario-based large language model for comprehensive inspection item checking and open event recognition. In this step, the input question is fed into the scenario-based large language model for processing. The scenario-based large language model analyzes the text description of the input question, determines whether it corresponds to the conditions specified in the inspection question, and generates the corresponding target answer.
[0095] For example, the question "A red rag is placed in the cooked food area. How do you determine if there is cross-contamination in the kitchen?" is input into the large language model for the kitchen scenario. Since the large language model has learned the artificial rules set in advance for the kitchen scenario, such as "a red rag cannot be placed in the cooked food area," it can determine that this is a violation of the pollution rules based on the description and output the corresponding target answer.
[0096] Step 207: Report the problem and provide a reminder based on the target answer.
[0097] So far, Figure 2 The process of the intelligent store inspection method in the specific embodiment shown is ended. Through the above method, using the scene visual inspection model that can realize comprehensive element detection and the multi-level and comprehensive text description output by the multi-model model, the inspection items that can be observed based on video or image can be detected by the above method. Figure 2 The illustrated method eliminates the workload of training separate detection models and developing corresponding detection rules for different inspection items, enabling efficient development and deployment, and achieving efficient and high-precision intelligent inspections in specific scenarios. Furthermore, by leveraging the general knowledge of the scenario-specific large language model and learning the rules and regulations of specific scenarios, it can implement inspections for open-ended issues.
[0098] The above is a specific implementation of the intelligent store inspection method in this application. This application also provides an intelligent store inspection device that can be used to implement the above method. Figure 3 This is a basic structural diagram of the intelligent store patrol device in this application. Figure 3 As shown, the device includes: a multimodal processing unit, a large language model processing unit and a reporting unit.
[0099] The multimodal processing unit is configured to generate a text description corresponding to the current image data using a multimodal model based on the collected current image data;
[0100] The large language model processing unit is used to combine text descriptions and inspection questions into input questions. It then uses the large language model trained for store inspection scenarios to process the input questions and generate the target answers for the input questions.
[0101] A reporting unit, used for reporting and reminding questions based on target answers;
[0102] Among them, the large language model is generated by optimizing the store inspection rules based on the store inspection scenario on the basis of the general large language model. The store inspection rules at least include rules corresponding to open events.
[0103] Optionally, the apparatus further comprises a sub-region image generating unit, configured to generate one or more sub-region images based on the current image data;
[0104] In the multimodal processing unit, the process of generating a text description corresponding to the image data using the multimodal model may specifically include:
[0105] Input the current image data into the multimodal model to generate a global text description corresponding to the current image data;
[0106] Each sub-region image and the image detection result corresponding to the sub-region image are input into the multimodal model to generate a region text description corresponding to the sub-region image.
[0107] Optionally, the device may further include a visual detection unit for performing visual detection on the collected image data using a visual detection model trained and generated for a store inspection scenario to generate an image detection result;
[0108] In the sub-region image generation unit,
[0109] For the current image data, based on the positional relationship between different entities identified in the image detection result, perform positional de-overlapping and merging to generate a sub-region image; and / or,
[0110] In the image frame of the current image data, an image of a fixed area is divided as a sub-area image according to an area division method set by the system; and / or,
[0111] In an image frame of the current image data, an image of a fixed area is divided as a sub-area image according to an area division method determined by interaction with an external input.
[0112] Optionally, the multimodal model is generated by tuning a general multimodal model based on a pre-defined artificial rule region;
[0113] In the multimodal processing unit, the processing of generating a text description corresponding to the current image data using the multimodal model can specifically include: using the tuned multimodal model to process the current image data and image detection results to generate a text description, wherein the text description includes a text description of entities existing in the manually set area.
[0114] Optionally, in the large language model processing unit, when the text description includes multiple sub-text descriptions, the processing of combining the text description and the inspection question into an input question may specifically include:
[0115] When the text description includes multiple sub-text descriptions, each sub-text description is combined with each of all inspection questions to obtain the input question;
[0116] Alternatively, each sub-text description is matched with each inspection question, and the successfully matched sub-text description and inspection question are combined to obtain the input question;
[0117] Alternatively, multiple sub-text descriptions are concatenated into one text description, which is then combined with each of all inspection questions to obtain the input question.
[0118] Optionally, in the large language model processing unit, each subtext description is matched with each inspection question, including:
[0119] Perform feature extraction on each sub-text description to obtain sub-text features;
[0120] Extract features from each inspection problem to obtain inspection problem features;
[0121] The sub-text features and the inspection question features are compared for similarity, and it is determined that the sub-text description and the inspection question corresponding to the sub-text features and the inspection question features whose similarity is greater than or equal to the set threshold are successfully matched.
[0122] Optionally, the confidence of the generated text description can be determined based on the confidence of the image detection result and the confidence of the multimodal model output.
[0123] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor, can execute the steps of the intelligent store patrol method described above. In practical applications, the computer-readable medium can be included in each of the devices / apparatuses / systems described in the above embodiments, or it can exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium stores instructions that, when executed by a processor, can execute the steps of the intelligent store patrol method described above.
[0124] According to the embodiments disclosed herein, a computer-readable storage medium may be a non-volatile computer-readable storage medium, including, but not limited to, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, but this is not intended to limit the scope of protection of this application. In the embodiments disclosed herein, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0125] Figure 4 This application also provides an electronic device. Figure 4 , which shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0126] The electronic device may include a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When the program in the memory 402 is executed, the intelligent store patrol method may be implemented.
[0127] Specifically, in actual applications, the electronic device may further include components such as a power supply 403 and an input / output unit 404. Those skilled in the art will appreciate that Figure 4 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0128] The processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it executes various functions of the server and processes data, thereby monitoring the electronic device as a whole.
[0129] The memory 402 can be used to store software programs and modules, i.e., the computer-readable storage medium mentioned above. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0130] The electronic device also includes a power supply 403 for supplying power to various components. This power supply 403 can be logically connected to the processor 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 403 can also include any of one or more components, such as a DC or AC power supply, a recharging system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0131] The electronic device may further include an input / output unit 404. The input / output unit 404 may be used to receive input digital or character information and generate keyboard, mouse, joystick, or optical signal input related to user settings and function control. The input / output unit 404 may also be used to display information input by the user or information provided to the user, as well as various graphical user interfaces. These graphical user interfaces may be composed of graphics, text, icons, videos, or any combination thereof.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An intelligent store inspection method, characterized in that: include: Based on the collected current image data, a text description corresponding to the current image data is generated using a multimodal model; wherein the multimodal model is generated by tuning a general multimodal model based on a preset artificial rule area, and the tuned multimodal model is used to process the current image data and the image detection result to generate the text description, and the text description is used to describe the existence of an entity in the artificial rule area, and the text description includes a global text description and a regional text description, and the global text description is generated by inputting the current image data into the multimodal model, and the regional text description is generated by inputting each sub-region image generated based on the current image data into the multimodal model; The text description and the inspection question are combined into an input question, and the input question is processed using a scenario-based large language model trained for store inspection scenarios to generate a target answer corresponding to the input question; Reporting and reminding problems based on the target answers; The scene big language model is generated by optimizing the store inspection rules of the store inspection scene on the basis of the general big language model, the store inspection rules at least include rules corresponding to open events, and the manner of generating the sub-region image includes: Using the scene visual detection model generated by training for the store inspection scene, visual detection is performed on the collected current image data to generate the image detection result; and, for the current image data, based on the positional relationship between different entities identified in the image detection result, positional de-overlapping and merging are performed to generate the sub-region image; or, In the image frame of the current image data, according to the area division method set by the system, an image of a fixed area is divided as the sub-area image; or, In the image frame of the current image data, an image of a fixed area is divided as the sub-area image according to an area division method determined by interaction with an external input.
2. The method according to claim 1, characterized in that When the text description includes multiple sub-text descriptions, the step of combining the text description and the inspection question into an input question includes: Combining each of the sub-text descriptions with each of all inspection questions to obtain the input question; or, Match each of the sub-text descriptions with each inspection question, and combine the successfully matched sub-text descriptions and inspection questions to obtain the input question; or, Multiple sub-text descriptions are concatenated into one text description, which is combined with each of all inspection questions to obtain the input question.
3. The method according to claim 2, characterized in that The matching of each sub-text description with each inspection question includes: Performing feature extraction on each of the sub-text descriptions to obtain sub-text features; Extract features from each inspection problem to obtain inspection problem features; The sub-text features and the inspection question features are compared for similarity, and it is determined that the sub-text description and the inspection question corresponding to the sub-text features and the inspection question features whose similarity is greater than or equal to a set threshold are successfully matched.
4. The method according to claim 1, characterized in that: The confidence of generating the text description is determined based on the confidence of the image detection result and the confidence of the multimodal model output.
5. An intelligent store inspection device, characterized in that: include: Multimodal processing unit, large language model processing unit and reporting unit; The multimodal processing unit is used to generate a text description corresponding to the current image data using a multimodal model based on the collected current image data; wherein the multimodal model is generated by tuning a general multimodal model based on a preset artificial rule area, and the tuned multimodal model is used to process the current image data and the image detection result to generate the text description, and the text description is used to describe the existence of an entity in the artificial rule area, and the text description includes a global text description and a regional text description, and the global text description is generated by inputting the current image data into the multimodal model, and the regional text description is generated by inputting each sub-region image generated based on the current image data into the multimodal model; The large language model processing unit is used to combine the text description and the inspection question into an input question, and use the large language model generated by training for the store inspection scenario to process the input question and generate a target answer corresponding to the input question; The reporting unit is used to report and remind questions based on the target answer; The large language model is generated by optimizing the store inspection rules of the store inspection scenario on the basis of a general large language model, the store inspection rules at least include rules corresponding to open events, and the manner of generating the sub-region image includes: Using the scene visual detection model generated by training for the store inspection scene, visual detection is performed on the collected current image data to generate the image detection result; and, for the current image data, based on the positional relationship between different entities identified in the image detection result, positional de-overlapping and merging are performed to generate the sub-region image; or, In the image frame of the current image data, according to the area division method set by the system, an image of a fixed area is divided as the sub-area image; or, In the image frame of the current image data, an image of a fixed area is divided as the sub-area image according to an area division method determined by interaction with an external input.
6. The device according to claim 5, characterized in that When the text description includes a plurality of sub-text descriptions, in the large language model processing unit, the step of combining the text description and the inspection question into an input question includes: Combining each of the sub-text descriptions with each of all inspection questions to obtain the input question; or, Match each of the sub-text descriptions with each inspection question, and combine the successfully matched sub-text descriptions and inspection questions to obtain the input question; or, Multiple sub-text descriptions are concatenated into one text description, which is combined with each of all inspection questions to obtain the input question.
7. The device according to claim 6, characterized in that In the large language model processing unit, matching each of the sub-text descriptions with each inspection question includes: Performing feature extraction on each of the sub-text descriptions to obtain sub-text features; Extract features from each inspection problem to obtain inspection problem features; The sub-text features and the inspection question features are compared for similarity, and it is determined that the sub-text description and the inspection question corresponding to the sub-text features and the inspection question features whose similarity is greater than or equal to a set threshold are successfully matched.
8. The device according to claim 5, characterized in that The confidence of generating the text description is determined based on the confidence of the image detection result and the confidence of the multimodal model output.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by the processor, the intelligent store patrol method described in any one of claims 1 to 4 can be implemented.
10. An electronic device, characterized in that: The electronic device includes at least a computer-readable storage medium and also includes a processor; The processor is used to read executable instructions from the computer-readable storage medium and execute the instructions to implement the intelligent store patrol method described in any one of claims 1 to 4.
