Search

CN-121997960-A - Graphic code detection method, apparatus and computer readable storage medium

CN121997960ACN 121997960 ACN121997960 ACN 121997960ACN-121997960-A

Abstract

The embodiment of the application provides a graphic detection method, equipment and a computer readable storage medium, which can comprise the steps of obtaining a first picture containing at least one graphic code, inputting the first picture into a target detection model to obtain a detection result of the at least one graphic code in the first picture, wherein the target detection model adopts a lightweight network structure, the detection result comprises coordinates and decoding results of the at least one graphic code in the first picture, and outputting the detection result. Thus, a plurality of graphic codes can be identified quickly and effectively at the same time.

Inventors

  • LI YUE

Assignees

  • 中兴通讯股份有限公司

Dates

Publication Date
20260508
Application Date
20241106

Claims (12)

  1. 1. A method for detecting a graphic code, the method comprising: acquiring a first picture containing at least one graphic code; Inputting the first picture into a target detection model to obtain a detection result of the at least one graphic code in the first picture, wherein the target detection model adopts a lightweight network structure, and the detection result comprises coordinates and decoding results of the at least one graphic code in the first picture; And outputting the detection result.
  2. 2. The method of claim 1, wherein the object detection model is YOLO V7, and the YOLO V7 employs a back backbone network that is lightweight ShuffleNet.
  3. 3. The method of claim 1, wherein the training data of the object detection model comprises a plurality of first sample pictures, the first sample pictures including at least one graphic code located in a non-planar position.
  4. 4. The method of claim 3, wherein the training data further comprises a plurality of second sample pictures, the second sample pictures comprising at least two graphics codes that are non-planar and satisfy a first condition, wherein the first condition comprises at least one of: At least one pair of the at least two graphic codes is overlapped; at least one pair of the at least two graphic codes is repeated.
  5. 5. The method of claim 4, wherein each of the first sample picture and the second sample picture comprises a plurality of regularly arranged graphics codes that are non-planar.
  6. 6. The method of any one of claims 1, wherein prior to inputting the first picture into a target detection model, the method further comprises: The first picture is preprocessed, wherein the preprocessing includes at least one of format conversion, compression, sharpening, and enhancement.
  7. 7. The method according to any one of claims 1-6, wherein inputting the first picture into a target detection model to obtain a detection result of the at least one graphic code in the first picture includes: cutting the first picture through the target detection model to obtain the coordinates of each graphic code in the first picture; And detecting the graphic code of the cut first picture through the target detection model to obtain the decoding result of the at least one graphic code in the first picture.
  8. 8. The method according to any one of claims 1-6, further comprising: re-acquiring a second picture containing the first graphic code under the condition that the first graphic code with the identification error exists in the detection result; and inputting the second picture into the target detection model to obtain a detection result of the first graphic code in the second picture.
  9. 9. The method according to any one of claims 1-6, wherein said obtaining a first picture comprising at least one graphic code comprises: Adjusting a shooting light source in response to an operation of a target button in an image shooting interface, wherein the target button comprises one of a first button and a second button, the first button is a light source adjustment strategy trigger button set for an outdoor shooting environment, and the second button is a light source adjustment strategy trigger button set for an indoor shooting environment; And responding to the operation of a shooting button in the image shooting interface, and shooting to obtain a first picture containing at least one graphic code.
  10. 10. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 9.
  11. 11. A computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of any of claims 1 to 9.
  12. 12. A computer program product comprising instructions which, when executed by a computer, performs the method of any of claims 1 to 9.

Description

Graphic code detection method, apparatus and computer readable storage medium Technical Field This document relates to the field of terminals, and in particular, to a method, apparatus, and computer-readable storage medium for detecting a graphic code. Background With the popularity of mobile terminals, people can scan and recognize various graphic codes through their own mobile terminals. However, the existing graphic code detection technology generally can only identify a single graphic code at the same time, and for the identification of a plurality of graphic codes, the situation that the identification equipment is stuck or cannot identify easily occurs, and the identification efficiency is low. Disclosure of Invention The embodiment of the application provides a graphic code detection method, graphic code detection equipment and a computer readable storage medium, which are used for solving the problem that the conventional graphic code detection technology cannot effectively identify a plurality of graphic codes. In order to solve the technical problems, the embodiment of the application is realized as follows: In a first aspect, a method for detecting a graphic code is provided, the method comprising: acquiring a first picture containing at least one graphic code; Inputting the first picture into a target detection model to obtain a detection result of the at least one graphic code in the first picture, wherein the target detection model adopts a lightweight network structure, and the detection result comprises coordinates and decoding results of the at least one graphic code in the first picture; And outputting the detection result. In a second aspect, there is provided an electronic device comprising: A processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method according to the first aspect. In a third aspect, there is provided a computer readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the method of the first aspect. In the embodiment of the application, when at least one graphic code on the first picture is carried out, the used target detection model adopts a lightweight network structure, so that the method has the advantages of less required calculation resources, friendly identification equipment and no situation that the identification equipment is blocked or cannot be identified in the identification process, and therefore, a plurality of graphic codes can be simultaneously, rapidly and effectively identified. Drawings In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art. Fig. 1 is a flowchart of a graphic code detection method according to an embodiment of the present application. Fig. 2 is a schematic view of a shooting interface of a mobile terminal according to the present application, where the shooting interface is used for shooting a first picture including at least one graphic code located on a non-plane. Fig. 3 is a schematic structural view of an electronic device according to an embodiment of the present application. Fig. 4 is a schematic structural diagram of a graphic code detection device according to an embodiment of the present application. Detailed Description In order that those skilled in the art will better understand the technical solutions of the embodiments of the present application, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in one or more embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without creative efforts, shall fall within the protection scope of this document. The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the application may be practiced otherwise than as specifically illustrated or described herein. Furthermore, in the present application and in the claims, "and/or" means at least one of the connected objects, and the character "/" generally means that the as