Deep learning-based point code detection method and device, equipment and medium

Through the point code detection method based on deep learning, the preprocessed dot matrix image and dot position rule table are used, combined with the structured processing of the deep learning model and rule table, to solve the problem of low accuracy of point code detection under complex backgrounds. , achieving higher detection accuracy.

CN118569286APending Publication Date: 2024-08-30WEI JIAN TECHNOLOGY (ZHUHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410429864.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing point code detection solution has low image recognition accuracy in production sites with complex backgrounds and high noise pollution, and cannot meet user needs.

Method used

The point code detection method based on deep learning is used to obtain the dot matrix image to be detected and the dot position rule table, perform image preprocessing and then input the pre-trained deep learning model for point code detection, and combine the dot position rule table to perform structure processing to obtain the target point code result.

Benefits of technology

The accuracy of point code detection is significantly improved under complex backgrounds. Compared with traditional image processing algorithm detection, the point code position can be determined more accurately to meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569286A
    Figure CN118569286A
Patent Text Reader

Abstract

The invention discloses a point code detection method and device based on deep learning, equipment and a medium. The method comprises the following steps: acquiring a first dot matrix image to be detected and a dot position rule table; performing image preprocessing on the first to-be-detected dot matrix image to obtain a preprocessed first to-be-detected dot matrix image; inputting the preprocessed first to-be-detected dot matrix image into a target deep learning model for dot code detection to obtain center point coordinates of all dot images corresponding to the first to-be-detected dot matrix image; and performing structured processing on all the center point coordinates based on the dot position rule table to obtain a target point code result. Based on mutual mapping of the center point coordinates processed by the dot position rule table and the deep learning model, accurate point code detection under a complex background is realized, and compared with a scheme of determining a point code position by detecting a contour through a traditional image processing algorithm, the point code detection accuracy can be effectively improved, and user requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of image processing technology, and in particular to a point code detection method, device, equipment, and medium based on deep learning. Background Art

[0002] Dot code detection is a key technology in the field of industrial production and automation, used to detect dot codes on products and interpret their information. In industrial production, in order to achieve traceability from production to sales, dot codes are usually used for tracking. Dot codes usually include a two-dimensional matrix composed of multiple dots, which are used to represent text characters, numbers, barcodes, QR codes, patterns or other information. The existing dot code detection solution uses traditional image processing algorithms for detection. However, in production sites with complex environments and high noise pollution, the image recognition accuracy for complex backgrounds is low and cannot meet user needs. Summary of the invention

[0003] The embodiments of the present application provide a point code detection method, device, equipment, and medium based on deep learning, which can effectively improve the accuracy of point code detection and meet user needs.

[0004] In a first aspect, the embodiment of the present application provides a point code detection method based on deep learning, including:

[0005] Acquire a first dot matrix image to be detected and a dot position rule table, wherein the first dot matrix image to be detected includes a plurality of dot images, and the dot position rule table records position information of the dot images in the first dot matrix image to be detected;

[0006] Performing image preprocessing on the first to-be-detected dot matrix image based on a preset rule to obtain a preprocessed first to-be-detected dot matrix image;

[0007] Input the preprocessed first dot matrix image to be detected into a pre-trained target deep learning model for dot code detection, and obtain the center point coordinates of all dot images corresponding to the first dot matrix image to be detected;

[0008] Based on the dot position rule table, all the center point coordinates are structured to obtain the target point code result.

[0009] In some embodiments, the center point coordinates include first coordinate information, second coordinate information and third coordinate information, the target deep learning model includes a Backbone module, a Neck module and a Head module, the Backbone module includes a CBL module, multiple feature extraction modules and a SFFP module connected in sequence, each of the feature extraction modules includes the CBL module and the first CSP module, the Neck module includes multiple feature upsampling modules and two feature fusion modules connected in sequence, each of the feature upsampling modules includes the CBL module, the upsampling module, the Concat module and the second CSP module, and each of the feature fusion modules includes The CBL module, the Concat module and the second CSP module, the Head module includes a first convolution module, a second convolution module and a third convolution module, the first convolution module is connected to the second CSP module in the feature upsampling module in the Neck module that is arranged before the feature fusion module, the second convolution module and the third convolution module are respectively connected to the second CSP modules in each of the feature fusion modules, the preprocessed first dot matrix image to be detected is input into a pre-trained target deep learning model for dot code detection, and the center point coordinates of all dot images corresponding to the first dot matrix image to be detected are obtained, including:

[0010] Inputting the preprocessed first dot matrix image to be detected into the CBL module, multiple feature extraction modules and SFFP module connected in sequence in the Backbone module for feature extraction processing to obtain a first feature image;

[0011] Input the first feature image to a plurality of feature upsampling modules and two feature fusion modules sequentially connected in the Neck module for upsampling and feature fusion processing to obtain a second feature image, a third feature image and a fourth feature image, wherein the second feature image is an image output by the second CSP module in the feature upsampling module in the first convolution module and the Neck module that is arranged before the feature fusion module, and the third feature image and the fourth feature image are images output by the second CSP modules in the two feature fusion modules respectively;

[0012] Inputting the second feature image into the first convolution module for convolution processing to obtain the first coordinate information;

[0013] Inputting the third feature image into the second convolution module for convolution processing to obtain the second coordinate information;

[0014] The fourth feature image is input into the third convolution module for convolution processing to obtain the third coordinate information.

[0015] In some embodiments, the target deep learning model is trained according to the following steps:

[0016] Acquire a plurality of second dot matrix images to be detected, and perform data cleaning and data labeling processing on the second dot matrix images to be detected to obtain a third dot matrix image to be detected, wherein the third dot matrix image to be detected carries a dot label, and the dot label indicates category information and position information of the dot image in the third dot matrix image to be detected;

[0017] Based on the dot labels, all third dot matrix images to be detected are divided into a test set and a training set according to a preset ratio;

[0018] Training the initial deep learning model based on the training set to obtain an intermediate model;

[0019] The performance of the intermediate model is evaluated based on the test set and a preset loss function. When the loss function value corresponding to the intermediate model is less than a preset threshold, the intermediate model is determined as the target deep learning model.

[0020] In some embodiments, the method further comprises:

[0021] When the loss function value corresponding to the intermediate model is greater than or equal to the preset threshold, a plurality of the second dot matrix images to be detected are reacquired, and the second dot matrix images to be detected are sorted, data cleaned and data labeled to obtain the third dot matrix image to be detected;

[0022] Based on the dot labels carried by each of the third dot matrix images to be detected, re-dividing all the third dot matrix images to be detected into the test set and the training set according to a preset ratio;

[0023] The initial deep learning model is trained based on the training set to obtain the intermediate model, and the performance of the intermediate model is evaluated based on the test set and a preset loss function until the loss function value corresponding to the intermediate model is less than a preset threshold, and the intermediate model is determined as the target deep learning model.

[0024] In some embodiments, the loss function is obtained according to the following formula:

[0025]

[0026] Wherein, LOSS is the loss function, IOU is the overlap between the estimated predicted bounding box and the true bounding box of the dot image to be detected in the dot matrix image, Distance_2 is the distance between the center point of the estimated predicted bounding box and the center point of the true bounding box, Distance_C is the diagonal length of the minimum enclosing rectangle obtained by the overlap between the estimated predicted bounding box and the true bounding box, and v is the influencing factor of the aspect ratio of the estimated predicted bounding box, and v is obtained according to the following formula:

[0027]

[0028] Among them, w gt is the width of the true bounding box, h gt is the height of the true bounding box, w p To evaluate the width of the predicted bounding box, h p Height of the predicted bounding box for evaluation.

[0029] In some embodiments, performing image preprocessing on the first to-be-detected dot matrix image based on a preset rule to obtain the preprocessed first to-be-detected dot matrix image includes:

[0030] Adjusting all of the first to-be-detected dot matrix images based on a preset image size to obtain an intermediate image;

[0031] All the intermediate images are normalized to obtain the preprocessed first dot matrix image to be detected.

[0032] In some embodiments, the structural processing of all the center point coordinates based on the dot position rule table to obtain the target point code result includes:

[0033] Constructing a three-dimensional array based on the dot position rule table, wherein the three-dimensional array includes the upper left corner coordinates and the corresponding value of the upper left corner coordinates of each dot image in the first dot matrix image to be detected;

[0034] Mapping all the center point coordinates into the three-dimensional array to determine the position corresponding value of each dot image in the first dot matrix image to be detected;

[0035] The position corresponding values ​​of all the dot images are accumulated to obtain the target point code result.

[0036] In a second aspect, an embodiment of the present application provides a control device, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the deep learning-based point code detection method as described in the first aspect.

[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising the control device of the embodiment of the second aspect.

[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the point code detection method based on deep learning as described in the first aspect.

[0039] The embodiment of the present application provides a method, device, equipment, and medium for detecting a dot code based on deep learning. The method includes: obtaining a first dot matrix image to be detected and a dot position rule table, wherein the first dot matrix image to be detected includes multiple dot images, and the dot position rule table records the position information of the dot images in the first dot matrix image to be detected; performing image preprocessing on the first dot matrix image to be detected based on a preset rule to obtain a preprocessed first dot matrix image to be detected; inputting the preprocessed first dot matrix image to be detected into a pre-trained target deep learning model for dot code detection to obtain the center point coordinates of all dot images corresponding to the first dot matrix image to be detected; performing structured processing on all the center point coordinates based on the dot position rule table to obtain the target point code result. According to the scheme provided by the embodiment of the present application, accurate point code detection in a complex background is achieved based on the mutual mapping between the dot position rule table and the center point coordinates processed by the deep learning model. Compared with the traditional image processing algorithm to detect the contour and determine the point code position scheme, the present application can effectively improve the accuracy of point code detection and meet user needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flowchart of a point code detection method based on deep learning provided by an embodiment of the present application;

[0041] Figure 2 is a flowchart of steps for obtaining the center point coordinates of all dot images corresponding to the first dot matrix image to be detected, provided by another embodiment of the present application;

[0042] Figure 3 is a flowchart of the steps of training a target deep learning model provided by another embodiment of the present application;

[0043] Figure 4 is a flowchart of the steps of training a target deep learning model provided by another embodiment of the present application;

[0044] Figure 5 is a flowchart of steps for preprocessing a first dot matrix image to be detected provided by another embodiment of the present application;

[0045] Figure 6is a flowchart of steps for obtaining a target point code result provided by another embodiment of the present application;

[0046] Figure 7 is a structural diagram of a control device provided by another embodiment of the present application;

[0047] Figure 8 is a schematic diagram of a target deep learning model provided by another embodiment of the present application;

[0048] Fig. 9 is a schematic diagram of a dot matrix image to be detected provided by another embodiment of the present application;

[0049] Fig.10 This is a schematic diagram of a dot matrix image to be detected provided by another embodiment of the present application

[0050] Fig.11 It is a schematic diagram of a dot matrix image to be detected provided by another embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] It is understood that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flow chart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0053] Dot code detection is a key technology in the field of industrial production and automation, used to detect dot codes on products and interpret their information. In industrial production, in order to achieve traceability from production to sales, dot codes are usually used for tracking. Dot codes usually include a two-dimensional matrix composed of multiple dots, which are used to represent text characters, numbers, barcodes, QR codes, patterns or other information. The existing dot code detection solution uses traditional image processing algorithms for detection. However, in production sites with complex environments and high noise pollution, the image recognition accuracy for complex backgrounds is low and cannot meet user needs.

[0054] In order to solve the above-mentioned problems, the embodiment of the present application provides a method, device, equipment, and medium for detecting a dot code based on deep learning. The method includes: obtaining a first dot matrix image to be detected and a dot position rule table, wherein the first dot matrix image to be detected includes multiple dot images, and the dot position rule table records the position information of the dot images in the first dot matrix image to be detected; performing image preprocessing on the first dot matrix image to be detected based on a preset rule to obtain a preprocessed first dot matrix image to be detected; inputting the preprocessed first dot matrix image to be detected into a pre-trained target deep learning model for dot code detection to obtain the center point coordinates of all dot images corresponding to the first dot matrix image to be detected; performing structured processing on all the center point coordinates based on the dot position rule table to obtain the target dot code result. According to the scheme provided by the embodiment of the present application, accurate dot code detection under complex background is realized based on the mutual mapping of the dot position rule table and the center point coordinates after processing by the deep learning model. Compared with the traditional image processing algorithm to detect the contour and determine the dot code position scheme, the present application can effectively improve the accuracy of dot code detection and meet user needs.

[0055] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0056] refer to Figure 1 , Figure 1 Yes, the embodiment of the present application provides a point code detection method based on deep learning, which includes but is not limited to the following steps:

[0057] Step S110, obtaining a first dot matrix image to be detected and a dot position rule table, wherein the first dot matrix image to be detected includes a plurality of dot images, and the dot position rule table records position information of the dot images in the first dot matrix image to be detected;

[0058] Step S120, performing image preprocessing on the first to-be-detected dot matrix image based on a preset rule to obtain a preprocessed first to-be-detected dot matrix image;

[0059] Step S130, inputting the preprocessed first dot matrix image to be detected into a pre-trained target deep learning model for dot code detection, and obtaining the center point coordinates of all dot images corresponding to the first dot matrix image to be detected;

[0060] Step S140, structurally processing all center point coordinates based on the dot position rule table to obtain a target point code result.

[0061] It should be noted that the distribution of the dot images in the first dot matrix image to be detected in this embodiment can be as follows: Fig. 9 , Fig.10 and Fig.11As shown, the distribution of dot images corresponding to different first dot matrix images to be detected may be different. For example, Fig. 9 and Fig.11 Corresponding to different point code rules, Fig. 9 and Fig.10 Corresponding to the same dot code rule, different dot codes, therefore, each first dot matrix image to be detected needs to determine the corresponding dot position rule table for subsequent structured processing.

[0062] It should be noted that the position information of the dot image in the first dot matrix image to be detected in this embodiment includes the position coordinates of the dot image in the first dot matrix image to be detected and the corresponding values ​​of the coordinates (such as Figures 9 to 11 As shown, the value in the upper left corner of each dotted box is the coordinate corresponding value, and the position coordinate is the position coordinate of the corresponding dot image in the first dot matrix image to be detected), which provides an effective data basis for the subsequent structured processing of the center point coordinates of the dot image of the first dot matrix image to be detected.

[0063] It can be understood that the point code detection method of this embodiment is specifically as follows: after obtaining the first dot matrix image to be detected and the dot position rule table, the first dot matrix image to be detected is image preprocessed based on the preset rules to obtain the preprocessed first dot matrix image to be detected, so as to eliminate irrelevant information in the first dot matrix image to be detected, restore useful real information, enhance the detectability of relevant information, thereby improving the reliability of subsequent applications of the first dot matrix image to be detected, and reducing the possibility of overfitting of the network model; then, the preprocessed first dot matrix image to be detected is input into the pre-trained target deep learning model for point code detection, and the center point coordinates of all dot images corresponding to the first dot matrix image to be detected are obtained, and all the center point coordinates are structured based on the dot position rule table to obtain the target point code result. According to the scheme provided by the embodiment of the present application, based on the mutual mapping of the dot position rule table and the center point coordinates after processing by the deep learning model, accurate point code detection under complex background is realized. Compared with the traditional image processing algorithm to detect the contour and determine the point code position scheme, the present application can effectively improve the accuracy of point code detection and meet user needs.

[0064] In addition, refer to Figure 2In some embodiments, the center point coordinates include first coordinate information, second coordinate information, and third coordinate information. The target deep learning model includes a Backbone module 100, a Neck module 200, and a Head module 300. The Backbone module 100 includes a CBL module 110, multiple feature extraction modules 120, and a SFFP module connected in sequence. Each feature extraction module 120 includes a CBL module and a first CSP module CSP1_3. The Neck module 200 includes multiple feature upsampling modules 210 and two feature fusion modules 220 connected in sequence. Each feature upsampling module 210 includes CBL module, upsampling module, Concat module and second CSP module CSP2_3, each feature fusion module 220 includes a CBL module, a Concat module and a second CSP module, the Head module 300 includes a first convolution module 310, a second convolution module 320 and a third convolution module 330, the first convolution module 310 is connected to the second CSP module in the feature upsampling module 210 in the Neck module 200 that is arranged before the feature fusion module 220, the second convolution module 320 and the third convolution module 330 are respectively connected to the second CSP module in each feature fusion module 220, Figure 1 Step S130 includes but is not limited to the following steps:

[0065] Step S210, inputting the preprocessed first dot matrix image to be detected into the CBL module 110, the plurality of feature extraction modules 120 and the SFFP module sequentially connected in the Backbone module 100 for feature extraction processing to obtain a first feature image;

[0066] Step S220, inputting the first feature image into a plurality of feature upsampling modules 210 and two feature fusion modules 220 sequentially connected in the Neck module 200 for upsampling and feature fusion processing, to obtain a second feature image, a third feature image and a fourth feature image, wherein the second feature image is an image output by the second CSP module in the feature upsampling module 210 in the first convolution module 310 and the Neck module 200 that is arranged before the feature fusion module 220, and the third feature image and the fourth feature image are images output by the second CSP modules in the two feature fusion modules 220 respectively;

[0067] Step S230, inputting the second feature image into the first convolution module 310 for convolution processing to obtain first coordinate information;

[0068] Step S240, inputting the third feature image into the second convolution module 320 for convolution processing to obtain second coordinate information;

[0069] Step S250: input the fourth feature image into the third convolution module 330 for convolution processing to obtain third coordinate information.

[0070] It should be noted that in the target deep learning model of the embodiment of the present application, the specific number of feature extraction modules in the Backbone module and the feature upsampling modules in the Neck module are not limited, and those skilled in the art can adjust them according to actual needs. For example, Figure 8 As shown, the Backbone module of the target deep learning model of this embodiment includes two feature extraction modules, and the Neck module includes two feature upsampling modules.

[0071] It is understandable that based on Figure 8 The target deep learning model shown in the figure inputs the preprocessed first dot matrix image to be detected into the CBL module, multiple feature extraction modules and SFFP modules connected in sequence in the Backbone module for feature extraction processing to obtain a first feature image, which can gradually reduce the size of the feature map while increasing the number of channels, so as to retain and extract important features in the preprocessed first dot matrix image to be detected; then, the first feature image is input into the multiple feature upsampling modules and two feature fusion modules connected in sequence in the Neck module for upsampling and feature fusion processing to obtain a second feature image, a third feature image and a fourth feature image, wherein the second feature image is a feature image that is arranged before the feature fusion module in the first convolution module and the Neck module. The image output by the second CSP module in the upsampling module, the third feature image and the fourth feature image are the images output by the second CSP module in the two feature fusion modules respectively, which can further perform feature fusion and upsampling operations to provide more advanced semantic information and the ability to adapt to pictures of different scales; finally, the second feature image is input into the first convolution module for convolution processing to obtain the first coordinate information; the third feature image is input into the second convolution module for convolution processing to obtain the second coordinate information; the fourth feature image is input into the third convolution module for convolution processing to obtain the third coordinate information, so as to further process the extracted image features and generate the final output results, thereby providing an effective data basis for subsequent structured processing.

[0072] In addition, refer to Figure 3 In some embodiments, the training method of the target deep learning model of the embodiment of the present application includes but is not limited to the following steps:

[0073] Step S310, obtaining a plurality of second dot matrix images to be detected, and performing data cleaning and data labeling processing on the second dot matrix images to be detected to obtain a third dot matrix image to be detected, wherein the third dot matrix image to be detected carries a dot label, and the dot label indicates category information and position information of the dot image in the third dot matrix image to be detected;

[0074] Step S320, dividing all third dot images to be detected into a test set and a training set according to a preset ratio based on the dot labels;

[0075] Step S330, training the initial deep learning model based on the training set to obtain an intermediate model;

[0076] Step S340, perform performance evaluation on the intermediate model based on the test set and the preset loss function. When the loss function value corresponding to the intermediate model is less than the preset threshold, the intermediate model is determined as the target deep learning model.

[0077] In addition, refer to Figure 4 In some embodiments, the point code detection method based on deep learning of this embodiment includes but is not limited to the following steps:

[0078] Step S410, when the loss function value corresponding to the intermediate model is greater than or equal to the preset threshold, a plurality of second dot matrix images to be detected are reacquired, and the second dot matrix images to be detected are sorted, data cleaned and data labeled to obtain a third dot matrix image to be detected;

[0079] Step S420, based on the dot labels carried by each third dot matrix image to be detected, re-dividing all the third dot matrix images to be detected into a test set and a training set according to a preset ratio;

[0080] Step S430, train the initial deep learning model based on the training set to obtain an intermediate model, and evaluate the performance of the intermediate model based on the test set and a preset loss function until the loss function value corresponding to the intermediate model is less than a preset threshold, and determine the intermediate model as the target deep learning model.

[0081] It should be noted that, in general, the dot matrix image corresponds to Fig. 9 As shown, dots are of two types: circular and elliptical. However, in complex environments, dots may have different features on the image. For example, Figure 10 to Figure 11 The performance characteristics shown, therefore, the second dot matrix image to be detected obtained in the embodiment of the present application needs to ensure that the number of each feature image is balanced, otherwise it will affect the training and performance of the deep learning model.

[0082] It should be noted that the step of organizing the second dot matrix image to be detected is to process the size of the image and unify the size so that it can be put into the deep learning model for training and testing. The data cleaning step is to check the image, delete duplicate images and irrelevant images, and ensure data quality. The data annotation processing step is the process of assigning corresponding category labels to the image and generating a label file.

[0083] It should be noted that the preset ratio can be determined by those skilled in the art according to actual needs, and this embodiment does not impose any restrictions thereon, and the test set and training set obtained by division are independent of each other.

[0084] It should be noted that the performance evaluation criteria of the embodiments of the present application may include accuracy, recall, precision, etc., which can be selected by those skilled in the art according to actual conditions. For example, the loss function value corresponding to the intermediate model obtained after each training is completed may be calculated, and the loss function value may be compared with a preset threshold. When the loss function value corresponding to the intermediate model is less than the preset threshold, it means that the performance evaluation of the intermediate model passes, and the intermediate model is determined as the target deep learning model; when the loss function value corresponding to the intermediate model is greater than or equal to the preset threshold, it means that the performance evaluation of the intermediate model fails, and multiple second dot matrix images to be detected are re-acquired, and the second dot matrix images to be detected are The third dot matrix images are sorted, the data are cleaned and the data are labeled to obtain the third dot matrix images to be detected; based on the dot labels carried by each third dot matrix image to be detected, all the third dot matrix images to be detected are re-divided into a test set and a training set according to a preset ratio; the initial deep learning model is trained based on the training set to obtain an intermediate model, and the performance of the intermediate model is evaluated based on the test set and a preset loss function until the loss function value corresponding to the intermediate model is less than a preset threshold, and the intermediate model is determined as the target deep learning model, and in the process of iterative repeated training, the number and types of images are continuously increased to expand the sample, thereby improving the performance of the target deep learning model.

[0085] It should be noted that the loss function of this embodiment is obtained according to the following formula:

[0086]

[0087] Among them, LOSS is the loss function, IOU is the overlap between the estimated predicted bounding box and the true bounding box of the dot image to be detected in the dot matrix image, Distance_2 is the distance between the center point of the estimated predicted bounding box and the center point of the true bounding box, Distance_C is the diagonal length of the minimum enclosing rectangle obtained by the overlap between the estimated predicted bounding box and the true bounding box, and v is the influencing factor of the aspect ratio of the estimated predicted bounding box, which is obtained according to the following formula:

[0088]

[0089] Among them, w gt is the width of the true bounding box, h gt is the height of the true bounding box, w p To evaluate the width of the predicted bounding box, h p Height of the predicted bounding box for evaluation.

[0090] In addition, refer to Figure 5 , in some embodiments, Figure 1 Step S120 includes but is not limited to the following steps:

[0091] Step S510, adjusting all first dot matrix images to be detected based on a preset image size to obtain an intermediate image;

[0092] Step S520: normalize all the intermediate images to obtain a pre-processed first dot matrix image to be detected.

[0093] It should be noted that the present embodiment does not limit the specific preset image size, which may be 640*640*3, and those skilled in the art may determine it according to actual needs.

[0094] It can be understood that by adjusting all the first dot matrix images to be detected based on the preset image size, an intermediate image of a uniform size can be obtained. Then, all the intermediate images are normalized to obtain the preprocessed first dot matrix image to be detected, ensuring that the image is a three-channel image, thereby providing an effective data basis for obtaining reliable target point code detection results in the future.

[0095] In addition, refer to Figure 6 , in some embodiments, Figure 1 Step S140 includes but is not limited to the following steps:

[0096] Step S610, constructing a three-dimensional array based on the dot position rule table, the three-dimensional array including the upper left corner coordinates and the corresponding value of the upper left corner coordinates of each dot image in the first dot matrix image to be detected;

[0097] Step S620, mapping all center point coordinates into a three-dimensional array, and determining the position corresponding value of each dot image in the first dot matrix image to be detected;

[0098] Step S630, accumulating the position corresponding values ​​of all the dot images to obtain the target point code result.

[0099] It can be understood that the structured processing process of this embodiment is essentially to decode the result obtained after feature extraction of the target deep learning result. Specifically, this embodiment constructs a three-dimensional array based on the dot position rule table, and the three-dimensional array includes the upper left corner coordinates and the corresponding value of the upper left corner coordinates of each dot image in the first dot matrix image to be detected; all the center point coordinates are mapped to the three-dimensional array, the position corresponding values ​​of each dot image in the first dot matrix image to be detected are determined, and the position corresponding values ​​of all the dot images are accumulated to obtain the target point code result. That is to say, this embodiment realizes accurate point code detection under complex backgrounds based on the mutual mapping of the dot position rule table and the center point coordinates after deep learning model processing. Compared with the traditional image processing algorithm to detect the contour and determine the point code position solution, this application can effectively improve the accuracy of point code detection and meet user needs.

[0100] like Figure 7 As shown, Figure 7 700 is a block diagram of an electronic device provided by an embodiment of the present application. The present invention also provides an electronic device 700, including:

[0101] The processor 710 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0102] The memory 720 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 720 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 720, and the processor 710 calls and executes the point code detection method based on deep learning in the embodiment of this application;

[0103] Input / output interface 730, used to implement information input and output;

[0104] Communication interface 740, used to realize communication interaction between the present apparatus and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);

[0105] bus 750 , which transmits information between the various components of the device (e.g., processor 710 , memory 720 , input / output interface 730 , and communication interface 740 );

[0106] The processor 710 , the memory 720 , the input / output interface 730 , and the communication interface 740 are connected to each other in communication within the device via the bus 750 .

[0107] An embodiment of the present application further provides an electronic device, comprising the control device 700 of the above embodiment.

[0108] The embodiment of the present application further provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned point code detection method based on deep learning is implemented.

[0109] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0110] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above implementation. Those skilled in the art may also make various equivalent modifications or substitutions under the shared conditions that do not violate the spirit of the present invention, and these equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A point code detection method based on deep learning, characterized in that: include: Acquire a first dot matrix image to be detected and a dot position rule table, wherein the first dot matrix image to be detected includes a plurality of dot images, and the dot position rule table records position information of the dot images in the first dot matrix image to be detected; Performing image preprocessing on the first to-be-detected dot matrix image based on a preset rule to obtain a preprocessed first to-be-detected dot matrix image; Input the preprocessed first dot matrix image to be detected into a pre-trained target deep learning model for dot code detection, and obtain the center point coordinates of all dot images corresponding to the first dot matrix image to be detected; Based on the dot position rule table, all the center point coordinates are structured to obtain the target point code result.

2. The point code detection method based on deep learning according to claim 1 is characterized in that: The center point coordinates include first coordinate information, second coordinate information and third coordinate information. The target deep learning model includes a Backbone module, a Neck module and a Head module. The Backbone module includes a CBL module, multiple feature extraction modules and a SFFP module connected in sequence. Each of the feature extraction modules includes the CBL module and a first CSP module. The Neck module includes multiple feature upsampling modules and two feature fusion modules connected in sequence. Each of the feature upsampling modules includes the CBL module, an upsampling module, a Concat module and a second CSP module. Each of the feature fusion modules includes the CBL module, an upsampling module, a Concat module and a second CSP module. L module, the Concat module and the second CSP module, the Head module includes a first convolution module, a second convolution module and a third convolution module, the first convolution module is connected to the second CSP module in the feature upsampling module in the Neck module that is arranged before the feature fusion module, the second convolution module and the third convolution module are respectively connected to the second CSP modules in each of the feature fusion modules, the preprocessed first dot matrix image to be detected is input into a pre-trained target deep learning model for dot code detection, and the center point coordinates of all dot images corresponding to the first dot matrix image to be detected are obtained, including: Inputting the preprocessed first dot matrix image to be detected into the CBL module, multiple feature extraction modules and SFFP module connected in sequence in the Backbone module for feature extraction processing to obtain a first feature image; Input the first feature image to a plurality of feature upsampling modules and two feature fusion modules sequentially connected in the Neck module for upsampling and feature fusion processing to obtain a second feature image, a third feature image and a fourth feature image, wherein the second feature image is an image output by the second CSP module in the feature upsampling module in the first convolution module and the Neck module that is arranged before the feature fusion module, and the third feature image and the fourth feature image are images output by the second CSP modules in the two feature fusion modules respectively; Inputting the second feature image into the first convolution module for convolution processing to obtain the first coordinate information; Inputting the third feature image into the second convolution module for convolution processing to obtain the second coordinate information; The fourth feature image is input into the third convolution module for convolution processing to obtain the third coordinate information.

3. The point code detection method based on deep learning according to claim 1, characterized in that: The target deep learning model is trained according to the following steps: Acquire a plurality of second dot matrix images to be detected, and perform data cleaning and data labeling processing on the second dot matrix images to be detected to obtain a third dot matrix image to be detected, wherein the third dot matrix image to be detected carries a dot label, and the dot label indicates category information and position information of the dot image in the third dot matrix image to be detected; Based on the dot labels, all third dot matrix images to be detected are divided into a test set and a training set according to a preset ratio; Training the initial deep learning model based on the training set to obtain an intermediate model; The performance of the intermediate model is evaluated based on the test set and a preset loss function. When the loss function value corresponding to the intermediate model is less than a preset threshold, the intermediate model is determined as the target deep learning model.

4. The point code detection method based on deep learning according to claim 3 is characterized in that: The method further comprises: When the loss function value corresponding to the intermediate model is greater than or equal to the preset threshold, a plurality of the second dot matrix images to be detected are reacquired, and the second dot matrix images to be detected are sorted, data cleaned and data labeled to obtain the third dot matrix image to be detected; Based on the dot labels carried by each of the third dot matrix images to be detected, re-dividing all the third dot matrix images to be detected into the test set and the training set according to a preset ratio; The initial deep learning model is trained based on the training set to obtain the intermediate model, and the performance of the intermediate model is evaluated based on the test set and a preset loss function until the loss function value corresponding to the intermediate model is less than a preset threshold, and the intermediate model is determined as the target deep learning model.

5. The point code detection method based on deep learning according to claim 3 is characterized in that: The loss function is obtained according to the following formula: Wherein, LOSS is the loss function, IOU is the overlap between the estimated predicted bounding box and the true bounding box of the dot image to be detected in the dot matrix image, Distance_2 is the distance between the center point of the estimated predicted bounding box and the center point of the true bounding box, Distance_C is the diagonal length of the minimum enclosing rectangle obtained by the overlap between the estimated predicted bounding box and the true bounding box, and v is the influencing factor of the aspect ratio of the estimated predicted bounding box, and v is obtained according to the following formula: Among them, w gt is the width of the true bounding box, h gt is the height of the true bounding box, w p To evaluate the width of the predicted bounding box, h p Height of the predicted bounding box for evaluation.

6. The point code detection method based on deep learning according to claim 1, characterized in that: The performing image preprocessing on the first to-be-detected dot matrix image based on a preset rule to obtain the preprocessed first to-be-detected dot matrix image includes: Adjusting all of the first to-be-detected dot matrix images based on a preset image size to obtain an intermediate image; All the intermediate images are normalized to obtain the preprocessed first dot matrix image to be detected.

7. The point code detection method based on deep learning according to claim 1, characterized in that: The structural processing of all the center point coordinates based on the dot position rule table to obtain the target point code result includes: Constructing a three-dimensional array based on the dot position rule table, wherein the three-dimensional array includes the upper left corner coordinates and the corresponding value of the upper left corner coordinates of each dot image in the first dot matrix image to be detected; Mapping all the center point coordinates into the three-dimensional array to determine the position corresponding value of each dot image in the first dot matrix image to be detected; The position corresponding values ​​of all the dot images are accumulated to obtain the target point code result.

8. A control device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the deep learning-based point code detection method as described in any one of claims 1 to 7.

9. An electronic device, characterized in that: Comprising the control device as claimed in claim 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the point code detection method based on deep learning as described in any one of claims 1 to 7.