CN114186576A - Bar code positioning and decoding device, method, electronic equipment and storage medium - Google Patents
Bar code positioning and decoding device, method, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114186576A CN114186576A CN202111321968.0A CN202111321968A CN114186576A CN 114186576 A CN114186576 A CN 114186576A CN 202111321968 A CN202111321968 A CN 202111321968A CN 114186576 A CN114186576 A CN 114186576A
- Authority
- CN
- China
- Prior art keywords
- neural network
- barcode
- image
- network model
- training
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000003062 neural network model Methods 0.000 claims abstract description 86
- 238000012549 training Methods 0.000 claims abstract description 67
- 238000013528 artificial neural network Methods 0.000 claims abstract description 50
- 238000012545 processing Methods 0.000 claims abstract description 36
- 238000004590 computer program Methods 0.000 claims description 14
- 210000002569 neuron Anatomy 0.000 claims description 10
- 238000010276 construction Methods 0.000 claims description 9
- 238000010606 normalization Methods 0.000 claims description 5
- 125000004122 cyclic group Chemical group 0.000 claims description 4
- 238000009432 framing Methods 0.000 claims description 3
- 238000002372 labelling Methods 0.000 claims 3
- 238000001514 detection method Methods 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000005260 corrosion Methods 0.000 description 3
- 230000007797 corrosion Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012805 post-processing Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 239000012141 concentrate Substances 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 238000010191 image analysis Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1443—Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1413—1D bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Toxicology (AREA)
- Electromagnetism (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a device and a method for positioning and decoding a bar code, electronic equipment and a storage medium, wherein the device for positioning and decoding the bar code comprises the following components: a microprocessor; the image acquisition module is used for acquiring a sample image with a bar code, calibrating a bar code area and a bar code category of the sample image, establishing a training image data set and storing the training image data set; the neural network building and training module is used for building and training an initial neural network model; the neural network processing module is arranged in the microprocessor and used for deploying and operating the multilayer neural network model, inputting the image to be recognized into the trained multilayer neural network model, acquiring the barcode type of the image to be recognized and extracting a target image of the barcode area of the image to be recognized; and the bar code identification module is used for identifying the target image. According to the invention, the barcode type and the barcode region can be directly extracted from the image to be identified by the multilayer neural network model, so that the whole image does not need to be analyzed in the subsequent decoding, and the code reading efficiency is improved.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a barcode positioning and decoding apparatus, method, electronic device, and storage medium.
Background
At present, bar codes and two-dimensional codes are widely applied to the traditional retail field and modern traffic, payment and self-service equipment, the requirement of industry 4.0 is met, more detailed quality control is achieved, raw materials are traced, and the bar codes and the two-dimensional codes are increasingly applied to the industrial field.
Due to the difference of materials, code printing modes, illumination angles and the like, the bar code and the two-dimensional code in the industrial field are compared with the traditional paper bar code, the traditional two-dimensional code or the bar code and the traditional two-dimensional code on a screen, so that the decoding difficulty is caused by poor imaging quality, high noise, low contrast, serious deformation and the like. According to statistics, most of the reasons for the inability to decode are that the barcode is not detected and positioned accurately or cannot be detected. If the bar code can be accurately detected and the accurate position of the bar code is positioned, the decoding is greatly improved, and the whole decoding process is optimized.
Disclosure of Invention
Aiming at the technical problems, the invention provides a device, a method, an electronic device and a storage medium for positioning and decoding bar codes, so as to solve the problem that the code reading and decoding in the industrial field are difficult in the prior art.
In order to achieve the above object, the present invention provides a barcode positioning and decoding apparatus, comprising: a microprocessor; the image acquisition module is used for acquiring sample images with bar codes, calibrating a bar code area and a bar code category of each sample image, and establishing and storing a training image data set based on the calibrated sample images; the neural network construction and training module is connected with the image acquisition module and used for constructing an initial neural network model and performing cyclic iterative training on the initial neural network model by using the training image data set to obtain a trained multilayer neural network model; the neural network processing module is arranged in the microprocessor and connected with the neural network construction and training module, and is used for deploying a trained multilayer neural network model and inputting an image to be recognized into the trained multilayer neural network model, operating the trained multilayer neural network model to acquire the barcode type of the image to be recognized and extracting a target image of the barcode area of the image to be recognized; and the bar code identification module is connected with the neural network processing module and used for identifying the target image and outputting an identification result of a bar code area.
Preferably, the barcode comprises a two-dimensional code.
Preferably, the neural network processing module further includes a detection unit, configured to detect whether a barcode exists in the loaded image to be identified, and if the barcode exists, the detection unit is further configured to determine a barcode type of the barcode.
Preferably, the loop iteration training comprises:
acquiring a weight parameter output by each neuron in the multilayer neural network model when the iteration is finished;
normalizing the weight parameter output by each neuron by using a normalization model to obtain a new weight parameter, and taking the new weight parameter as a current iteration result; and
and performing the next round of iterative training according to the current iteration result until a training end condition is met to obtain a trained multilayer neural network model.
The invention also provides a method for positioning and decoding the bar code, which comprises the following steps:
step S1, collecting sample images with bar codes, calibrating the bar code area and the bar code category of each sample image, and establishing and storing a training image data set based on the calibrated sample images;
step S2, constructing an initial multilayer neural network model, and performing loop iterative training on the initial multilayer neural network model by using the training image data set to obtain a trained multilayer neural network model;
step S3, deploying the trained multilayer neural network model on a neural network processing module, wherein the neural network processing module is internally arranged in a microprocessor;
step S4, inputting the image to be recognized into the trained multilayer neural network model, operating the trained multilayer neural network model to acquire the barcode type of the image to be recognized and extracting the target image of the barcode region of the image to be recognized;
and step S5, recognizing the target image and outputting the recognition result of the bar code area.
Preferably, the calibrating the barcode region and the barcode category of each sample image includes framing the barcode region in the sample image by using a rectangular frame and marking the barcode category by using a marking tool.
Preferably, the loop iteration training comprises:
acquiring a weight parameter output by each neuron in the multilayer neural network model when the iteration is finished;
normalizing the weight parameter output by each neuron by using a normalization model to obtain a new weight parameter, and taking the new weight parameter as a current iteration result; and
and performing the next round of iterative training according to the current iteration result until a training end condition is met to obtain a trained multilayer neural network model.
Preferably, the obtaining of the trained multilayer neural network model according to the current iteration result until the next iteration training is performed until the training end condition is met includes:
calculating an error rate between a barcode region in the sample image of the calibrated barcode and a barcode region in the sample image predicted by the multilayer neural network model; when the error rate is lower than a preset error rate threshold value, determining that a training ending condition is met to obtain a trained multilayer neural network model, and storing the trained multilayer neural network model; when the error rate is higher than the preset error rate threshold value, the multi-layer neural network model continues to be trained according to the error rate until the error rate is lower than the preset error rate threshold value, and the training of the multi-layer neural network model is finished.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the barcode positioning and decoding method.
The invention also provides a storage medium on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the method for positioning and decoding a barcode as described above.
Compared with the prior art, the positioning and decoding device of the bar code is based on the neural network, the neural network processing module is arranged in a chip terminal (microprocessor), the analysis capability, the self-learning and the self-adapting capability of the neural network processing module can realize quick identification, the invention can directly extract the bar code type and the bar code area from the bar code image by the multilayer neural network model in the neural network processing module, and because the multilayer neural network model finishes the detection and the positioning of the bar code, the subsequent decoding does not need to analyze the whole image, but only needs to concentrate on the corresponding bar code area and the bar code type, thereby greatly reducing the calculation amount of the subsequent decoding, and under the condition of confirming the bar code area and the bar code type, the area can be subjected to more image analysis and processing, such as various filtering, expansion corrosion, opening and closing operations, various binaryzation and the like, until the decoding is successful. The neural network and the traditional decoding post-processing can exert the effect that one plus one is larger than two, thereby greatly improving the success rate of industrial code reading.
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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a block diagram of a barcode positioning and decoding apparatus according to the present invention;
FIG. 2 is a flow chart illustrating the steps of a method for barcode location and decoding in accordance with the present invention.
Detailed Description
In order to further understand the objects, structures, features and functions of the present invention, the following embodiments are described in detail.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention.
Referring to fig. 1, fig. 1 is a block diagram of a barcode positioning and decoding device according to the present invention, which provides a barcode positioning and decoding device, the barcode positioning and decoding device is a neural network-based barcode positioning and decoding device, and the barcode positioning and decoding device includes a microprocessor 1, an image acquisition module 2, a neural network construction and training module 3, a neural network processing module 4, and a barcode recognition module 5. The barcode recognition module 5 may be a conventional decoding algorithm, and the barcode may be an industrial barcode, such as a barcode or a two-dimensional code.
The image acquisition module 2 is used for acquiring sample images with barcodes, calibrating a barcode area and a barcode category of each sample image, and establishing and storing a training image data set based on the calibrated sample images. The neural network construction and training module 3 is used for constructing an initial neural network model, is connected with the image acquisition module 2 to receive the images acquired by the image acquisition module 2, and performs cyclic iterative training on the initial neural network model by using the training image data set to obtain a trained multilayer neural network model. The construction and training of the multilayer neural network model are completed on computer equipment by matching with a display card.
A neural network processing module (NPU)4, which is an embedded NPU, is embedded in the microprocessor 1, is connected to the neural network construction and training module 3, and is used to deploy the trained multi-layer neural network model, that is, the trained multi-layer neural network model is deployed on the neural network processing module 4; and the multi-layer neural network model is also used for inputting the image to be recognized into the trained multi-layer neural network model, operating the trained multi-layer neural network model to acquire the barcode category of the image to be recognized and extracting the target image of the barcode region of the image to be recognized. And the bar code identification module 5 is connected with the neural network processing module 4 and is used for identifying the target image and outputting an identification result of a bar code area.
That is to say, after a training image data set is established, on a computer device (PC), the construction of a multilayer neural network model is completed in cooperation with a graphics card, and the initial multilayer neural network model is subjected to cyclic iterative training using the training image data set to obtain a trained multilayer neural network model; and then deploying the trained multilayer neural network model on a neural network processing module and operating.
In addition, when building the training image data set, the sample images need to be in sufficient quantity, because a small number of samples for the neural network are far from sufficient for training of the subsequent multi-layer neural network model. Therefore, it is necessary to collect a large or sufficient number of images containing barcodes in different scenes, mark out the barcode area in each image after collection, and mark or record the barcode area (i.e. the position of the barcode) and the barcode category at the same time. Furthermore, to make the neural network sufficiently trained to cover all possible scenarios, the combination of image scenarios may cover: the image is partially incomplete, the image is different in size, the image is different in illumination, the image is different in background, the image shooting angle is different, and the like. Also, preferably, the training image data set is derived from images including bar codes used in the industry.
In addition, in order to ensure the accuracy of the training image data set, a data enhancement module may be further included, which is configured to perform enhancement processing on the acquired sample image, for example, processing the training image data set by using image enhancement techniques such as image rotation, image distortion, image horizontal inversion, image data dithering (exposure, saturation, hue, and the like), image size, and the like, so as to enlarge the current data set and expand the scene covered by the data set.
In addition, the calibration of the barcode region and the barcode category of each sample image comprises framing the barcode region in the sample image by using a rectangular frame by using a marking tool and marking the barcode category. The marking tool is, for example, an Image marking tool via (vgg Image indicator), and coordinates of four vertices of the rectangular frame reflect position information of the barcode in the Image.
Moreover, the trained multilayer neural network model has the capability of mastering the bar code detection and positioning, and has certain intelligence. The microprocessor with built-in NPU is used as an algorithm carrier, can exert the fast processing capability of the NPU, and sends the result processed by the NPU into a decoding algorithm in the microprocessor. The neural network processing module (NPU module) is a hardware operation unit specially designed for the characteristics of the neural network, can quickly perform neural network calculation, and has low power consumption. When the neural network operation is carried out, compared with the current general CPU/GPU operation platform, the built-in or embedded neural network processing module has the characteristics of low cost, small volume, low power consumption, high energy efficiency ratio and easiness in installation and maintenance; and the built-in or embedded neural network processing module can efficiently run a deep learning algorithm, can run a positioning and decoding method of the bar code based on the neural network with higher precision and better generalization, and obtains a more accurate and stable identification result.
Further, the neural network processing module 4 further includes a detection unit, the detection unit is configured to detect whether a barcode exists in the loaded image to be identified, and if the barcode exists, the detection unit is further configured to determine a barcode type of the barcode.
Specifically, in this embodiment, the image to be recognized is sent to the multi-layer neural network model trained in the neural network processing module 4, the multi-layer neural network model trained detects whether a barcode exists in the image to be recognized, what the type of the barcode is and the barcode region (i.e., the region coordinates where the barcode is located), determines the barcode type, and then further recognizes the barcode region according to the barcode type, and sends the information to the barcode recognition module 5, so as to recognize or decode the target image in the barcode region and extract the data and information in the barcode. Because the multilayer neural network model finishes the detection and the positioning of the bar code, the subsequent identification or decoding does not need to analyze the whole image, but only needs to be concentrated on the corresponding bar code region and the type of the bar code, thereby greatly reducing the calculation amount of the subsequent identification or decoding, and under the condition of confirming the bar code region and the type of the bar code, the region can be subjected to more image analysis and processing, such as various filtering, expansion corrosion, opening and closing operations, various binaryzation and the like, until the decoding is successful. That is, the neural network plus the post-processing of the traditional decoding can exert the effect that one plus one is larger than two, thereby greatly improving the success rate of industrial code reading.
Further, in the step of performing a loop iteration training on the initial multilayer neural network model by using the training image data set to obtain a trained multilayer neural network model, the above neural network constructing and training module 3 includes:
acquiring a weight parameter output by each neuron in the multilayer neural network model when the iteration is finished;
normalizing the weight parameter output by each neuron by using a normalization model to obtain a new weight parameter, and taking the new weight parameter as a current iteration result; and
and performing the next round of iterative training according to the current iteration result until a training end condition is met to obtain a trained multilayer neural network model.
And the obtaining of the trained multilayer neural network model after the next iteration training according to the current iteration result until the training end condition is met comprises:
calculating an error rate between a barcode region in the sample image of the calibrated barcode and a barcode region in the sample image predicted by the multilayer neural network model; when the error rate is lower than a preset error rate threshold value, determining that a training ending condition is met to obtain a trained multilayer neural network model, and storing the trained multilayer neural network model; and
when the error rate is higher than the preset error rate threshold value, the multi-layer neural network model continues to be trained according to the error rate until the error rate is lower than the preset error rate threshold value, and the training of the multi-layer neural network model is finished.
Referring to fig. 2, fig. 2 is a flowchart illustrating the steps of a barcode locating and decoding method according to the present invention. The invention provides a method for positioning and decoding a bar code, which is a method for positioning and decoding the bar code based on a neural network, and the specific operation of the method for positioning and decoding the bar code comprises the following steps:
step S1, collecting sample images with bar codes, calibrating the bar code area and the bar code category of each sample image, and establishing and storing a training image data set based on the calibrated sample images;
step S2, constructing an initial multilayer neural network model, and performing loop iterative training on the initial multilayer neural network model by using the training image data set to obtain a trained multilayer neural network model;
step S3, deploying the trained multilayer neural network model on a neural network processing module, wherein the neural network processing module is internally arranged in a microprocessor;
step S4, inputting the image to be recognized into the trained multilayer neural network model, operating the trained multilayer neural network model to acquire the barcode type of the image to be recognized and extracting the target image of the barcode region of the image to be recognized;
and step S5, recognizing the target image and outputting the recognition result of the bar code area.
The barcode positioning and decoding method is implemented by, for example, the barcode positioning and decoding method, and is not described herein again.
In addition, corresponding to the above method embodiments, the embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the barcode positioning and decoding method described above when executing the computer program. The electronic device may be represented in the form of a general-purpose computing device, for example, it may be a server device.
In some embodiments, the processor is a control core of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory and calling data stored in the memory. For example, the processor, when executing the computer program stored in the memory, implements all or part of the steps of the barcode positioning and decoding method according to the embodiment of the present invention. The processor may include one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips, among others.
Each module in the barcode positioning and decoding device may be a computer program stored in the memory and executed by the microprocessor, thereby implementing the functions of each module.
Corresponding to the above method embodiments, the present invention further provides a storage medium, which is a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the barcode positioning and decoding method described above. The memory may include non-volatile and/or volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash Memory. Volatile memory can include Random Access Memory (RAM) or external cache memory.
In summary, the present invention provides a barcode positioning and decoding device based on neural network, the neural network processing module is built in the chip terminal (microprocessor), the analysis capability, self-learning and self-adapting capability thereof can realize fast recognition, the invention can directly extract the barcode type and barcode region from the barcode image by the multilayer neural network model in the neural network processing module, and since the multilayer neural network model completes the detection and positioning of the barcode, the subsequent decoding does not need to analyze the whole graph, but only needs to concentrate on the corresponding barcode region and barcode type, thus greatly reducing the calculation amount of the subsequent decoding, and under the condition of confirming the barcode region and barcode type, the region can be further analyzed and processed by more images, such as various filtering, expansion corrosion, opening and closing operations, various binaryzation, etc., until the decoding is successful. The neural network and the traditional decoding post-processing can exert the effect that one plus one is larger than two, thereby greatly improving the success rate of industrial code reading.
The present invention has been described in relation to the above embodiments, which are only exemplary of the implementation of the present invention. Furthermore, the technical features mentioned in the different embodiments of the present invention described above may be combined with each other as long as they do not conflict with each other. It should be noted that the disclosed embodiments do not limit the scope of the invention. Rather, it is intended that all such modifications and variations be included within the spirit and scope of this invention.
Claims (10)
1. A device for positioning and decoding a barcode, comprising:
a microprocessor;
the image acquisition module is used for acquiring sample images with bar codes, calibrating a bar code area and a bar code category of each sample image, and establishing and storing a training image data set based on the calibrated sample images;
the neural network construction and training module is connected with the image acquisition module and used for constructing an initial neural network model and performing cyclic iterative training on the initial neural network model by using the training image data set to obtain a trained multilayer neural network model;
the neural network processing module is arranged in the microprocessor and connected with the neural network construction and training module, and is used for deploying a trained multilayer neural network model and inputting an image to be recognized into the trained multilayer neural network model, operating the trained multilayer neural network model to acquire the barcode type of the image to be recognized and extracting a target image of the barcode area of the image to be recognized;
and the bar code identification module is connected with the neural network processing module and used for identifying the target image and outputting an identification result of a bar code area.
2. The apparatus for positioning and decoding a barcode according to claim 1, wherein the barcode comprises a two-dimensional code.
3. The apparatus for positioning and decoding the barcode of claim 1, wherein the neural network processing module further comprises a detecting unit for detecting whether the loaded image to be recognized has the barcode, and if the barcode is detected, the detecting unit is further configured to determine the barcode type of the barcode.
4. The apparatus for locating and decoding barcodes of claim 1, wherein the iterative training loop comprises:
acquiring a weight parameter output by each neuron in the multilayer neural network model when the iteration is finished;
normalizing the weight parameter output by each neuron by using a normalization model to obtain a new weight parameter, and taking the new weight parameter as a current iteration result; and
and performing the next round of iterative training according to the current iteration result until a training end condition is met to obtain a trained multilayer neural network model.
5. A method for positioning and decoding a barcode, comprising:
step S1, collecting sample images with bar codes, calibrating the bar code area and the bar code category of each sample image, and establishing and storing a training image data set based on the calibrated sample images;
step S2, constructing an initial multilayer neural network model, and performing loop iterative training on the initial multilayer neural network model by using the training image data set to obtain a trained multilayer neural network model;
step S3, deploying the trained multilayer neural network model on a neural network processing module, wherein the neural network processing module is internally arranged in a microprocessor;
step S4, inputting the image to be recognized into the trained multilayer neural network model, operating the trained multilayer neural network model to acquire the barcode type of the image to be recognized and extracting the target image of the barcode region of the image to be recognized;
and step S5, recognizing the target image and outputting the recognition result of the bar code area.
6. The method of claim 5, wherein the labeling of the barcode region and the barcode category of each sample image comprises framing the barcode region in the sample image with a rectangular frame using a labeling tool and labeling the barcode category.
7. The method for locating and decoding barcodes of claim 5, wherein the loop iteration training comprises:
acquiring a weight parameter output by each neuron in the multilayer neural network model when the iteration is finished;
normalizing the weight parameter output by each neuron by using a normalization model to obtain a new weight parameter, and taking the new weight parameter as a current iteration result; and
and performing the next round of iterative training according to the current iteration result until a training end condition is met to obtain a trained multilayer neural network model.
8. The method for positioning and decoding barcodes of claim 7, wherein the step of performing the next iteration training according to the current iteration result until a training end condition is met to obtain a trained multilayer neural network model comprises the following steps:
calculating an error rate between a barcode region in the sample image of the calibrated barcode and a barcode region in the sample image predicted by the multilayer neural network model; when the error rate is lower than a preset error rate threshold value, determining that a training ending condition is met to obtain a trained multilayer neural network model, and storing the trained multilayer neural network model; when the error rate is higher than the preset error rate threshold value, the multi-layer neural network model continues to be trained according to the error rate until the error rate is lower than the preset error rate threshold value, and the training of the multi-layer neural network model is finished.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for positioning and decoding a barcode according to any one of claims 5 to 8 when executing the computer program.
10. A storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the method for positioning and decoding a barcode according to any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111321968.0A CN114186576A (en) | 2021-11-09 | 2021-11-09 | Bar code positioning and decoding device, method, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111321968.0A CN114186576A (en) | 2021-11-09 | 2021-11-09 | Bar code positioning and decoding device, method, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114186576A true CN114186576A (en) | 2022-03-15 |
Family
ID=80601484
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111321968.0A Pending CN114186576A (en) | 2021-11-09 | 2021-11-09 | Bar code positioning and decoding device, method, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114186576A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115630660A (en) * | 2022-12-23 | 2023-01-20 | 湖北凯乐仕通达科技有限公司 | Barcode positioning method and device based on convolutional neural network |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106022471A (en) * | 2016-05-12 | 2016-10-12 | 大连海事大学 | Wavelet neural network model ship rolling real-time prediction method based on particle swarm optimization algorithm |
CN110941970A (en) * | 2019-12-05 | 2020-03-31 | 深圳牛图科技有限公司 | High-speed dimension code positioning and identifying system based on full convolution neural network |
US20200250491A1 (en) * | 2017-11-01 | 2020-08-06 | Tencent Technology (Shenzhen) Company Limited | Image classification method, computer device, and computer-readable storage medium |
CN112949338A (en) * | 2021-03-16 | 2021-06-11 | 太原科技大学 | Two-dimensional bar code accurate positioning method combining deep learning and Hough transformation |
-
2021
- 2021-11-09 CN CN202111321968.0A patent/CN114186576A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106022471A (en) * | 2016-05-12 | 2016-10-12 | 大连海事大学 | Wavelet neural network model ship rolling real-time prediction method based on particle swarm optimization algorithm |
US20200250491A1 (en) * | 2017-11-01 | 2020-08-06 | Tencent Technology (Shenzhen) Company Limited | Image classification method, computer device, and computer-readable storage medium |
CN110941970A (en) * | 2019-12-05 | 2020-03-31 | 深圳牛图科技有限公司 | High-speed dimension code positioning and identifying system based on full convolution neural network |
CN112949338A (en) * | 2021-03-16 | 2021-06-11 | 太原科技大学 | Two-dimensional bar code accurate positioning method combining deep learning and Hough transformation |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115630660A (en) * | 2022-12-23 | 2023-01-20 | 湖北凯乐仕通达科技有限公司 | Barcode positioning method and device based on convolutional neural network |
CN115630660B (en) * | 2022-12-23 | 2023-04-07 | 湖北凯乐仕通达科技有限公司 | Barcode positioning method and device based on convolutional neural network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10635946B2 (en) | Eyeglass positioning method, apparatus and storage medium | |
CN108875731B (en) | Target identification method, device, system and storage medium | |
CN108205673B (en) | Method and system for container code identification | |
EP2551833A1 (en) | Device for registering and managing book based on computer vision and radio frequency identification technique | |
CN110276295B (en) | Vehicle identification number detection and identification method and device | |
CN111462381A (en) | Access control method based on face temperature identification, electronic device and storage medium | |
CN111160169B (en) | Face detection method, device, equipment and computer readable storage medium | |
CN108932449B (en) | Bar code binarization method and system based on clustering | |
CN111626177A (en) | PCB element identification method and device | |
CN112052813A (en) | Method, device, electronic device and readable storage medium for identifying translocation between chromosomes | |
US9679218B2 (en) | Method and apparatus for image matching | |
CN111079480A (en) | Identification method and device of identity card information and terminal equipment | |
CN114998192B (en) | Defect detection method, device, equipment and storage medium based on deep learning | |
CN112668640A (en) | Text image quality evaluation method, device, equipment and medium | |
CN114186576A (en) | Bar code positioning and decoding device, method, electronic equipment and storage medium | |
CN112001200A (en) | Identification code identification method, device, equipment, storage medium and system | |
US20180293425A1 (en) | Symbol Detection for Desired Image Reconstruction | |
CN112052702A (en) | Method and device for identifying two-dimensional code | |
CN111680680B (en) | Target code positioning method and device, electronic equipment and storage medium | |
CN108108646B (en) | Bar code information identification method, terminal and computer readable storage medium | |
CN110765940B (en) | Target object statistical method and device | |
CN115294505B (en) | Risk object detection and training method and device for model thereof and electronic equipment | |
CN110992299B (en) | Method and device for detecting browser compatibility | |
CN114266267B (en) | Automatic identification method, device and storage medium for integrating two-dimension codes, documents, certificates and faces | |
CN115909151A (en) | Method for identifying serial number of motion container under complex working condition |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220315 |
|
RJ01 | Rejection of invention patent application after publication |