CN-115510888-B - Two-dimensional code identification method and device, electronic equipment and storage medium
Abstract
The application discloses a two-dimensional code identification method, a device, electronic equipment and a storage medium, belonging to the technical field of image processing, wherein the method comprises the following steps: the method comprises the steps of obtaining a memory bar image, inputting the memory bar image into a first pre-trained detection model to obtain at least one chip area in the memory bar image, carrying out two-dimensional code recognition on the chip image corresponding to each chip area, inputting the chip image into a second pre-trained detection model if the recognition fails to obtain a two-dimensional code area in the chip image, and carrying out two-dimensional code recognition on the two-dimensional code image corresponding to the two-dimensional code area. In addition, the two-dimensional code identification is carried out according to the sequence from the chip image to the two-dimensional code image, the speed and the accuracy of the two-dimensional code identification can be considered, and the identification mode is reasonable.
Inventors
- LI XIAOWEI
Assignees
- 长鑫存储技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20220923
Claims (15)
- 1. The two-dimensional code identification method is characterized by comprising the following steps of: Acquiring a memory bank image; Inputting the memory bank image into a first pre-trained detection model to obtain at least one chip area in the memory bank image; carrying out two-dimensional code identification on the chip image corresponding to each chip area; when the identification fails, inputting the chip image into a pre-trained second detection model to obtain a two-dimensional code area in the chip image; And carrying out two-dimension code identification on the two-dimension code image corresponding to the two-dimension code region.
- 2. The method of claim 1, wherein the first detection model and the second detection model are the same detection model or the first detection model and the second detection model are different detection models.
- 3. The method according to claim 2, wherein when the first detection model and the second detection model are the same detection model, the detection model is trained according to the following steps: acquiring a plurality of first image samples, wherein the plurality of first image samples comprise a memory bank image sample and a chip image sample; training the constructed deep learning network model by utilizing the plurality of first image samples; when the training degree reaches a preset degree, pruning is carried out on the current deep learning network model; Training the pruned deep learning network model continuously by utilizing the plurality of first image samples; When pruning conditions are met, pruning is carried out on the current deep learning network model, and training is continued on the pruned deep learning network model by utilizing the plurality of first image samples; and determining the current deep learning network model as the detection model until the current deep learning network model is determined to meet the training stop condition.
- 4. The method of claim 2, wherein when the first detection model and the second detection model are different detection models, the first detection model is trained according to the following steps: Acquiring a plurality of second image samples, wherein the plurality of second image samples comprise a memory bank image sample and a chip image sample; Training the constructed deep learning network model by utilizing the plurality of second image samples; and determining the current deep learning network model as the first detection model until the current deep learning network model is determined to meet the training stopping condition.
- 5. The method of claim 4, wherein the second detection model is trained according to the steps of: Acquiring a plurality of third image samples, wherein the plurality of third image samples comprise chip image samples and two-dimensional code image samples; Training the constructed deep learning network model by utilizing the plurality of third image samples; And determining the current deep learning network model as the second detection model until the current deep learning network model is determined to meet the training stop condition.
- 6. The method of any one of claims 1-5, further comprising: Determining the number of chips detected from the memory bank image and the number of successfully identified two-dimensional codes; And determining whether the two-dimensional code identification of the memory bank image is abnormal or not based on whether the number of chips is matched with the number of the two-dimensional codes.
- 7. The method of any one of claims 1-5, further comprising: and before any target image in the chip image and the two-dimensional code image is subjected to two-dimensional code identification, correcting the target image.
- 8. The method of claim 1, wherein after inputting the memory bank image into a pre-trained first inspection model to obtain at least one chip area in the memory bank image, further comprising: determining a region size of the at least one chip region; inputting a chip image corresponding to a chip area with the area size smaller than the preset size into a pre-trained second detection model to obtain a two-dimensional code area in the chip image; And carrying out two-dimension code identification on the two-dimension code image corresponding to the two-dimension code region.
- 9. The utility model provides a device of two-dimensional code discernment which characterized in that includes: The acquisition module is used for acquiring the memory bank image; the first detection module is used for inputting the memory bank image into a first detection model trained in advance to obtain at least one chip area in the memory bank image; the first identification module is used for carrying out two-dimensional code identification on the chip image corresponding to each chip area; the second detection module is used for inputting the chip image into a pre-trained second detection model when the identification fails, so as to obtain a two-dimensional code area in the chip image; and the second identification module is used for carrying out two-dimensional code identification on the two-dimensional code image corresponding to the two-dimensional code area.
- 10. The apparatus of claim 9, wherein the first detection model and the second detection model are the same detection model or the first detection model and the second detection model are different detection models.
- 11. The apparatus of claim 10, wherein when the first detection model and the second detection model are the same detection model, the detection model is trained according to the following steps: acquiring a plurality of first image samples, wherein the plurality of first image samples comprise a memory bank image sample and a chip image sample; training the constructed deep learning network model by utilizing the plurality of first image samples; when the training degree reaches a preset degree, pruning is carried out on the current deep learning network model; Training the pruned deep learning network model continuously by utilizing the plurality of first image samples; When pruning conditions are met, pruning is carried out on the current deep learning network model, and training is continued on the pruned deep learning network model by utilizing the plurality of first image samples; and determining the current deep learning network model as the detection model until the current deep learning network model is determined to meet the training stop condition.
- 12. The apparatus of claim 9, further comprising an exception handling module to: Determining the number of chips detected from the memory bank image and the number of successfully identified two-dimensional codes; And determining whether the two-dimensional code identification of the memory bank image is abnormal or not based on whether the number of chips is matched with the number of the two-dimensional codes.
- 13. The apparatus as recited in claim 9, further comprising: and the correction module is used for carrying out correction processing on any target image in the chip image and the two-dimensional code image before carrying out two-dimensional code identification on the target image.
- 14. An electronic device comprising at least one processor, and a memory communicatively coupled to the at least one processor, wherein: the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
- 15. A storage medium, characterized in that a computer program in the storage medium, when executed by a processor of an electronic device, is capable of performing the method of any of claims 1-8.
Description
Two-dimensional code identification method and device, electronic equipment and storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to a two-dimensional code identification method, a device, an electronic apparatus, and a storage medium. Background Along with the development of society, the two-dimensional code is widely applied to various fields such as electronic commerce, product tracing and the like due to the advantages of large information capacity, strong fault tolerance, low cost and the like. At present, when two-dimensional codes of a plurality of chips on a memory bank are identified, a user is usually required to hold a code scanning gun to align each two-dimensional code area on the memory bank one by one for two-dimensional code identification, the identification process is relatively slow, and the labor cost is relatively high. Therefore, how to quickly identify the two-dimensional codes of a plurality of chips on the memory bank is a technical problem to be solved. Disclosure of Invention The embodiment of the application provides a two-dimensional code identification method, a device, electronic equipment and a storage medium, which are used for rapidly identifying two-dimensional codes of a plurality of chips on a memory bank. In a first aspect, an embodiment of the present application provides a two-dimensional code identification method, including: Acquiring a memory bank image; Inputting the memory bank image into a first pre-trained detection model to obtain at least one chip area in the memory bank image; carrying out two-dimensional code identification on the chip image corresponding to each chip area; when the identification fails, inputting the chip image into a pre-trained second detection model to obtain a two-dimensional code area in the chip image; And carrying out two-dimension code identification on the two-dimension code image corresponding to the two-dimension code region. In some embodiments, the first detection model and the second detection model are the same detection model, or the first detection model and the second detection model are different detection models. In some embodiments, when the first detection model and the second detection model are the same detection model, the detection model is trained according to the following steps: acquiring a plurality of first image samples, wherein the plurality of first image samples comprise a memory bank image sample and a chip image sample; training the constructed deep learning network model by utilizing the plurality of first image samples; when the training degree reaches a preset degree, pruning is carried out on the current deep learning network model; Training the pruned deep learning network model continuously by utilizing the plurality of first image samples; When pruning conditions are met, pruning is carried out on the current deep learning network model, and training is continued on the pruned deep learning network model by utilizing the plurality of first image samples; and determining the current deep learning network model as the detection model until the current deep learning network model is determined to meet the training stop condition. In some embodiments, when the first detection model and the second detection model are different detection models, the first detection model is trained according to the following steps: Acquiring a plurality of second image samples, wherein the plurality of second image samples comprise a memory bank image sample and a chip image sample; Training the constructed deep learning network model by utilizing the plurality of second image samples; and determining the current deep learning network model as the first detection model until the current deep learning network model is determined to meet the training stopping condition. In some embodiments, the second detection model is trained according to the following steps: Acquiring a plurality of third image samples, wherein the plurality of third image samples comprise chip image samples and two-dimensional code image samples; Training the constructed deep learning network model by utilizing the plurality of third image samples; And determining the current deep learning network model as the second detection model until the current deep learning network model is determined to meet the training stop condition. In some embodiments, further comprising: Determining the number of chips detected from the memory bank image and the number of successfully identified two-dimensional codes; And determining whether the two-dimensional code identification of the memory bank image is abnormal or not based on whether the number of chips is matched with the number of the two-dimensional codes. In some embodiments, further comprising: and before any target image in the chip image and the two-dimensional code image is subjected to two-dimensional code identification, corr