Glue dispensing method, device, equipment and storage medium

By performing illumination normalization and Gaussian blur processing on the dispensing sample image, generating a reference circle and performing feature extraction and fusion of the prediction results, the dispensing deviation problem caused by uneven lighting is solved and high-precision dispensing positioning is achieved.

CN115393309BActive Publication Date: 2025-09-05WUYI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211004657.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-09-05
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

The changing lighting environment causes deviations in the dispensing position of the image processing algorithm, resulting in poor dispensing results.

Method used

By obtaining training images of standard dispensing templates, performing illumination normalization and Gaussian blur smoothing processing, multiple reference circles with different radii are generated, and multiple feature extraction modules are used for feature extraction and prediction. The prediction results are fused, and the positioning model is adjusted until the loss function is optimal, and the dispensing machine is controlled to perform dispensing.

Benefits of technology

It improves the accuracy of dispensing positioning, solves the problem of uneven lighting, and achieves fast and accurate dispensing positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393309B_ABST
    Figure CN115393309B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a dispensing method, apparatus, equipment and storage medium, which obtain a Gaussian image by performing illumination normalization processing and Gaussian blur smoothing processing on a training image; generate multiple reference circles with different radii; extract features from the image through a feature extraction module; predict multiple image features based on the coordinates and radius of the reference circle to obtain multiple prediction results, and fuse the multiple prediction results to obtain a fusion result; train a trained positioning model based on the fusion result; control a dispensing machine to perform dispensing based on the trained positioning model; solve the problem of uneven image illumination through illumination normalization technology; the positioning model has the advantage of being lightweight and can quickly complete the dispensing positioning task; and improve the accuracy of positioning prediction by setting a reference circle and fusing multiple prediction results obtained by the feature extraction module shared by multiple parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to, but are not limited to, the field of glue dispensing technology, and in particular to a glue dispensing method, device, equipment, and storage medium. Background Art

[0002] Glue dispensers are automated machines that apply fluids, such as glue, to surfaces or interiors of products. These machines typically use image processing algorithms to obtain dispensing position information, guiding the dispensing process. However, variable lighting conditions can affect captured images, making image processing algorithms ineffective in processing such images. This can lead to deviations in dispensing position and poor dispensing results. Summary of the Invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] Embodiments of the present invention provide a glue dispensing method, device, equipment, and storage medium, which can improve glue dispensing accuracy.

[0005] A first aspect of the present invention provides a dispensing method, comprising:

[0006] Obtaining a training image of a standard dispensing template, and inputting the training image into a positioning model, wherein the positioning model includes multiple feature extraction modules and predictors, wherein the multiple feature extraction modules have the same architecture and share parameters;

[0007] Performing illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image;

[0008] Generate multiple reference circles with different radii, taking each pixel of the training image and the Gaussian image as the center;

[0009] Performing feature extraction on the training image and the Gaussian image in a one-to-one correspondence through the feature extraction module to obtain a plurality of image features;

[0010] Based on the coordinates and radius of the reference circle, a predictor is used to predict the plurality of image features to obtain a plurality of prediction results, and the plurality of prediction results are fused to obtain a fusion result;

[0011] Adjusting parameters of the positioning model according to the fusion result until the loss function of the positioning model is optimal, thereby obtaining a trained positioning model;

[0012] An image of the dispensing plate is obtained, and the image of the dispensing plate is input into a trained positioning model to obtain an output result reflecting the position, radius and type of the colloid. The dispensing machine is controlled to perform dispensing according to the output result.

[0013] In some embodiments, the illumination normalization process is expressed by the following formula: Where WLD(I) represents the training image after illumination normalization, I(x,y) represents the pixel with x as the horizontal coordinate and y as the vertical coordinate in the training image; Δx and Δy represent the grayscale averages of the eight pixels adjacent to the pixel I(x,y), and A is a preset constant parameter.

[0014] In some embodiments, the Gaussian blur smoothing process is expressed by the following formula: Where G={G0,G1,...,G t ,...,G n} are n sub-images obtained by the Gaussian blur smoothing process of the illumination normalized training image, and w(m,n) is the Gaussian convolution weighting function.

[0015] In some embodiments, the feature extraction module includes a first convolutional layer, multiple bottleneck layers, an average pooling layer, and a linear layer connected in sequence; the feature extraction module performs feature extraction on the training image and the Gaussian image in a one-to-one correspondence to obtain multiple image features, including:

[0016] Performing a convolution operation on the training image and the Gaussian image through the first convolution layer to obtain a first feature;

[0017] Performing a parameter reduction operation on the first feature through the plurality of bottleneck layers to obtain a second feature;

[0018] Performing an average pooling operation on the second feature through the average pooling layer to obtain a third feature;

[0019] The third feature is subjected to a fitting and classification operation through the linear layer to obtain the image feature.

[0020] In some embodiments, during the dimensionality reduction operation, batch normalization is performed on the second feature, where the batch normalization is based on the mean and variance of the second feature.

[0021] In some embodiments, the average pooling operation is expressed as follows: Among them, m out represents the output of the average pooling operation, n*n represents the size of the pooling convolution kernel, t represents the average pooling threshold, a i Represents the value of the i-th pixel in the feature map within the pooled convolution kernel area.

[0022] In some embodiments, the loss function of the positioning model includes predicted coordinate loss, predicted radius loss, and predicted dispensing type loss.

[0023] A second aspect of the present invention provides a dispensing device, comprising:

[0024] An image input unit is used to obtain a training image of a standard dispensing template and input the training image into a positioning model, wherein the positioning model includes multiple feature extraction modules, and the multiple feature extraction modules have the same architecture and share parameters;

[0025] An image preprocessing unit, configured to perform illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image;

[0026] a reference circle generating unit, configured to generate a plurality of reference circles with different radii, with each pixel of the training image and the Gaussian image as the center;

[0027] a feature extraction unit, configured to perform feature extraction on the training image and the Gaussian image in a one-to-one correspondence through the feature extraction module to obtain a plurality of image features;

[0028] a prediction unit, configured to predict the plurality of image features using a predictor based on the coordinates and radius of the reference circle to obtain a plurality of prediction results, and fuse the plurality of prediction results to obtain a fusion result;

[0029] A parameter adjustment unit, configured to adjust the parameters of the positioning model according to the fusion result until the loss function of the positioning model is optimal, thereby obtaining a trained positioning model;

[0030] The dispensing unit is used to obtain an image of the dispensing plate, input the image of the dispensing plate into a trained positioning model, obtain an output result reflecting the position, radius and type of the colloid, and control the dispensing machine to perform dispensing according to the output result.

[0031] According to a third aspect of the present invention, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the dispensing method as described above when executing the computer program.

[0032] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, storing computer-executable instructions, wherein the computer-executable instructions are used to execute the dispensing method as described above.

[0033] The embodiment of the present invention includes: obtaining a training image of a standard dispensing template, inputting the training image into a positioning model; performing illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image; generating a plurality of reference circles with different radii with each pixel point of the training image and the Gaussian image as the center; performing feature extraction on the training image and the Gaussian image in a one-to-one correspondence through a feature extraction module to obtain a plurality of image features; predicting the plurality of image features based on the coordinates and radius of the reference circle through a predictor to obtain a plurality of prediction results, fusing the plurality of prediction results to obtain a fusion result; and performing a fusion analysis on the training image and the Gaussian image according to the fusion result. The positioning model is adjusted until the loss function of the positioning model is optimized, thereby obtaining a trained positioning model; an image of the dispensing plate is obtained, and the image of the dispensing plate is input into the trained positioning model to obtain an output result reflecting the position, radius, and type of the colloid, and the dispensing machine is controlled to perform dispensing according to the output result; the problem of uneven image illumination is solved through illumination normalization technology, thereby improving the accuracy of dispensing positioning; the positioning model has the advantage of being lightweight and can quickly complete the dispensing positioning task; the positioning prediction accuracy is improved by setting a reference circle and fusing multiple prediction results obtained by the feature extraction module shared by multiple parameters.

[0034] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.

[0036] Figure 1 It is a step diagram of the dispensing method;

[0037] Figure 2 This is a diagram of the steps for feature extraction through the feature extraction module;

[0038] Figure 3 It is a schematic diagram of feature extraction;

[0039] Figure 4 It is the structural diagram of the feature extraction module;

[0040] Figure 5 It is a structural diagram of the dispensing device. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and the like in the specification, claims, or accompanying drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0043] The present invention provides a dispensing method, device, equipment and storage medium, which obtains a training image of a standard dispensing template and inputs the training image into a positioning model; performs illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image; generates a plurality of reference circles with different radii with each pixel point of the training image and the Gaussian image as the center; performs feature extraction on the training image and the Gaussian image in a one-to-one correspondence through the feature extraction module to obtain a plurality of image features; predicts the plurality of image features based on the coordinates and radius of the reference circle through a predictor to obtain a plurality of prediction results, and fuses the plurality of prediction results to obtain a fusion Results; the positioning model is adjusted according to the fusion result until the loss function of the positioning model is optimized, thereby obtaining a trained positioning model; an image of the dispensing plate is acquired, and the image of the dispensing plate is input into the trained positioning model to obtain an output result reflecting the position, radius and type of the colloid, and the dispensing machine is controlled to perform dispensing according to the output result; the problem of uneven image illumination is solved through illumination normalization technology, thereby improving the accuracy of dispensing positioning; the positioning model has the advantage of being lightweight and can quickly complete the dispensing positioning task; the positioning prediction accuracy is improved by setting a reference circle and fusing multiple prediction results obtained by a feature extraction module shared by multiple parameters.

[0044] The embodiments of the present invention are further described below with reference to the accompanying drawings.

[0045] Reference Figure 1 An embodiment of the present invention provides a dispensing method. The dispensing method includes:

[0046] Step S100, obtaining a training image of a standard dispensing template and inputting the training image into a positioning model;

[0047] Step S200, performing illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image;

[0048] Step S300, generating multiple reference circles with different radii with each pixel of the training image and the Gaussian image as the center;

[0049] Step S400, performing feature extraction on the training image and the Gaussian image in a one-to-one correspondence through a feature extraction module to obtain a plurality of image features;

[0050] Step S500 , based on the coordinates and radius of the reference circle, a predictor is used to predict multiple image features to obtain multiple prediction results, and the multiple prediction results are fused to obtain a fusion result;

[0051] Step S600: Adjust the parameters of the positioning model according to the fusion result until the loss function of the positioning model is optimal, thereby obtaining a trained positioning model;

[0052] Step S700: Acquire an image of the dispensing plate, input the image of the dispensing plate into a trained positioning model, obtain an output result reflecting the position, radius and type of the colloid, and control the dispensing machine to perform dispensing according to the output result.

[0053] It can be understood that steps S100 to S600 are steps for training the positioning model, and step S700 is a step for real-time application of the positioning model.

[0054] In step S100, images of standard dispensing templates are collected by crawling them from the internet, acquiring them from large image databases, or photographing them with a camera. Furthermore, images with high similarity and junk data need to be cleaned to reduce interference. The images of the standard dispensing templates are cropped to a uniform size, which helps enhance the stability of model training.

[0055] Intelligent labeling software labels each dispensing location and type in a dataset formed from images of standard dispensing templates. 25% of the dataset is used as a training set, and 75% as a validation set. Finally, manual review corrects incorrect labels, significantly reducing the cost of purely manual labeling.

[0056] In step S200, the training image is subjected to illumination normalization processing, and the illumination normalization processing is expressed by the following formula: Where WLD(I) represents the training image after illumination normalization, I(x,y) represents the pixel with x as the horizontal coordinate and y as the vertical coordinate in the training image; Δx and Δy represent the grayscale averages of the eight pixels adjacent to the pixel I(x,y), and A is a preset constant parameter whose value range is {-1, 0, 1}, that is, the value of A can be -1, 0, or 1.

[0057] Through illumination normalization, the grayscale value of each pixel is reduced to the grayscale value of its neighboring pixels, and normalized so that the grayscale values ​​are in a distribution. The illumination normalization technology solves the problem of uneven image illumination and improves the accuracy of dispensing positioning.

[0058] Gaussian blur smoothing is performed on the training image after illumination normalization to obtain a Gaussian image. Gaussian blur smoothing is expressed by the following formula: Where G={G0,G1,...,G t ,...,G n} are the n sub-images obtained by Gaussian blurring and smoothing the illumination-normalized training image, and w(m,n) is the Gaussian convolution weighting function.

[0059] For step S300, a plurality of reference circles with different radii are generated with each pixel of the training image and the Gaussian image as the center. In this embodiment, the number of reference circles is three, and the radius ratio of the three reference circles for each pixel is 1:1.2:1.5, and the base is the size of a single pixel. The generation of multiple reference circles can provide a reference comparison circle center coordinate for subsequent positioning model prediction, and different radius ratios can further predict dispensing targets of various sizes and realize multi-target positioning detection. Of course, in other embodiments, the reference circle can be set to other numbers according to actual needs, such as four.

[0060] For step S400, refer to Figure 3 The positioning model includes multiple feature extraction modules, each of which has the same architecture and shares parameters. In this embodiment, the number of feature extraction modules is three; of course, in other embodiments, the number of feature extraction modules can be set according to actual needs, such as four.

[0061] Reference Figure 4 The feature extraction module includes a first convolutional layer 110, multiple bottleneck layers 120, an average pooling layer 130 and a linear layer 140 connected in sequence; the training image and the Gaussian image are subjected to feature extraction through the feature extraction module in a one-to-one correspondence to obtain multiple image features.

[0062] Reference Figure 2 For each feature extraction module, the input image is a training image, a Gaussian image, or a feature image output by the previous feature extraction module. It performs feature extraction on the input image, including but not limited to the following steps:

[0063] Step S410, performing a convolution operation on the input image through the first convolution layer 110 to obtain a first feature;

[0064] Step S420 , performing a parameter reduction operation on the first feature through multiple bottleneck layers 120 to obtain a second feature;

[0065] Step S430, performing an average pooling operation on the second feature through the average pooling layer 130 to obtain a third feature;

[0066] In step S440 , the third feature is subjected to fitting and classification operation through the linear layer 140 to obtain image features.

[0067] It is understandable that, for example, there are two batches of Gaussian images, that is, one batch of training images passes through one feature extraction module, one batch of Gaussian images passes through another feature extraction module, and another batch of Gaussian images passes through yet another feature extraction module. The three feature extraction modules have the same architecture and shared parameters.

[0068] The feature extraction module performs a convolution operation on the input image through at least one first convolution layer 110 to obtain a first feature; the input image can be a training image or a Gaussian image. The first convolution layer 110 is a Conv2d convolution layer.

[0069] The second feature is obtained by performing a dimensionality reduction operation through multiple bottleneck layers 120; for the bottleneck layer 120, it can reduce the amount of parameters, perform pointwise convolution on the data through a 1x1 convolution layer to achieve dimensionality reduction, then perform convolution with a conventional convolution kernel, and finally perform point convolution on the data through a 1x1 convolution layer to achieve dimensionality increase; by using multiple small convolution kernels to replace a large convolution kernel, and using a 1x1 convolution kernel to replace part of the work of the large convolution kernel, the amount of parameters can be reduced.

[0070] In addition, during the dimensionality reduction operation, the second feature is batch normalized, and the batch normalization is based on the mean and variance of the second feature. Specifically, the batch normalization can be expressed by the following formula: Among them, N is the number of data in each batch of data sets, a i Represents the i-th input data, A i represents the i-th output result obtained after batch normalization of the i-th input data, μ represents the mean of the data in each batch of data sets, δ 2 Represents the variance of the data in each batch of data sets, and γ and β are learned by the network through the back propagation algorithm during training.

[0071] The second feature is average pooled by at least one average pooling layer 130, and the regional average feature value is calculated by the convolution kernel to extract the third feature.

[0072] Finally, the third feature is fitted and classified by the linear layer 140 to obtain the image feature.

[0073] The average pooling operation is expressed as follows: Among them, m out represents the output of the average pooling operation, n*n represents the size of the pooling convolution kernel, t represents the average pooling threshold, a i Represents the value of the i-th pixel in the feature map within the pooled convolution kernel area.

[0074] The average pooling operation can focus on the main image features, allowing the model to focus on the main features more effectively during training. This also reduces the amount of computation required for model training and prevents overfitting to a certain extent.

[0075] In step S500, based on the coordinates and radius of the reference circle, a predictor is used to predict multiple image features to obtain multiple prediction results; based on the coordinates and radius of the reference circle, the coordinates and radius of the prediction point are generated, i.e., the prediction result, which is expressed as (c x , c y , r i ). According to the real standard dispensing template with annotations, the coordinates and radius of the real target can be obtained, which is expressed as (x r ,y r , r r ). At the same time, set the x coordinate offset to x i , the y-coordinate offset is y i .

[0076] The relationship between the predicted value and the true value can be expressed by the following formula: By decoding, we can get x i 、y i 、r i The three quantities, parameter p, are learned during the network training process.

[0077] By minimizing the gap between the true value and the predicted value, the predicted point gradually approaches the reference circle. i ) can prevent it from being larger than one grid, so that x i The value is in the range of [0,1]. i ) can prevent it from being larger than one grid, so that y i The value is in the range of [0,1].

[0078] Fusing multiple prediction results to obtain a fusion result is beneficial to improving the prediction accuracy of the model.

[0079] In step S600, the positioning model is adjusted according to the fusion result until the loss function of the positioning model is optimized, thereby obtaining a trained positioning model. The optimal loss function of the positioning model is usually the minimum loss function of the positioning model.

[0080] The loss function of the positioning model includes predicted coordinate loss, predicted radius loss, and predicted dispensing type loss.

[0081] The loss function of the positioning model is expressed as follows:

[0082]

[0083] Among them, loss represents the total loss, the first part of the loss function represents the predicted coordinate loss, the second part represents the predicted radius loss, and the third part represents the predicted dispensing type loss. class are the weights of the three losses respectively. These three parameters are learned during the network training process.

[0084] For step S700, an image of the dispensing plate is obtained, and the image of the dispensing plate is input into the trained positioning model to obtain an output result reflecting the position, radius and type of the colloid, and the output result is converted into a world coordinate system. The dispensing machine is controlled to perform dispensing according to the output result of the world coordinate system.

[0085] Reference Figure 5 The embodiments of the present invention further provide a dispensing device. The dispensing device includes an image input unit 210, an image preprocessing unit 220, a reference circle generation unit 230, a feature extraction unit 240, a prediction unit 250, a parameter adjustment unit 260, and a dispensing unit 270.

[0086] Among them, the image input unit 210 is used to obtain the training image of the standard dispensing template and input the training image into the positioning model. The positioning model includes multiple feature extraction modules. The multiple feature extraction modules have the same architecture and share parameters. The image preprocessing unit 220 is used to perform illumination normalization and Gaussian blur smoothing on the training image to obtain a Gaussian image. The reference circle generation unit 230 is used to generate multiple reference circles with different radii with each pixel point of the training image and the Gaussian image as the center. The feature extraction unit 240 is used to perform feature extraction on the training image and the Gaussian image one by one. Feature extraction is used to obtain multiple image features; the prediction unit 250 is used to predict the multiple image features through the predictor based on the coordinates and radius of the reference circle to obtain multiple prediction results, and the multiple prediction results are fused to obtain a fusion result; the parameter adjustment unit 260 is used to adjust the parameters of the positioning model according to the fusion result until the loss function of the positioning model is optimal, and a trained positioning model is obtained; the dispensing unit 270 is used to obtain the image of the dispensing plate, input the image of the dispensing plate into the trained positioning model, obtain an output result reflecting the position, radius and type of the colloid, and control the dispensing machine to perform dispensing according to the output result.

[0087] In this embodiment, a training image of a standard dispensing template is obtained and input into a positioning model; the training image is subjected to illumination normalization and Gaussian blur smoothing to obtain a Gaussian image; a plurality of reference circles with different radii are generated with each pixel point of the training image and the Gaussian image as the center; the training image and the Gaussian image are subjected to feature extraction by the feature extraction module in a one-to-one correspondence to obtain a plurality of image features; based on the coordinates and radius of the reference circle, a plurality of image features are predicted by a predictor to obtain a plurality of prediction results, and the plurality of prediction results are fused to obtain a fusion result; according to the fusion The positioning model is adjusted based on the combined results until the loss function of the positioning model is optimized to obtain a trained positioning model; an image of the dispensing plate is obtained, and the image of the dispensing plate is input into the trained positioning model to obtain an output result reflecting the position, radius and type of the colloid, and the dispensing machine is controlled to perform dispensing according to the output result; the problem of uneven image illumination is solved through the illumination normalization technology, and the accuracy of dispensing positioning is improved; the positioning model has the advantage of being lightweight and can quickly complete the dispensing positioning task; the positioning prediction accuracy is improved by setting a reference circle and fusing multiple prediction results obtained by the feature extraction module shared by multiple parameters.

[0088] It can be understood that the contents of the dispensing method embodiment are applicable to the dispensing device embodiment. The functions specifically implemented by the dispensing device embodiment are the same as those of the dispensing method embodiment, and the beneficial effects achieved are also the same as those achieved by the dispensing method embodiment.

[0089] An embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described dispensing method when executing the computer program.

[0090] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the dispensing method described in the embodiments of the present invention. The processor implements the dispensing method described in the embodiments of the present invention by running the non-transitory software programs and programs stored in the memory.

[0091] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data required to execute the dispensing method in the above-mentioned embodiment of the present invention, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. 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 terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0092] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the dispensing method described above.

[0093] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, 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 can be used to store desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. In the above description of this specification, the reference terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" and the like are intended to mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0094] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and intent of the present application, and that the scope of the present application is defined by the claims and their equivalents.

[0095] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present application, and these equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A dispensing method, characterized in that: include: Obtaining a training image of a standard dispensing template, and inputting the training image into a positioning model, wherein the positioning model includes multiple feature extraction modules and predictors, wherein the multiple feature extraction modules have the same architecture and share parameters; Performing illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image; Generate multiple reference circles with different radii, taking each pixel of the training image and the Gaussian image as the center; Performing feature extraction on the training image and the Gaussian image in a one-to-one correspondence through the feature extraction module to obtain a plurality of image features; Based on the coordinates and radius of the reference circle, predicting the plurality of image features by the predictor to obtain a plurality of prediction results, and fusing the plurality of prediction results to obtain a fusion result; Adjusting parameters of the positioning model according to the fusion result until the loss function of the positioning model is optimal, thereby obtaining a trained positioning model; An image of the dispensing plate is obtained, and the image of the dispensing plate is input into a trained positioning model to obtain an output result reflecting the position, radius and type of the colloid. The dispensing machine is controlled to perform dispensing according to the output result.

2. The dispensing method according to claim 1, characterized in that: The illumination normalization process is expressed by the following formula: ,in represents the training image after illumination normalization, represents the grayscale average of the pixel with x as the horizontal coordinate and y as the vertical coordinate in the training image; and Represents the offset in the x direction and y direction respectively, Represents pixel points The grayscale average value of eight adjacent pixels, where A is a preset constant parameter.

3. The dispensing method according to claim 2, characterized in that: The Gaussian blur smoothing process is expressed by the following formula: , where G={ , ,..., ,..., } are n sub-images obtained by the Gaussian blur smoothing process of the illumination normalized training image, is the Gaussian convolution weighting function.

4. The dispensing method according to claim 1, characterized in that: The feature extraction module includes a first convolutional layer, multiple bottleneck layers, an average pooling layer, and a linear layer connected in sequence; the training image and the Gaussian image are subjected to feature extraction by the feature extraction module in a one-to-one correspondence to obtain multiple image features, including: Performing a convolution operation on the training image and the Gaussian image through the first convolution layer to obtain a first feature; Performing a parameter reduction operation on the first feature through the plurality of bottleneck layers to obtain a second feature; Performing an average pooling operation on the second feature through the average pooling layer to obtain a third feature; The third feature is subjected to a fitting and classification operation through the linear layer to obtain the image feature.

5. The dispensing method according to claim 4, characterized in that: During the dimensionality reduction operation of the bottleneck layer, batch normalization is performed on the second feature, where the batch normalization is based on the mean and variance of the second feature.

6. The dispensing method according to claim 4, characterized in that: The average pooling operation is expressed by the following formula: ;in, represents the output of the average pooling operation, represents the size of the pooling convolution kernel, t represents the average pooling threshold, Represents the value of the i-th pixel in the feature map within the pooled convolution kernel area.

7. The dispensing method according to claim 1, characterized in that: The loss function of the positioning model includes predicted coordinate loss, predicted radius loss and predicted dispensing type loss.

8. A dispensing device, characterized in that: include: An image input unit is used to obtain a training image of a standard dispensing template and input the training image into a positioning model, wherein the positioning model includes multiple feature extraction modules, and the multiple feature extraction modules have the same architecture and share parameters; An image preprocessing unit, configured to perform illumination normalization processing and Gaussian blur smoothing processing on the training image to obtain a Gaussian image; a reference circle generating unit, configured to generate a plurality of reference circles with different radii, with each pixel of the training image and the Gaussian image as the center; a feature extraction unit, configured to perform feature extraction on the training image and the Gaussian image in a one-to-one correspondence through the feature extraction module to obtain a plurality of image features; a prediction unit, configured to predict the plurality of image features using a predictor based on the coordinates and radius of the reference circle to obtain a plurality of prediction results, and fuse the plurality of prediction results to obtain a fusion result; A parameter adjustment unit, configured to adjust the parameters of the positioning model according to the fusion result until the loss function of the positioning model is optimal, thereby obtaining a trained positioning model; The dispensing unit is used to obtain an image of the dispensing plate, input the image of the dispensing plate into a trained positioning model, obtain an output result reflecting the position, radius and type of the colloid, and control the dispensing machine to perform dispensing according to the output result.

9. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the dispensing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and the computer-executable instructions are used to execute the dispensing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dispensing detection method and device and computer readable storage medium

    CN110598761A

  • Camera module dispensing system based on turntable

    CN111822256A