Pesticide packing material identification method and system and intelligent terminal
Through the design management module, the pesticide packaging design pictures are automatically reviewed, which solves the problem of low recognition efficiency of pesticide packaging materials in the existing technology, and achieves a more efficient and accurate identification process.
Patent Information
- Application Number
- CN202510467433.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-05-13
AI Technical Summary
The identification efficiency of pesticide packaging materials in the prior art is low, and manual comparison of registration data is required, resulting in low efficiency.
Through the design management module, the pesticide packaging design pictures are automatically reviewed, including character recognition and layout detection, the packaging picture review results are generated, and the results are updated or fed back to users.
It improves the efficiency and accuracy of pesticide packaging materials identification, reduces the need for manual comparison of filing data, and improves the automation level of the identification process.
Smart Images

Figure CN119992570A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of packaging identification, and in particular to a method, system and intelligent terminal for identifying pesticide packaging materials. Background Art
[0002] Pesticide packaging material identification refers to confirming the authenticity, standardization and compliance of pesticide packaging design through a series of methods, thereby determining the rationality of pesticide packaging material design.
[0003] In related technologies, after the pesticide packaging material is designed, in order to ensure the accuracy of the information on the pesticide packaging material and the standardization of the design, personnel are usually required to verify the pesticide packaging design pictures. At present, manual identification is the main means of identifying pesticide packaging materials. The pesticide information and manufacturer information on the pesticide packaging material are compared with the registered data to determine the accuracy of the pesticide packaging material. The layout specifications and anti-counterfeiting QR code on the pesticide packaging material are tested to determine the standardization of the pesticide packaging material.
[0004] Regarding the above-mentioned related technologies, the accuracy and standardization of pesticide packaging materials are determined through manual identification. Personnel are required to search for registration data on the corresponding website according to the information on the pesticide packaging materials, and then compare the pesticide information with the registration data to determine the accuracy and standardization of the pesticide packaging materials. This results in low efficiency in pesticide packaging material identification, and there is still room for improvement. Summary of the invention
[0005] In order to improve the recognition efficiency of pesticide packaging materials, the present application provides a pesticide packaging material recognition method, system and intelligent terminal.
[0006] In the first aspect, the present application provides a method for identifying pesticide packaging materials, which adopts the following technical solution: A method for identifying pesticide packaging materials, comprising: Get pictures of pesticide packaging design; Controlling a preset design management module to review the pesticide packaging design picture to determine the packaging picture review result; the design management module includes a character recognition component and a layout detection component; Determine whether the packaging image review results meet the preset review pass requirements; If it meets the requirements, the pesticide packaging design image will be updated and published to the preset design library; If it does not meet the requirements, the packaging image review results will be fed back to the user to modify the pesticide packaging design image until the packaging image review results meet the requirements of the review pass result.
[0007] By adopting the above technical solution, the design management module is controlled to automatically review the pesticide packaging design pictures to obtain the packaging picture review results. When it is determined that the packaging picture review results meet the requirements of the review results, the pesticide packaging design pictures are directly updated and published. If they do not meet the requirements, they are fed back to the personnel for modification, without the need for personnel to find the corresponding registered data for one-to-one comparison, thereby improving the recognition efficiency of pesticide packaging materials.
[0008] Optionally, the steps of controlling the preset design management module to review the pesticide packaging design pictures to determine the packaging picture review result include: Controlling the layout detection component to detect the pesticide packaging design image to determine the layout detection result; Controlling the character recognition component to detect the pesticide packaging design image to determine the extracted characters; Compare the extracted characters with the preset filing database to determine the character recognition results; The layout detection results and character recognition results are associated to generate packaging image review results.
[0009] By adopting the above technical solution, the layout detection component is controlled to detect the pesticide packaging design image to obtain the layout detection result, the character recognition component is controlled to extract characters from the pesticide packaging design image to obtain extracted characters, and the extracted characters are compared with the filing database to obtain the character recognition result, so as to associate the layout detection result and the character recognition result to obtain the packaging image review result, thereby improving the accuracy of packaging material recognition.
[0010] Optionally, the step of controlling the character recognition component to detect the pesticide packaging design image to determine the extraction of characters includes: Analyze pesticide packaging design images to determine input image samples; Inputting the input image sample into multiple models in the character recognition component for recognition to determine the recognized character content and the corresponding confidence score; Get the model weights corresponding to multiple models in the character recognition component; analyzing the confidence scores and model weights to determine a calibration confidence score; The calibration confidence scores and the corresponding recognized character content are analyzed to determine the extracted characters.
[0011] By adopting the above technical solution, multiple models are controlled to recognize the input image samples, the recognized character content and confidence score are obtained, and then the confidence score is calibrated according to the model weight of the model. The calibrated confidence score and the recognized character content are used to determine the extracted characters, thereby improving the accuracy of character recognition.
[0012] Optionally, the steps of analyzing the pesticide packaging design image to determine the input image sample include: Control the preset image enhancement model to perform style transfer processing on the pesticide packaging design image to generate an enhanced image of the pesticide packaging; Controlling a preset font conversion model to perform font conversion on the pesticide packaging design image to generate a pesticide packaging composite image; Associate the pesticide package design image, the pesticide package enhancement image, and the pesticide package synthesis image to generate input image samples.
[0013] By adopting the above technical solution, the image enhancement model is controlled to perform style transfer processing on the pesticide packaging design picture, and the font conversion model is controlled to perform font conversion on the pesticide packaging design picture, thereby improving the accuracy of character recognition.
[0014] Optionally, the step of analyzing the calibration confidence score and the corresponding recognized character content to determine the extracted character includes: Determine whether the calibration confidence score meets the requirements of a preset confidence threshold; If it does not match, the content of the incorrectly recognized characters is obtained and removed; If it matches, then obtain the matching confidence score and the corresponding comparison recognition character content; Sorting the matching confidence scores and comparing the recognized character contents to determine the output character contents; Control the preset language model to evaluate the output character content to determine the probability of character occurrence; Determine whether the probability of occurrence of the character meets the requirements of the preset probability threshold; If it matches, the output character content is defined as the extracted character; If not, the output character content is modified to determine the extracted characters.
[0015] By adopting the above technical solution, the calibration confidence scores and corresponding character contents that are lower than the confidence threshold are eliminated, thereby reducing the amount of data for subsequent comparison. The output character contents are then selected after sorting the confidence scores, and the speech model is controlled to evaluate the output character contents. When it is determined that the probability of character occurrence meets the requirements of the probability threshold, the output character content is determined to be the extracted character. Otherwise, the output character content is corrected, thereby improving the accuracy of the extracted characters.
[0016] Optionally, the step of controlling the layout detection component to detect the pesticide packaging design image to determine the layout detection result includes: Perform image preprocessing on the pesticide packaging design to generate a standard inspection image; Control the preset element detection model to recognize the standard detection image to output the detection elements and the corresponding bounding box coordinates; Analyze the detected elements and the corresponding bounding box coordinates to determine element-level detection parameters; Perform region segmentation on the standard detection image based on the detection elements and the corresponding bounding box coordinates to generate independent regions; Analyze individual regions to determine region-level detection parameters; The preset rule engine is controlled to perform analysis based on element-level detection parameters and area-level detection parameters to generate layout detection results.
[0017] By adopting the above technical scheme, the control element detection model obtains the detection elements and bounding box coordinates after identifying the standard detection image, and divides the standard detection image into regions according to the detection elements and bounding box coordinates to obtain independent regions, thereby making layout detection more targeted. The control rule engine generates layout detection results after analysis based on the element-level detection parameters and the region-level detection parameters, thereby improving the accuracy of layout detection.
[0018] Optionally, the step of controlling a preset rule engine to perform analysis according to element-level detection parameters and region-level detection parameters to generate a layout detection result includes: Get rule standard relations; Determine element comparison rules based on element-level detection parameters and rule-standard relationships; Analyze element-level detection parameters according to element comparison rules to determine element detection results; Determine regional comparison rules based on regional level detection parameters and rule standard relationships; Analyze the regional level detection parameters according to the regional comparison rules to determine the regional detection results; The element detection results and the region detection results are associated to generate a layout detection result.
[0019] By adopting the above technical scheme, element comparison rules are determined according to element-level detection parameters and rule-standard relationships, and regional comparison rules are determined according to regional-level detection parameters and rule-standard relationships. Then, the element-level detection parameters and regional-level detection parameters are analyzed according to the element comparison rules and regional comparison rules, respectively, thereby improving the efficiency and accuracy of determining layout detection results.
[0020] Optionally, the steps of obtaining the rule standard relationship include: Get the rule update file; Analyze the rule update file and the preset historical rule file to determine whether there are any changed rules; If there is no change rule, the rule standard relationship is directly called; If there is a change rule, the rule standard relationship is updated according to the change rule to generate a new rule standard relationship.
[0021] By adopting the above technical solution, when it is determined that there is a change rule, the rule standard relationship is updated according to the change rule to obtain a new rule standard relationship, so that the rule standard of the evaluation layout can meet the required standard, thereby improving the accuracy of layout detection.
[0022] In the second aspect, the present application provides a pesticide packaging material identification system, which adopts the following technical solution: A pesticide packaging material identification system, comprising: An acquisition module is used to obtain pesticide packaging design pictures; A memory for storing a program of a pesticide packaging material identification method as described in any one of the above items; The program in the processor memory can be loaded and executed by the processor to implement a pesticide packaging material identification method as described in any one of the above items.
[0023] By adopting the above technical solution, the processor loads and executes a program of a pesticide packaging material identification method stored in the memory, and controls the acquisition module to obtain a series of data related to the identification of pesticide packaging materials, thereby controlling the design management module to automatically review the pesticide packaging design pictures to obtain the packaging picture review results. When it is determined that the packaging picture review results meet the requirements of the review pass result, the pesticide packaging design pictures are directly updated and published. If they do not meet the requirements, they are fed back to the personnel for modification, without the need for the personnel to find the corresponding registered data for one-to-one comparison, thereby improving the recognition efficiency of pesticide packaging materials.
[0024] In a third aspect, the present application provides a smart terminal, which adopts the following technical solution: An intelligent terminal comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes a pesticide packaging material identification method as described in any one of the above items.
[0025] By adopting the above technical solution, by controlling the intelligent terminal, the processor is made to load and execute a computer program of a pesticide packaging material identification method stored in the memory, thereby controlling the design management module to automatically review the pesticide packaging design picture to obtain the packaging picture review result. When it is determined that the packaging picture review result meets the requirements of the review result, the pesticide packaging design picture is directly updated and published. If it does not meet the requirements, it is fed back to the personnel for modification, without the need for the personnel to find the corresponding filing data for one-to-one comparison, thereby improving the recognition efficiency of pesticide packaging materials.
[0026] In summary, the present application includes at least one of the following beneficial technical effects: 1. Automatically review the pesticide packaging design pictures through the control design management module to obtain the packaging picture review results. When it is determined that the packaging picture review results meet the requirements of the review results, the pesticide packaging design pictures are directly updated and released. If they do not meet the requirements, they are fed back to the personnel for modification, without the need for personnel to search for the corresponding filing data for one-to-one comparison, thereby improving the recognition efficiency of pesticide packaging materials; 2. By controlling multiple models to recognize the input image samples, the recognized character content and confidence score are obtained, and then the confidence score is calibrated according to the model weight of the model, and the extracted characters are determined based on the calibrated confidence score and the recognized character content, thereby improving the accuracy of character recognition; 3. The control element detection model is used to identify the standard detection image to obtain the detection elements and bounding box coordinates, and the standard detection image is segmented according to the detection elements and bounding box coordinates to obtain independent areas, making the layout detection more targeted. The control rule engine generates the layout detection results after analyzing the element-level detection parameters and the area-level detection parameters, thereby improving the accuracy of layout detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart of a method for identifying pesticide packaging materials in an embodiment of the present application.
[0028] Figure 2 It is a flowchart of the steps of controlling a preset design management module in an embodiment of the present application to review pesticide packaging design pictures to determine the packaging picture review results.
[0029] Figure 3 This is a flowchart of the steps of controlling the character recognition component to detect the pesticide packaging design image in an embodiment of the present application to determine the extraction of characters.
[0030] Figure 4 It is a flowchart of the steps of analyzing the pesticide packaging design picture to determine the input picture sample in the embodiment of the present application.
[0031] Figure 5 It is a flowchart of the steps of analyzing the calibration confidence score and the corresponding recognized character content to determine the extraction of characters in an embodiment of the present application.
[0032] Figure 6 It is a flowchart of the steps of controlling the layout detection component in the embodiment of the present application to detect the pesticide packaging design picture to determine the layout detection result.
[0033] Figure 7 It is a flowchart of the steps of controlling a preset rule engine in an embodiment of the present application to perform analysis based on element-level detection parameters and region-level detection parameters to generate layout detection results.
[0034] Figure 8 It is a flowchart of the steps of obtaining the rule standard relationship in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figures 1 to 8 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0036] The embodiment of the present application discloses a method for identifying pesticide packaging materials, and specifically discloses an identification platform. After a person uploads a pesticide packaging design picture to the identification platform, a design management module reviews the pesticide packaging design picture to obtain a packaging picture review result. When the identification platform determines that the packaging picture review result meets the requirements of the review pass result, it indicates that the pesticide packaging design picture meets the industry design standards and specifications. Therefore, the identification platform updates and publishes the pesticide packaging design picture to the design library. When the identification platform determines that the packaging picture review result does not meet the requirements of the review pass result, the packaging picture review result is fed back to the user, so that the user can modify the pesticide packaging design picture until the modified pesticide packaging design picture passes the review. Compared with the person looking up the filing information according to the pesticide information and then making a one-to-one correspondence, the automatic review of the identification platform greatly improves the recognition efficiency of pesticide packaging materials.
[0037] Reference Figure 1 The present application embodiment discloses a method for identifying pesticide packaging materials, comprising the following steps: Step S100: Obtain pesticide packaging design pictures.
[0038] Among them, the pesticide packaging design picture refers to the pesticide picture uploaded by the user to the identification platform that needs to be packaged for identification, including toxicity logo, agricultural registration certificate number, pesticide information and other parameters. After the user completes the packaging design, the pesticide packaging design picture is uploaded to the identification platform.
[0039] Step S101: controlling a preset design management module to review the pesticide packaging design image to determine the packaging image review result; the design management module includes a character recognition component and a layout detection component.
[0040] Among them, after the recognition platform receives the pesticide packaging design picture, the recognition platform controls the design management module to review the pesticide packaging design picture, thereby determining the packaging picture review result. The specific method is referred to Figure 2 The steps are to provide data support for the subsequent determination of whether pesticide packaging design images can be released.
[0041] The design management module refers to a module used to review whether the information and layout of the pesticide packaging design picture are accurate and reasonable, including a character recognition component, which is used to recognize the character information in the pesticide packaging design picture, thereby comparing the character information with the registered information to determine whether the pesticide information on the pesticide packaging design picture is accurate. It also includes a layout detection component, which is used to detect whether the size of the toxicity mark and the QR code is qualified and whether there is any overlap between elements.
[0042] The packaging image review result refers to the review result of the pesticide packaging design image, including all passed and failed reviews. The packaging image review result is obtained by listing the comparison items one by one, marking the passed items with a passed mark, and marking the failed items with a failed mark.
[0043] Step S102: Determine whether the packaging image review result meets the preset review pass result requirements.
[0044] Among them, the review result means that the review result of the pesticide packaging design image is passed, and the review result requirement means that it is consistent with the review result.
[0045] The recognition platform is used to determine whether the packaging image review results are consistent with the review results, thereby determining whether the pesticide information and layout on the pesticide packaging design image are accurate and reasonable.
[0046] Step S1021: If it is in compliance, the pesticide packaging design image is updated and published to the preset design library.
[0047] If the recognition platform determines that the packaging image review result is consistent with the review result, it means that the pesticide information and layout information on the pesticide packaging design image are accurate and reasonable. Therefore, the recognition platform can directly update the pesticide packaging design image and publish it to the design library. The design library refers to a database used to store qualified pesticide packaging design images.
[0048] Step S1022: If not, the packaging image review result is fed back to the user so that the pesticide packaging design image can be modified until the packaging image review result meets the requirements of the review pass result.
[0049] Among them, if the recognition platform determines that the packaging image review result is inconsistent with the review pass result, it means that there are inaccurate and unreasonable items in the pesticide information and layout information on the pesticide packaging design picture. Therefore, the recognition platform will feedback the packaging image review result to the user, and the user will modify the pesticide packaging design picture according to the packaging image review result, so that the packaging image review result of the modified pesticide packaging design picture meets the requirements of the review pass result.
[0050] Reference Figure 2, the steps of controlling the preset design management module to review the pesticide packaging design pictures to determine the packaging picture review results include: Step S200: Control the layout detection component to detect the pesticide packaging design image to determine the layout detection result.
[0051] The layout detection result refers to the detection result of the layout on the pesticide packaging design image, such as the distance between elements, element size, safety margin and other information. It is determined by the layout detection component after detecting the pesticide packaging design image. For specific methods, refer to Figure 6 steps.
[0052] Step S201: Control the character recognition component to detect the pesticide packaging design image to determine the extracted characters.
[0053] The extracted characters refer to the character information extracted from the pesticide packaging design picture, including the active ingredients, content, usage, precautions and registration number of the pesticide, which are obtained by the character recognition component after recognizing the character information on the pesticide packaging design picture. For specific methods, refer to Figure 3 steps.
[0054] Step S202: Compare the extracted characters with a preset filing database to determine the character recognition result.
[0055] Among them, the registration database refers to the information of pesticides registered on the official website. The operator extracts the registration data from the official website and stores it in the database to form a registration database.
[0056] The character recognition result refers to the recognition result of the character information on the pesticide packaging design picture. The specific comparison process is: first, the Sentence-BERT model is used to generate a text semantic vector, and then the text information in the registration database that does not match the pesticide packaging design picture is filtered out through hash tables and indexing technology, and cosine similarity is finely matched. The text consistency is determined by setting a threshold, and finally, the key fields are forced to be accurately matched. For example, the pesticide name is compared with the rule of full-word matching plus alias library, the ingredient content is compared with the rule of absolute numerical consistency, and the registration certificate number is verified by regular expression. After comparison, the consistent and inconsistent character information are listed and marked one by one to form the character recognition result.
[0057] Step S203: Associating the layout detection result and the character recognition result to generate a packaging image review result.
[0058] The packaging image review result in this step is consistent with the packaging image review result in step S101, and is obtained by integrating the layout detection result and the character recognition result into one table by the recognition platform.
[0059] Reference Figure 3 , the steps of controlling the character recognition component to detect the pesticide packaging design image to determine the extracted characters include: Step S300: Analyze the pesticide packaging design image to determine the input image sample.
[0060] The input image sample refers to the image input to the character recognition component for recognition. It is obtained by performing style transfer processing and special font replacement on the pesticide packaging design image by the recognition platform. For specific methods, refer to Figure 4 steps.
[0061] Step S301: Input the input image sample into multiple models in the character recognition component for recognition to determine the recognized character content and the corresponding confidence score.
[0062] Among them, the recognized character content refers to the specific characters recognized, such as toxicity marks, registration certificate numbers and other characters. The confidence score refers to a quantitative indicator to measure the certainty of the recognized character content. After the recognition platform obtains the input image sample, the input image sample is input into the character recognition component, so that the multiple models in the character recognition component can respectively recognize the input image sample to obtain the recognized character content and the corresponding confidence score.
[0063] The multiple models in the character recognition component refer to the multiple models used in the character recognition process. PaddleOCR, Tesseract and EasyOCR are used in the embodiment of the present application. After the characters are recognized, a weighted voting strategy is used to determine the character content, thereby improving the recognition accuracy.
[0064] Step S302: Obtain model weights corresponding to multiple models in the character recognition component.
[0065] The model weight refers to the weight of the model in terms of the accuracy of character recognition, which is determined by the operator based on the historical accuracy of multiple models. The higher the accuracy, the higher the model weight. For example, if the accuracy of PaddleOCR is 85%, the accuracy of Tesseract is 75%, and the accuracy of EasyOCR is 80%, then the weight of PaddleOCR is 0.4, the weight of Tesseract is 0.3, and the weight of EasyOCR is 0.3.
[0066] Step S303: Analyze the confidence score and the model weight to determine a calibration confidence score.
[0067] Among them, the calibration confidence score refers to the confidence score obtained after calibrating the confidence score according to the model weight. For example, for the toxicity mark, PaddleOCR identifies it as highly toxic with a confidence score of 0.92, Tesseract0.85 identifies it as highly toxic with a confidence score of 0.85, and EasyOCR identifies it as highly toxic with a confidence score of 0.88. The calibration confidence corresponding to highly toxic is the weighted sum of the weight and the confidence score, which is 0.89, while that for highly toxic is 0.225.
[0068] Step S304: Analyze the calibration confidence score and the corresponding recognized character content to determine the extracted characters.
[0069] The extracted characters in this step are consistent with the extracted characters in step S201, and are determined by the recognition platform after comparing the calibration confidence score with the corresponding recognized character content. The specific method is as follows: Figure 5 steps.
[0070] Reference Figure 4 , the steps of analyzing the pesticide packaging design images to determine the input image samples include: Step S400: controlling a preset image enhancement model to perform style transfer processing on the pesticide packaging design image to generate a pesticide packaging enhanced image.
[0071] Among them, pesticide packaging enhanced images refer to pesticide packaging images that have undergone style transfer processing. The image enhancement model performs style transfer on the pesticide packaging design images to generate 10 to 20 variant images, thereby simulating different materials or background colors and noise, etc., covering various possible environments and conditions, and ensuring the performance stability of the character recognition component when facing different scenarios.
[0072] The image enhancement model refers to a model for style transfer of pesticide packaging images. In the embodiment of the present application, a pre-trained CycleGAN model is used. CycleGAN is an unsupervised generative adversarial network that can realize image conversion between different styles.
[0073] Step S401: controlling a preset font conversion model to perform font conversion on a pesticide packaging design image to generate a pesticide packaging composite image.
[0074] Among them, the pesticide packaging composite image refers to an image after the special fonts on the pesticide packaging design image are converted into standard fonts. The font conversion model analyzes the text style in the pesticide packaging design image, and converts artistic fonts (such as calligraphy fonts, gradient effects) into a composite image of standard fonts (such as Songti, Heiti), so that it is easy to be recognized by the character recognition component.
[0075] The font conversion model refers to a model used to convert special fonts in pesticide packaging design images. FontGAN is used in the embodiment of the present application. FontGAN is a generative adversarial network specifically used for font style transfer. It can convert artistic fonts (such as calligraphy fonts, gradient effects) into synthetic images of standard fonts (such as Songti, Heiti).
[0076] Step S402: Associating the pesticide packaging design picture, the pesticide packaging enhanced picture and the pesticide packaging composite picture to generate an input picture sample.
[0077] Among them, the input image sample in this step is consistent with the input image sample in step S300. The recognition platform stores the pesticide packaging design image, the pesticide packaging enhanced image and the pesticide packaging composite image in the same data packet, thereby improving the recognition accuracy and adaptability of the model in the character recognition component.
[0078] Reference Figure 5 , analyzing the calibration confidence score and the corresponding recognized character content to determine that the steps of extracting the character include: Step S500: Determine whether the calibration confidence score meets the requirement of a preset confidence threshold.
[0079] The confidence threshold refers to the lowest confidence score for character content to be selected, and the specific value is determined by the operator according to actual conditions. The requirement for the confidence threshold is that it should not be lower than the confidence threshold.
[0080] The recognition platform determines whether the calibration confidence score is not lower than the confidence threshold, thereby determining whether the character corresponding to the calibration confidence score is a selectable character.
[0081] Step S501: If not, the incorrectly recognized character content is obtained and removed.
[0082] Among them, if the recognition platform determines that the calibration confidence score is lower than the confidence threshold, it means that the calibration confidence score is low and the corresponding character content certainty is low, so the character content is defined as an incorrectly recognized character and is removed.
[0083] An incorrectly recognized character refers to a character that is incorrectly recognized by a model in a character recognition component, and the recognition platform determines that the recognized character content corresponding to a calibration confidence score that is lower than a confidence threshold is the incorrectly recognized character content.
[0084] Step S502: If it matches, obtain the matching confidence score and the corresponding comparison recognition character content.
[0085] Among them, if the recognition platform determines that the calibration confidence score is not lower than the confidence threshold, it means that the recognition character content corresponding to the calibration confidence score has a high certainty. Therefore, the recognition character content that meets the confidence score and is compared is tested to provide data support for the subsequent determination of the extracted characters.
[0086] The conforming confidence score refers to a calibration confidence score that is not lower than the confidence threshold, which is determined by the recognition platform after comparing the calibration confidence score and the confidence threshold. The comparative recognition character content refers to the recognition character content that can be compared in confidence scores, which is obtained by the recognition platform calling the recognition character content corresponding to the conforming confidence score.
[0087] Step S503: sorting the matching confidence scores and the compared recognized character contents to determine the output character contents.
[0088] Among them, the output character content refers to the recognized characters output by the recognition character component. The recognition platform sorts the compliance confidence scores of the same recognition project from large to small, thereby selecting the largest compliance confidence score, and calling the comparison recognition character content corresponding to the largest compliance confidence score to obtain the output character content.
[0089] Step S504: controlling a preset language model to evaluate the output character content to determine the probability of character occurrence.
[0090] Among them, the probability of character occurrence refers to the probability of the character content appearing in the field of pesticide packaging materials, which is determined by the language model after evaluating the output character content. The specific process is: decompose the output character content into n-gram units (such as words or characters), for example: "enemy kill" is decomposed into "enemy", "kill" or "enemy kill", "die", and then calculate the conditional probability of each n-gram, for example: P("enemy kill") = P("enemy")×P("kill"|"enemy")×P("die"|"enemy", "kill"), and finally summarize the probabilities of all n-grams to obtain the probability of the output character content.
[0091] A language model refers to a model used to evaluate character probabilities. In the embodiments of the present application, an N-gram language model specially trained for a specific field, such as pesticide packaging materials, is used.
[0092] Step S505: determining whether the probability of occurrence of the character meets the requirement of a preset probability threshold.
[0093] The probability threshold refers to the minimum probability that the character will appear in the field of pesticide packaging materials. The specific value is determined by the operator based on actual conditions. The requirement for the probability threshold is that it should not be lower than the probability threshold.
[0094] Determine whether the probability of a character appearance is not lower than the probability threshold through the recognition platform, so as to determine whether the character recognized by the model may appear in the field of pesticide packaging materials.
[0095] Step S5051: If it meets the requirement, define the output character content as the extracted character.
[0096] Among them, if the recognition platform determines that the probability of a character appearance is not lower than the probability threshold, it indicates that the probability of the character recognized by the model appearing in the field of pesticide packaging materials is relatively high. Therefore, it is only necessary to define the output character content as the extracted character.
[0097] Step S5052: If it does not meet the requirement, correct the output character content to determine the extracted character.
[0098] Among them, if the recognition platform determines that the probability of a character appearance is lower than the probability threshold, it indicates that the probability of the character content recognized by the model appearing in the field of pesticide packaging materials is relatively low. Therefore, consider its adjacent text based on the output character content, so as to find a more reasonable replacement scheme to determine the extracted character. For example, "Disha Si" does not conform to the common pattern, while "Dishasi" is a high-probability and logically correct term. Therefore, replace "Disha Si" with "Dishasi" to obtain the extracted character.
[0099] Refer to Figure 6 , the steps of controlling the layout detection component to detect the pesticide packaging design picture to determine the layout detection result include: Step S600: Perform image preprocessing on the pesticide packaging design drawing to generate a standard detection image.
[0100] Among them, the standard detection image refers to the image for layout detection. First, convert the pesticide packaging design drawing into a grayscale image, then use Canny edge detection to extract the packaging contour, and finally perform specular reflection suppression on the reflective area (based on HSV color space threshold segmentation) to obtain the standard detection image.
[0101] Step S601: Control the preset element detection model to recognize the standard detection image to output the detected elements and the corresponding bounding box coordinates.
[0102] Among them, the detected elements refer to the layout elements to be detected, such as toxicity signs, registration certificate number areas, ingredient lists, and barcodes, etc. The bounding box coordinates refer to the bounding box coordinates of the detected elements, which are obtained by the element detection model according to the recognition of the standard detection image. For example: barcode area [x1 = 600, y1 = 100, x2 = 700, y2 = 150].
[0103] The element detection model refers to a model used to identify elements and bounding box coordinates in a standard detection image. In the embodiment of the present application, an improved YOLOv8 model is adopted, and a deformable convolutional layer (DCNv2) is introduced in the detection head to enhance the model's perception of targets of different shapes and scales, and the Focal-EIoU loss function is used to optimize small target detection.
[0104] Step S6011: Analyze the detected elements and the corresponding bounding box coordinates to determine element-level detection parameters.
[0105] Among them, the element-level detection parameter refers to the element parameter detected according to the element category. For example, if the detected element is a barcode, the corresponding element-level detection parameter should be the barcode width, which is obtained by converting the bounding box coordinates combined with the resolution coefficient. For example, if the detected element is a toxicity mark, the corresponding element-level detection parameter should be the toxicity mark size, which is first obtained by converting the bounding box coordinates combined with the resolution coefficient, and then calculating the area.
[0106] Step S6012: performing region segmentation on the standard detection image according to the detection elements and the corresponding bounding box coordinates to generate independent regions.
[0107] Among them, the independent area refers to the area divided for the standard detection image, including the text area, pattern area and barcode area. The standard detection image is semantically segmented by U-Net according to the detection elements and the bounding box coordinates, and then the segmentation mask is output to mark each pixel as belonging to the text area, pattern area or barcode area. For example, the text area mask: marks the [x1=50, y1=100, x2=200, y2=150] area, the pattern area mask: marks the [x1=300, y1=50, x2=450, y2=200] area, and the barcode area mask: marks the [x1=600, y1=100, x2=700, y2=150] area.
[0108] Step S60121: Analyze the independent regions to determine region-level detection parameters.
[0109] Among them, the region-level detection parameters refer to the region parameters detected based on the independent region, including the element overlapping area, the safety margin, etc. The element overlapping area is calculated based on the overlapping area of the bounding box coordinates of the independent region, and the safety margin is calculated based on the coordinates of the independent region and the edge combined with the resolution coefficient.
[0110] Step S602: Control the preset rule engine to perform analysis according to the element-level detection parameters and the region-level detection parameters to generate a layout detection result.
[0111] Among them, after the recognition platform obtains the element-level detection parameters and the area-level detection parameters, the recognition platform controls the rule engine to analyze the element-level detection parameters and the area-level detection parameters to generate the layout detection results. The specific method is referred to Figure 7 steps.
[0112] The rule engine refers to a tool that compares element-level detection parameters and area-level detection parameters using comparison rules, and thereby determines the detection results based on the comparison results.
[0113] Reference Figure 7 , the steps of controlling the preset rule engine to analyze according to the element-level detection parameters and the area-level detection parameters to generate the layout detection results include: Step S700: Obtain rule standard relationship.
[0114] The rule-standard relationship refers to the correspondence between different elements or regions and the comparison rules. For specific methods of obtaining it, refer to Figure 8 steps.
[0115] Step S701: Determine element comparison rules according to element-level detection parameters and rule-standard relationships.
[0116] Among them, element comparison rules refer to the comparison rules for determining whether the element-level detection parameters are qualified. The recognition platform searches for the element categories corresponding to the element-level detection parameters in the mapping table corresponding to the rule standard relationship. For example, the size of the toxicity mark should not be less than 40x40mm, and the area of the ingredient list should not be less than 15% of the overall area.
[0117] Step S7011: Analyze the element-level detection parameters according to the element comparison rules to determine the element detection results.
[0118] Among them, the element detection result refers to the result obtained from the element detection on the layout, which is determined by the recognition platform after comparing and analyzing the element-level detection parameters according to the element comparison rules. For example, the element-level detection parameter is that the size of the toxicity mark is 30x30mm, while the element comparison rule is that the size of the toxicity mark should not be less than 40x40mm. Therefore, after analyzing the element-level detection parameters according to the element comparison rules, it is determined that the size of the toxicity mark is insufficient.
[0119] Step S702: Determine the regional comparison rule according to the regional level detection parameter and the rule standard relationship.
[0120] Among them, the regional comparison rule refers to the rule for comparing regional parameters, which is obtained by the recognition platform by searching in the mapping table corresponding to the rule standard relationship according to the regional category corresponding to the regional level detection parameter.
[0121] Step S7021: Analyze the region-level detection parameters according to the region comparison rules to determine the region detection result.
[0122] Among them, the regional detection result refers to the detection result of the layout area, which is determined by the recognition platform after comparing and analyzing the regional-level detection parameters according to the regional comparison rules. For example, the regional-level detection parameter is that the area of the ingredient table area accounts for 10%, while the regional comparison rule is that the area of the ingredient table area accounts for no less than 15%. Therefore, after analyzing the regional-level detection parameters according to the regional comparison rules, it is determined that the regional area is insufficient.
[0123] Step S703: Associating the element detection result and the region detection result to generate a layout detection result.
[0124] The layout detection result in this step is consistent with the layout detection result in step S200, and the recognition platform stores the element detection result and the area detection result in the same table.
[0125] Reference Figure 8 , the steps of obtaining the rule standard relationship include: Step S800: Obtain a rule update file.
[0126] Among them, the rule update file refers to the industry standard file, which can be identified by the identification platform on the official website related to pesticides.
[0127] Step S801: Analyze the rule update file and the preset historical rule file to determine whether there are any changed rules.
[0128] Among them, the historical rule file refers to the previous rule standards, which are backed up by the recognition platform. The recognition platform compares the rule update file with the rule standards in the historical rule file one by one to determine whether the rule standard has changed, and further determine whether there are changed rules, providing data support for the subsequent determination of the rule standard relationship.
[0129] Step S8011: If there is no change rule, directly call the rule standard relationship.
[0130] Among them, if the recognition platform determines that there is no changed rule, it means that the rule standard has not changed, so the original rule standard relationship can be directly called.
[0131] Step S8012: If there is a change rule, the rule-standard relationship is updated according to the change rule to generate a new rule-standard relationship.
[0132] Among them, if the recognition platform determines that there is a change rule, it means that the rule standard has changed and the original rule standard relationship cannot be used, so the rule standard relationship is updated according to the change rule. For example, if the size of the toxicity mark changes, the existing size rule is replaced according to the changed size rule to obtain a new rule standard relationship.
[0133] Based on the same inventive concept, the embodiment of the present application provides a pesticide packaging material identification system, including: The acquisition module is used to obtain the pesticide packaging design image, model weight, misrecognized character content, compliance confidence score, comparative recognition character content, rule standard relationship and rule update file; A memory for storing a program for a method for identifying pesticide packaging materials; The program in the memory can be loaded and executed by the processor to implement a method for identifying pesticide packaging materials.
[0134] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0135] An embodiment of the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed by a method for identifying pesticide packaging materials.
[0136] Computer storage media include, for example, USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks, and other media that can store program codes.
[0137] Based on the same inventive concept, an embodiment of the present application provides an intelligent terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute a method for identifying pesticide packaging materials.
[0138] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0139] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
Claims
1. A method for identifying pesticide packaging materials, characterized in that: include: Get pictures of pesticide packaging design; Control the preset design management module to review the pesticide packaging design pictures to determine the packaging picture review results; The design management module includes a character recognition component and a layout detection component; Determine whether the packaging image review results meet the preset review pass requirements; If it meets the requirements, the pesticide packaging design image will be updated and published to the preset design library; If not, the packaging image review result will be fed back to the user so that the pesticide packaging design image can be modified until the packaging image review result meets the requirements of the review result; The steps of controlling the preset design management module to review the pesticide packaging design pictures to determine the packaging picture review results include: Controlling the layout detection component to detect the pesticide packaging design image to determine the layout detection result; Controlling the character recognition component to detect the pesticide packaging design image to determine the extracted characters; Compare the extracted characters with the preset filing database to determine the character recognition results; The steps of associating the layout detection result and the character recognition result to generate the packaging image review result; and controlling the character recognition component to detect the pesticide packaging design image to determine the extraction of characters include: Analyze pesticide packaging design images to determine input image samples; Inputting the input image sample into multiple models in the character recognition component for recognition to determine the recognized character content and the corresponding confidence score; Get the model weights corresponding to multiple models in the character recognition component; analyzing the confidence scores and model weights to determine a calibration confidence score; The calibration confidence scores and the corresponding recognized character content are analyzed to determine the extracted characters.
2. A method for identifying pesticide packaging materials according to claim 1, characterized in that: The steps of analyzing the pesticide packaging design images to determine the input image samples include: Control the preset image enhancement model to perform style transfer processing on the pesticide packaging design image to generate an enhanced image of the pesticide packaging; Controlling a preset font conversion model to perform font conversion on the pesticide packaging design image to generate a pesticide packaging composite image; Associate the pesticide package design image, the pesticide package enhancement image, and the pesticide package synthesis image to generate input image samples.
3. A method for identifying pesticide packaging materials according to claim 1, characterized in that: The calibration confidence score and the corresponding recognized character content are analyzed to determine that the steps of extracting the character include: Determine whether the calibration confidence score meets the requirements of a preset confidence threshold; If it does not match, the content of the incorrectly recognized characters is obtained and removed; If it matches, then obtain the matching confidence score and the corresponding comparison recognition character content; Sorting the matching confidence scores and comparing the recognized character contents to determine the output character contents; Control the preset language model to evaluate the output character content to determine the probability of character occurrence; Determine whether the probability of occurrence of the character meets the requirements of the preset probability threshold; If it matches, the output character content is defined as the extracted character; If not, the output character content is modified to determine the extracted characters.
4. A method for identifying pesticide packaging materials according to claim 1, characterized in that: The steps of controlling the layout detection component to detect the pesticide packaging design image to determine the layout detection result include: Perform image preprocessing on the pesticide packaging design to generate a standard inspection image; Control the preset element detection model to recognize the standard detection image to output the detection elements and the corresponding bounding box coordinates; Analyze the detected elements and the corresponding bounding box coordinates to determine element-level detection parameters; Perform region segmentation on the standard detection image based on the detection elements and the corresponding bounding box coordinates to generate independent regions; Analyze individual regions to determine region-level detection parameters; The preset rule engine is controlled to perform analysis based on element-level detection parameters and area-level detection parameters to generate layout detection results.
5. A method for identifying pesticide packaging materials according to claim 4, characterized in that: The steps of controlling the preset rule engine to analyze according to the element-level detection parameters and the area-level detection parameters to generate the layout detection result include: Get rule standard relations; Determine element comparison rules based on element-level detection parameters and rule-standard relationships; Analyze element-level detection parameters according to element comparison rules to determine element detection results; Determine regional comparison rules based on regional level detection parameters and rule standard relationships; Analyze the regional level detection parameters according to the regional comparison rules to determine the regional detection results; The element detection results and the region detection results are associated to generate a layout detection result.
6. A method for identifying pesticide packaging materials according to claim 5, characterized in that: The steps to obtain the rule standard relationship include: Get the rule update file; Analyze the rule update file and the preset historical rule file to determine whether there are any changed rules; If there is no change rule, the rule standard relationship is directly called; If there is a change rule, the rule standard relationship is updated according to the change rule to generate a new rule standard relationship.
7. A pesticide packaging material identification system, characterized in that: include: An acquisition module is used to obtain pesticide packaging design pictures; A memory for storing a program of a pesticide packaging material identification method according to any one of claims 1 to 6; The program in the memory can be loaded and executed by the processor to implement a pesticide packaging material identification method as described in any one of claims 1 to 6.
8. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes a method for identifying pesticide packaging materials as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Commodity label information processing method, device, storage medium and system
CN114357178A
Media content automatic detection auditing method and auditing system
CN114385837A
Character recognition method based on stroke extraction
CN115116076A
Pattern printing defect detection method for medicine packaging box
CN119540233A