CN112417918A - Two-dimensional code identification method and device, storage medium and electronic equipment - Google Patents

Two-dimensional code identification method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112417918A
CN112417918A CN202011265665.7A CN202011265665A CN112417918A CN 112417918 A CN112417918 A CN 112417918A CN 202011265665 A CN202011265665 A CN 202011265665A CN 112417918 A CN112417918 A CN 112417918A
Authority
CN
China
Prior art keywords
dimensional code
code image
training
recognition model
preprocessed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011265665.7A
Other languages
Chinese (zh)
Other versions
CN112417918B (en
Inventor
陈家亮
张俊杰
张壮
王子玉
肖向才
张丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011265665.7A priority Critical patent/CN112417918B/en
Publication of CN112417918A publication Critical patent/CN112417918A/en
Application granted granted Critical
Publication of CN112417918B publication Critical patent/CN112417918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The application relates to the technical field of image recognition, in particular to a two-dimension code recognition method, a device, a storage medium and electronic equipment, which solve the problem that in the related art, because the two-dimension code recognition method is easily influenced by illumination conditions, two-dimension code recognition cannot be completed under the condition of weak illumination. The method comprises the following steps: acquiring a two-dimensional code image to be identified; inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result; the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions. The two-dimensional code recognition model is obtained by collecting the two-dimensional code images under different illumination conditions and training in combination with the negative sample, and the recognition rate of the two-dimensional code under the low-light condition is improved.

Description

Two-dimensional code identification method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image recognition technologies, and in particular, to a two-dimensional code recognition method and apparatus, a storage medium, and an electronic device.
Background
Two-dimensional codes, also called two-dimensional bar codes, are an encoding mode which is super popular on mobile equipment in recent years, and can store more information and represent more data types than traditional bar codes. At present, the two-dimension code identification technology has been greatly developed, but still has some problems.
In the existing two-dimension code identification method, a camera shoots and scans a two-dimension code picture to complete identification. However, a general two-dimensional code recognition method is easily affected by lighting conditions, for example, under the condition of weak lighting, the two-dimensional code recognition effect is often not ideal, and sometimes even the two-dimensional code recognition cannot be completed.
Disclosure of Invention
In view of the above problems, the present application provides a two-dimensional code recognition method, an apparatus, a storage medium, and an electronic device, which solve the technical problem in the related art that two-dimensional code recognition cannot be completed under a low-light condition because the two-dimensional code recognition method is susceptible to the influence of the light condition.
In a first aspect, the present application provides a two-dimensional code identification method, where the method includes:
acquiring a two-dimensional code image to be identified;
inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result;
the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions.
Optionally, the inputting the to-be-recognized two-dimensional code image into a two-dimensional code recognition model trained in advance to obtain a recognition result includes:
sending the two-dimensional code image to be identified to a cloud server; the cloud server is deployed with a pre-trained two-dimensional code recognition model;
receiving an identification result fed back by the cloud server; and the recognition result is obtained by inputting the two-dimension code image to be recognized into the pre-trained two-dimension code recognition model by the cloud server.
Optionally, the training process of the two-dimensional code recognition model includes:
acquiring a two-dimensional code image set of a plurality of two-dimensional codes, wherein the two-dimensional code image set comprises two-dimensional code images of each two-dimensional code under various illumination conditions, and bar codes and texture images serving as negative samples;
performing enhancement pretreatment on the two-dimensional code image set to obtain a pretreated two-dimensional code image set;
labeling the preprocessed two-dimensional code image set to obtain a preprocessed two-dimensional code image training set;
pre-training the deep convolutional neural network according to the ImageNet data set to obtain a training parameter;
and training the deep convolutional neural network according to the training parameters of the preprocessed two-dimensional code image training set to obtain the two-dimensional code recognition model.
Optionally, the performing enhancement preprocessing on the two-dimensional code image set to obtain a preprocessed two-dimensional code image set includes:
and performing enhancement pretreatment on the two-dimensional code image set in a denoising, histogram equalization and homomorphic filtering mode to obtain a pretreated two-dimensional code image set.
Optionally, the obtaining a two-dimensional code image set of multiple two-dimensional codes includes:
acquiring two-dimensional code images of the same two-dimensional code under various illumination conditions through a visible light camera;
acquiring a plurality of two-dimensional codes to obtain an initial two-dimensional code image set;
and adding a bar code and a texture image serving as a negative sample into the initial two-dimensional code image set to obtain the two-dimensional code image set.
Optionally, the labeling the preprocessed two-dimensional code image set to obtain a preprocessed two-dimensional code image training set includes:
and labeling the preprocessed two-dimensional code image set according to a preset labeling identifier to obtain a preprocessed two-dimensional code image training set.
Optionally, the two-dimensional code identification method further includes:
inputting samples which do not participate in the training of the two-dimensional code recognition model into the two-dimensional code recognition model to obtain a sample recognition result;
collecting samples of which correct sample identification results cannot be obtained, and generating a new two-dimensional code image training set;
and retraining the two-dimension code recognition model again according to the new two-dimension code image training set to obtain a new two-dimension code recognition model.
In a second aspect, a two-dimensional code recognition apparatus includes:
the acquisition unit is used for acquiring a two-dimensional code image to be identified;
the recognition unit is used for inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result;
the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions.
In a third aspect, a storage medium storing a computer program, which is executable by one or more processors, is used to implement the two-dimensional code recognition method according to the first aspect.
In a fourth aspect, an electronic device includes a memory and a processor, the memory stores a computer program, the memory and the processor are communicatively connected, and the computer program, when executed by the processor, performs the two-dimensional code recognition method according to the first aspect.
The application provides a two-dimensional code identification method, a two-dimensional code identification device, a storage medium and an electronic device, wherein the two-dimensional code identification method comprises the following steps: acquiring a two-dimensional code image to be identified; inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result; the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions. The two-dimensional code recognition model is obtained by collecting the two-dimensional code images under different illumination conditions and training in combination with the negative sample, and the recognition rate of the two-dimensional code under the low-light condition is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a two-dimensional code identification method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a two-dimensional code recognition model training process according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a two-dimensional code recognition apparatus according to an embodiment of the present application;
fig. 4 is a connection block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following detailed description will be provided with reference to the accompanying drawings and embodiments, so that how to apply the technical means to solve the technical problems and achieve the corresponding technical effects can be fully understood and implemented. The embodiments and various features in the embodiments of the present application can be combined with each other without conflict, and the formed technical solutions are all within the scope of protection of the present application.
As can be seen from the background art, in the current two-dimensional code identification method, a camera is used to shoot and scan a two-dimensional code picture to complete identification. However, a general two-dimensional code recognition method is easily affected by lighting conditions, for example, under the condition of weak lighting, the two-dimensional code recognition effect is often not ideal, and sometimes even the two-dimensional code recognition cannot be completed.
In view of this, the present application provides a two-dimensional code recognition method, an apparatus, a storage medium, and an electronic device, which solve the technical problem in the related art that two-dimensional code recognition cannot be completed under a low-light condition because the two-dimensional code recognition method is susceptible to the influence of the light condition.
Example one
Fig. 1 is a schematic flow chart of a two-dimensional code identification method provided in an embodiment of the present application, and as shown in fig. 1, the method includes:
and S101, acquiring a two-dimensional code image to be identified.
S102, inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result.
In step S102, the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, where the two-dimensional code image training set includes two-dimensional code images under various lighting conditions.
It should be noted that, in the middle of the process of daily scanning identification two-dimensional code, receive the influence of on-the-spot illumination factor easily, let the camera can't in time discern the two-dimensional code, in order to solve this problem, train after the negative sample is added to the two-dimensional code image collection that this application utilized to gather under the different illumination conditions, obtain the two-dimensional code recognition model to solve the problem of two-dimensional code discernment difficulty under the low light.
Optionally, the inputting the to-be-recognized two-dimensional code image into a two-dimensional code recognition model trained in advance to obtain a recognition result includes:
sending the two-dimensional code image to be identified to a cloud server; the cloud server is deployed with a pre-trained two-dimensional code recognition model;
receiving an identification result fed back by the cloud server; and the recognition result is obtained by inputting the two-dimension code image to be recognized into the pre-trained two-dimension code recognition model by the cloud server.
It should be noted that, in this embodiment, the two-dimensional code recognition model is deployed in the cloud server, and therefore the scanned image needs to be sent to the cloud server for recognition, but the two-dimensional code recognition model may also be selectively deployed locally according to specific situations, as long as the technical effect of obtaining a recognition result by recognizing the two-dimensional code image through the two-dimensional code recognition model can be achieved, the deployment position of the two-dimensional code recognition model is not limited in this application, and all are within the protection scope of this application.
Optionally, as shown in fig. 3, a training process of a two-dimensional code recognition model provided in the embodiment of the present application includes:
s201, a two-dimensional code image set of a plurality of two-dimensional codes is obtained, wherein the two-dimensional code image set comprises two-dimensional code images of the two-dimensional codes under various illumination conditions, and bar codes and texture images serving as negative samples.
S202, performing enhancement preprocessing on the two-dimensional code image set to obtain a preprocessed two-dimensional code image set.
And S203, labeling the preprocessed two-dimensional code image set to obtain a preprocessed two-dimensional code image training set.
And S204, pre-training the deep convolutional neural network according to the ImageNet data set to obtain training parameters.
S205, training the deep convolutional neural network according to the training parameters of the preprocessed two-dimensional code image training set to obtain the two-dimensional code recognition model.
It should be noted that the ImageNet data set is used for pre-training to obtain initial parameters of the model. And (3) using the pre-training parameters and then using the two-dimensional code image training set to fine-tune the model parameters. The two-dimensional code recognition model can be obtained more quickly by equivalently warming up the model. On the other hand, the two-dimensional code recognition rate can be improved.
Optionally, step S202, performing enhancement preprocessing on the two-dimensional code image set to obtain a preprocessed two-dimensional code image set, including:
and performing enhancement pretreatment on the two-dimensional code image set in a denoising, histogram equalization and homomorphic filtering mode to obtain a pretreated two-dimensional code image set.
It should be noted that, the present application includes, but is not limited to, performing enhancement preprocessing on a two-dimensional code image by using an image enhancement method of denoising, histogram equalization, and homomorphic filtering, and other processing methods capable of achieving the same preprocessing effect are all within the protection scope of the present application.
Optionally, in step S201, obtaining a two-dimensional code image set of a plurality of two-dimensional codes includes:
acquiring two-dimensional code images of the same two-dimensional code under various illumination conditions through a visible light camera;
acquiring a plurality of two-dimensional codes to obtain an initial two-dimensional code image set;
and adding a bar code and a texture image serving as a negative sample into the initial two-dimensional code image set to obtain the two-dimensional code image set.
It should be noted that the specific number of two-dimensional code images of the multiple two-dimensional codes under various lighting conditions can be determined by the user according to the requirement, and generally speaking, under the permission of computer processing capability, the more samples in the training set, the more accurate the identification of the trained identification model.
It should be further noted that, in order to improve the accuracy of the two-dimensional code recognition model, images such as bar codes and texture images are added in advance as negative samples in the training set.
Optionally, in step S203, labeling the preprocessed two-dimensional code image set to obtain a preprocessed two-dimensional code image training set, including:
and labeling the preprocessed two-dimensional code image set according to a preset labeling identifier to obtain a preprocessed two-dimensional code image training set.
It should be noted that the preset label mark can be selected as needed, wherein the preset label mark and the corresponding preset logic thereof can also be set by itself, and the labeling process is to mark the training sample, i.e. the preprocessed two-dimensional code image in the training set, in the learning and training process. Thus, the training machine is informed that the code is a two-dimensional code, or a bar code, a texture image and the like.
Optionally, the two-dimensional code identification method further includes:
inputting samples which do not participate in the training of the two-dimensional code recognition model into the two-dimensional code recognition model to obtain a sample recognition result;
collecting samples of which correct sample identification results cannot be obtained, and generating a new two-dimensional code image training set;
and retraining the two-dimension code recognition model again according to the new two-dimension code image training set to obtain a new two-dimension code recognition model.
It should be noted that, in this embodiment, the two-dimensional code recognition model is tested by using the new two-dimensional code sample image, and a test result is obtained. And the two-dimension code recognition model can be collected in the process of daily two-dimension code recognition, the two-dimension code image which cannot be recognized is collected, the two-dimension code recognition model is trained again by utilizing the collected two-dimension code image set, and the two-dimension code recognition model is applied to the actual scene again after being trained to obtain a new two-dimension code recognition model. Therefore, the accuracy of the two-dimensional code recognition model is continuously improved through continuous iterative optimization training.
In summary, an embodiment of the present application provides a two-dimensional code identification method, including: acquiring a two-dimensional code image to be identified; inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result; the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions. The two-dimensional code recognition model is obtained by collecting the two-dimensional code images under different illumination conditions and training in combination with the negative sample, and the recognition rate of the two-dimensional code under the low-light condition is improved.
Example two
Based on the two-dimension code recognition method disclosed in the embodiment of the present invention, fig. 3 specifically discloses a two-dimension code recognition device using the two-dimension code recognition method.
As shown in fig. 3, an embodiment of the present invention discloses a two-dimensional code recognition apparatus, including:
an obtaining unit 301, configured to obtain a two-dimensional code image to be identified;
the recognition unit 302 is configured to input the to-be-recognized two-dimensional code image into a pre-trained two-dimensional code recognition model to obtain a recognition result;
the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions.
For the specific working processes of the obtaining unit 301 and the identifying unit 302 in the two-dimensional code identifying device disclosed in the embodiment of the present invention, reference may be made to the corresponding contents in the two-dimensional code identifying method disclosed in the above embodiment of the present invention, and details are not repeated here.
To sum up, the embodiment of the present application provides a two-dimensional code recognition device, include: acquiring a two-dimensional code image to be identified; inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result; the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions. The two-dimensional code recognition model is obtained by collecting the two-dimensional code images under different illumination conditions and training in combination with the negative sample, and the recognition rate of the two-dimensional code under the low-light condition is improved.
EXAMPLE III
The present embodiment further provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, where the computer program, when executed by a processor, may implement the method steps of the first embodiment, and thus, the description of the embodiment is not repeated herein.
Example four
Fig. 4 is a connection block diagram of an electronic device 500 according to an embodiment of the present application, and as shown in fig. 4, the electronic device 500 may include: a processor 501, a memory 502, a multimedia component 503, an input/output (I/O) interface 504, and a communication component 505.
The processor 501 is configured to execute all or part of the steps in the two-dimensional code identification method according to the first embodiment. The memory 502 is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
The Processor 501 may be implemented by an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and is configured to execute the two-dimensional code recognition method in the first embodiment.
The Memory 502 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk.
The multimedia component 503 may include a screen, which may be a touch screen, and an audio component for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in a memory or transmitted through a communication component. The audio assembly also includes at least one speaker for outputting audio signals.
The I/O interface 504 provides an interface between the processor 501 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons.
The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 505 may include: Wi-Fi module, bluetooth module, NFC module.
In summary, the present application provides a two-dimensional code identification method, an apparatus, a storage medium, and an electronic device, where the method includes: acquiring a two-dimensional code image to be identified; inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result; the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions. The two-dimensional code recognition model is obtained by collecting the two-dimensional code images under different illumination conditions and training in combination with the negative sample, and the recognition rate of the two-dimensional code under the low-light condition is improved.
In the embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The above-described method embodiments are merely illustrative.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Although the embodiments disclosed in the present application are described above, the above descriptions are only for the convenience of understanding the present application, and are not intended to limit the present application. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims.

Claims (10)

1. A two-dimensional code recognition method is characterized by comprising the following steps:
acquiring a two-dimensional code image to be identified;
inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result;
the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions.
2. The method according to claim 1, wherein the inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model trained in advance to obtain a recognition result comprises:
sending the two-dimensional code image to be identified to a cloud server; the cloud server is deployed with a pre-trained two-dimensional code recognition model;
receiving an identification result fed back by the cloud server; and the recognition result is obtained by inputting the two-dimension code image to be recognized into the pre-trained two-dimension code recognition model by the cloud server.
3. The method of claim 1, wherein the training process of the two-dimensional code recognition model comprises:
acquiring a two-dimensional code image set of a plurality of two-dimensional codes, wherein the two-dimensional code image set comprises two-dimensional code images of each two-dimensional code under various illumination conditions, and bar codes and texture images serving as negative samples;
performing enhancement pretreatment on the two-dimensional code image set to obtain a pretreated two-dimensional code image set;
labeling the preprocessed two-dimensional code image set to obtain a preprocessed two-dimensional code image training set;
pre-training the deep convolutional neural network according to the ImageNet data set to obtain a training parameter;
and training the deep convolutional neural network according to the training parameters of the preprocessed two-dimensional code image training set to obtain the two-dimensional code recognition model.
4. The method according to claim 3, wherein the performing the enhancement preprocessing on the two-dimensional code image set to obtain a preprocessed two-dimensional code image set includes:
and performing enhancement pretreatment on the two-dimensional code image set in a denoising, histogram equalization and homomorphic filtering mode to obtain a pretreated two-dimensional code image set.
5. The method of claim 3, wherein obtaining the set of two-dimensional code images of the plurality of two-dimensional codes comprises:
acquiring two-dimensional code images of the same two-dimensional code under various illumination conditions through a visible light camera;
acquiring a plurality of two-dimensional codes to obtain an initial two-dimensional code image set;
and adding a bar code and a texture image serving as a negative sample into the initial two-dimensional code image set to obtain the two-dimensional code image set.
6. The method according to claim 3, wherein the labeling the preprocessed two-dimensional code image set to obtain a preprocessed two-dimensional code image training set includes:
and labeling the preprocessed two-dimensional code image set according to a preset labeling identifier to obtain a preprocessed two-dimensional code image training set.
7. The method of claim 3, further comprising:
inputting samples which do not participate in the training of the two-dimensional code recognition model into the two-dimensional code recognition model to obtain a sample recognition result;
collecting samples of which correct sample identification results cannot be obtained, and generating a new two-dimensional code image training set;
and retraining the two-dimension code recognition model again according to the new two-dimension code image training set to obtain a new two-dimension code recognition model.
8. A two-dimensional code recognition device, characterized in that the device includes:
the acquisition unit is used for acquiring a two-dimensional code image to be identified;
the recognition unit is used for inputting the two-dimensional code image to be recognized into a two-dimensional code recognition model which is trained in advance to obtain a recognition result;
the two-dimensional code recognition model is obtained by training a preprocessed two-dimensional code image training set, and the two-dimensional code image training set comprises two-dimensional code images under various illumination conditions.
9. A storage medium storing a computer program executable by one or more processors to implement a two-dimensional code recognition method according to any one of claims 1 to 7.
10. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, the memory and the processor are communicatively connected, and the computer program, when executed by the processor, performs the two-dimensional code recognition method according to any one of claims 1 to 7.
CN202011265665.7A 2020-11-13 2020-11-13 Two-dimensional code identification method and device, storage medium and electronic equipment Active CN112417918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011265665.7A CN112417918B (en) 2020-11-13 2020-11-13 Two-dimensional code identification method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011265665.7A CN112417918B (en) 2020-11-13 2020-11-13 Two-dimensional code identification method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112417918A true CN112417918A (en) 2021-02-26
CN112417918B CN112417918B (en) 2022-03-18

Family

ID=74832640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011265665.7A Active CN112417918B (en) 2020-11-13 2020-11-13 Two-dimensional code identification method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112417918B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630663A (en) * 2022-12-19 2023-01-20 成都爱旗科技有限公司 Two-dimensional code identification method and device and electronic equipment
CN116451720A (en) * 2023-06-09 2023-07-18 陕西西煤云商信息科技有限公司 Warehouse material scanning and identifying method and identifying system thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017157034A1 (en) * 2016-03-15 2017-09-21 中兴通讯股份有限公司 Method, device, and storage medium for identifying two-dimensional code
CN109858305A (en) * 2019-01-17 2019-06-07 柳州康云互联科技有限公司 A kind of two dimensional code positioning identification system and method based on deep learning
CN110222792A (en) * 2019-06-20 2019-09-10 杭州电子科技大学 A kind of label defects detection algorithm based on twin network
CN110378165A (en) * 2019-05-31 2019-10-25 阿里巴巴集团控股有限公司 Two-dimensional code identification method, two dimensional code fixation and recognition method for establishing model and its device
CN110909807A (en) * 2019-11-26 2020-03-24 深圳市信联征信有限公司 Network verification code identification method and device based on deep learning and computer equipment
CN110991457A (en) * 2019-11-26 2020-04-10 北京达佳互联信息技术有限公司 Two-dimensional code processing method and device, electronic equipment and storage medium
CN111523342A (en) * 2020-04-26 2020-08-11 成都艾视特信息技术有限公司 Two-dimensional code detection and correction method in complex scene

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017157034A1 (en) * 2016-03-15 2017-09-21 中兴通讯股份有限公司 Method, device, and storage medium for identifying two-dimensional code
CN109858305A (en) * 2019-01-17 2019-06-07 柳州康云互联科技有限公司 A kind of two dimensional code positioning identification system and method based on deep learning
CN110378165A (en) * 2019-05-31 2019-10-25 阿里巴巴集团控股有限公司 Two-dimensional code identification method, two dimensional code fixation and recognition method for establishing model and its device
CN110222792A (en) * 2019-06-20 2019-09-10 杭州电子科技大学 A kind of label defects detection algorithm based on twin network
CN110909807A (en) * 2019-11-26 2020-03-24 深圳市信联征信有限公司 Network verification code identification method and device based on deep learning and computer equipment
CN110991457A (en) * 2019-11-26 2020-04-10 北京达佳互联信息技术有限公司 Two-dimensional code processing method and device, electronic equipment and storage medium
CN111523342A (en) * 2020-04-26 2020-08-11 成都艾视特信息技术有限公司 Two-dimensional code detection and correction method in complex scene

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630663A (en) * 2022-12-19 2023-01-20 成都爱旗科技有限公司 Two-dimensional code identification method and device and electronic equipment
CN116451720A (en) * 2023-06-09 2023-07-18 陕西西煤云商信息科技有限公司 Warehouse material scanning and identifying method and identifying system thereof

Also Published As

Publication number Publication date
CN112417918B (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN108710847B (en) Scene recognition method and device and electronic equipment
KR101796401B1 (en) Method, apparatus and server for image scene determination
US11270099B2 (en) Method and apparatus for generating facial feature
CN109146892A (en) A kind of image cropping method and device based on aesthetics
CN105574513A (en) Character detection method and device
CN112417918B (en) Two-dimensional code identification method and device, storage medium and electronic equipment
CN108256549B (en) Image classification method, device and terminal
CN110569341A (en) method and device for configuring chat robot, computer equipment and storage medium
CN107111761B (en) Techniques for providing user image capture feedback for improved machine language translation
CN111626371A (en) Image classification method, device and equipment and readable storage medium
CN112651358A (en) Target detection method and device, network camera and storage medium
CN106156794B (en) Character recognition method and device based on character style recognition
CN108960314A (en) Training method, device and electronic equipment based on difficult sample
CN114429636B (en) Image scanning identification method and device and electronic equipment
CN110991412A (en) Face recognition method and device, storage medium and electronic equipment
CN113112511B (en) Method and device for correcting test paper, storage medium and electronic equipment
CN114240779A (en) Point cloud denoising method, device, equipment and storage medium
CN113297986A (en) Handwritten character recognition method, device, medium and electronic equipment
CN111311550B (en) Identification method and device for forged certificate and electronic equipment
CN111291761B (en) Method and device for recognizing text
CN116631003A (en) Equipment identification method and device based on P & ID drawing, storage medium and electronic equipment
CN110033052A (en) A kind of the self-training method and self-training platform of AI identification hand-written script
CN113033297B (en) Method, device, equipment and storage medium for programming real object
CN113221718B (en) Formula identification method, device, storage medium and electronic equipment
CN113392902A (en) Data set processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant