Bead burst defect detection method, device, electronic device and computer readable medium
Through multi-faceted detection, including bubble, roundness and dimensional defect detection, the problem of low detection accuracy in the prior art is solved, and the quality and user experience of smoke explosion beads are improved.
Patent Information
- Application Number
- CN202411480549.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The prior art is too single when detecting defects of smoke explosion beads, and cannot detect other defects except bubble defects, resulting in low detection accuracy, resulting in a large number of unqualified products, and reducing quality and user experience.
By obtaining the image set of smoke explosion beads to be detected, input it to the training-completed burst bead feature map extraction network, generating the target explosion bead anchor frame group, performing bubble defect detection, and obtaining roundness information through contour extraction and geometric detection, combining the area of the inner and outer circles for roundness defect detection, and finally performing scale defect detection based on the area, and controlling the removal equipment for defect removal.
It improves the accuracy of smoke explosion bead detection, enhances product quality and user experience, and reduces the generation of unqualified products.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and computer-readable medium for detecting burst beads defects. Background Art
[0002] The cigarette popping beads are a kind of round gelatinous beads in cigarette filters, with a diameter generally between 3 mm and 5 mm. After the cigarette popping beads are broken, they can emit fragrance and improve the user's taste. They are a relatively new and innovative product. In the production process, cigarette popping beads often have defects such as bubbles, roundness, incompleteness, tailing, size and ghosting, which affect the quality of cigarette popping beads, making the defect detection of cigarette popping beads an important issue. For the detection of popping bead defects, the method usually adopted is: using the target detection model, defect detection is performed on the image set of cigarette popping beads to be detected, and the bubble defect detection results of the popping beads are obtained, and the popping bead rejection equipment is controlled to reject the cigarette popping beads to be detected corresponding to the bubble defect detection results of the popping beads.
[0003] However, it is found in practice that when the above-mentioned method is used to detect defects in tobacco popping beads, the following technical problems often occur: the target detection model is used to only detect bubbles in the popping beads, the detected defects are too single, and other defects cannot be detected, resulting in low accuracy in popping bead detection, resulting in a large number of unqualified tobacco popping bead products, and reducing the quality of tobacco popping beads and user experience.
[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a method, device, electronic device and computer-readable medium for detecting burst beads defects to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a method for detecting defects in popping beads, including: obtaining a set of images of popping beads for cigarettes to be detected; inputting the above-mentioned set of images of popping beads for cigarettes to be detected into a trained popping bead feature map extraction network to obtain a popping bead feature map set; performing a priori frame detection processing on each popping bead feature map in the above-mentioned popping bead feature map set to generate a target popping bead anchor frame group to obtain a target popping bead anchor frame group set; performing popping bead bubble defect detection on the above-mentioned target popping bead anchor frame group set to obtain a popping bead bubble detection result; performing contour extraction on at least one popping bead image for cigarettes to be detected that indicates the absence of a popping bead bubble defect in the above-mentioned popping bead bubble detection result to obtain a popping bead contour set; performing geometric detection on the above-mentioned popping bead contour set to obtain a popping bead roundness information set; determining the above-mentioned at least one popping bead roundness information set based on the above-mentioned popping bead roundness information set. The inscribed circle area and the circumscribed circle area of each of the to-bead images to be inspected are used to obtain a set of inscribed circle areas and a set of circumscribed circle areas of each of the to-bead images to be inspected; based on the inscribed circle area set and the circumscribed circle area set, at least one of the to-bead images to be inspected is inspected for roundness defects to obtain a roundness inspection result; at least one of the to-bead contours that characterizes the absence of roundness inspection defects in the roundness inspection result is inspected for scale defects based on the area of the to-bead to obtain a size inspection result; based on the bubble inspection result, the roundness inspection result and the size inspection result, a device for removing the to-beads is controlled to remove defective to-beads from the to-bead image set corresponding to the to-bead image set.
[0008] In a second aspect, some embodiments of the present disclosure provide a device for detecting defects in popping beads, including: an acquisition unit configured to acquire a set of images of popping beads for cigarettes to be detected; an input unit configured to input the above-mentioned set of images of popping beads for cigarettes to be detected into a trained popping bead feature map extraction network to obtain a popping bead feature map set; a priori frame detection unit configured to perform priori frame detection processing on each popping bead feature map in the above-mentioned popping bead feature map set to generate a target popping bead anchor frame group to obtain a target popping bead anchor frame group set; a popping bead bubble defect detection unit configured to perform popping bead bubble defect detection on the above-mentioned target popping bead anchor frame group set to obtain a popping bead bubble detection result; a contour extraction unit configured to perform contour extraction on at least one popping bead image for cigarettes to be detected in the above-mentioned popping bead bubble detection result that indicates the absence of a popping bead bubble defect to obtain a popping bead contour set; a geometric detection unit configured to perform geometric detection on the above-mentioned popping bead contour set to obtain a popping bead roundness information set; a determination unit configured to According to the above-mentioned popping bead roundness information set, the inscribed circle area and the circumscribed circle area of each popping bead image to be detected in the above-mentioned at least one popping bead image to be detected are determined to obtain the inscribed circle area set and the circumscribed circle area set of the popping bead; the popping bead roundness defect detection unit is configured to perform a popping bead roundness defect detection on the above-mentioned at least one popping bead image to be detected according to the above-mentioned inscribed circle area set and the above-mentioned circumscribed circle area set of the popping bead to obtain a popping bead roundness detection result; the popping bead scale defect detection unit is configured to perform a popping bead scale defect detection based on the popping bead area on at least one popping bead contour in the above-mentioned popping bead roundness detection result that indicates the absence of a popping bead roundness detection defect, to obtain a popping bead size detection result; the control unit is configured to control the popping bead removal device according to the above-mentioned popping bead bubble detection result, the above-mentioned popping bead roundness detection result and the above-mentioned popping bead size detection result, so as to remove defective popping beads from the popping bead set to be detected corresponding to the above-mentioned popping bead image set to be detected.
[0009] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0010] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0011] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the popping bead defect detection method of some embodiments of the present disclosure can improve the accuracy of tobacco popping bead detection by performing multi-faceted detection of bubble defects, roundness defects and size defects on the tobacco popping beads to be detected, and improve the quality and user experience of tobacco popping beads. Specifically, the reason for the low accuracy of related popping bead detection, the production of a large number of unqualified tobacco popping bead products, and the reduction of the quality and user experience of tobacco popping beads is that: the target detection model only performs bubble detection on the popping beads, the detected defects are too single, and other defects cannot be detected, resulting in a low accuracy of popping bead detection, a large number of unqualified tobacco popping bead products, and the reduction of the quality and user experience of tobacco popping beads. Based on this, the popping bead defect detection method of some embodiments of the present disclosure can first obtain a set of images of tobacco popping beads to be detected. Here, the set of images of tobacco popping beads to be detected is used for subsequent popping bead defect detection. Secondly, the above-mentioned set of images of tobacco popping beads to be detected is input into the trained popping bead feature map extraction network to obtain a popping bead feature map set. Here, the bursting bead feature map extraction network can capture the key information of the bursting bead image to be detected and improve the quality of the bursting bead feature map set. Again, each bursting bead feature map in the above-mentioned bursting bead feature map set is processed by prior frame detection to generate a target bursting bead anchor frame group to obtain a target bursting bead anchor frame group set. Here, the accuracy of predicting the position of the bursting bead in the bursting bead image to be detected can be improved, and the positioning accuracy of the cigarette bursting bead can be improved. Subsequently, the above-mentioned target bursting bead anchor frame group set is subjected to bursting bead bubble defect detection to obtain a bursting bead bubble detection result. Here, the accuracy of bursting bead bubble detection can be improved. Next, contour extraction is performed on at least one bursting bead image to be detected for cigarettes in the above-mentioned bursting bead bubble detection result, and a bursting bead contour set is obtained. Here, contour extraction can remove noise data in the bursting bead image to be detected for cigarettes, retain the edge information of the bursting bead, and improve the quality of the bursting bead contour set. Afterwards, the above-mentioned bursting bead contour set is subjected to geometric detection to obtain a bursting bead roundness information set. Here, the positions of different bursting beads can be separated, and the boundary information of each cigarette bursting bead can be determined, so as to facilitate the subsequent determination of the area of the inscribed and circumscribed circles. Afterwards, according to the above-mentioned popping bead roundness information set, the inscribed circle area and the circumscribed circle area of each of the above-mentioned at least one popping bead image to be detected are determined to obtain the inscribed circle area set and the circumscribed circle area set of the popping bead. Here, the inscribed circle area set and the circumscribed circle area set of the popping bead are used for subsequent roundness detection of the popping bead through the areas of the inscribed and circumscribed circles. Then, according to the above-mentioned inscribed circle area set and the above-mentioned circumscribed circle area set of the popping bead, the at least one popping bead image to be detected is subjected to a popping bead roundness defect detection to obtain a popping bead roundness detection result. Here, the missed detection of the popping bead roundness detection by contour extraction and geometric detection can be compensated, and the accuracy of the popping bead roundness defect detection can be improved.Then, at least one bead contour that characterizes the absence of bead roundness detection defects in the above-mentioned bead roundness detection results is subjected to bead scale defect detection based on the bead area to obtain a bead size detection result. Here, by determining the area of the bead contour for scale defect detection, the influence of the bead radius on the scale can be expanded, and the accuracy of the bead scale detection can be improved. Finally, according to the above-mentioned bead bubble detection results, the above-mentioned bead roundness detection results, and the above-mentioned bead size detection results, the bead rejection device is controlled to reject defective beads for the to-bead set corresponding to the above-mentioned to-bead image set. Here, through multi-faceted defect detection, the detection accuracy of the to-bead to-bead and the rejection accuracy of the bead rejection device are further improved to improve the quality of the to-bead and the user experience. It can be obtained that the bead defect detection method can improve the accuracy of the detection of tobacco bead, the quality of tobacco bead and the user experience by performing multi-faceted detection of bubble defects, roundness defects and size defects on the tobacco bead to be detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0013] Figure 1 is a flow chart of some embodiments of the method for detecting burst beads defects according to the present disclosure;
[0014] Figure 2 is a schematic diagram of roundness detection of burst beads according to some embodiments of the burst bead defect detection device disclosed herein;
[0015] Figure 3 is a schematic structural diagram of some embodiments of a burst bead defect detection device according to the present disclosure;
[0016] Figure 4 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] Figure 1 The process 100 of some embodiments of the method for detecting a burst bead defect according to the present disclosure is shown. The method for detecting a burst bead defect comprises the following steps:
[0024] Step 101, obtaining a set of images of cigarette bursting beads to be detected.
[0025] In some embodiments, the execution subject (such as an electronic device) of the above-mentioned popping bead defect detection method can obtain a set of images of popping beads to be detected by wired connection or wireless connection. Among them, the image of the popping bead to be detected in the above-mentioned image set of popping beads to be detected can be an image of the popping bead to be detected collected by a popping bead image acquisition device. The above-mentioned popping bead image acquisition device may include a vibrating screen, a feeding funnel, a transparent conveyor belt with holes and a camera. First, the degree of adhesion of the popping beads is reduced by the vibrating screen. Secondly, after the vibrating screen vibrates, the popping beads are dispersed and sent into the feeding funnel channel, and the popping beads fall into the transparent conveyor belt with holes through the funnel to ensure that the popping beads are arranged in order in rows and columns for transmission. Finally, the image of the popping beads is collected by the camera and the white flat light source. The light source lighting method when the camera takes the image of the popping bead to be detected can be back lighting to remove the shadow of the popping beads.
[0026] Step 102, inputting the image set of the cigarette popping beads to be detected into the trained popping bead feature map extraction network to obtain the popping bead feature map set.
[0027] In some embodiments, the execution subject may input the above-mentioned bursting bead image set to be tested into the trained bursting bead feature map extraction network to obtain a bursting bead feature map set. The bursting bead feature map in the above-mentioned bursting bead feature map set may represent information on the characteristics of the bursting bead for testing. The above-mentioned bursting bead feature map extraction network may be a neural network model that extracts bursting bead feature information of the input bursting bead image set to be tested. For example, the above-mentioned bursting bead feature map extraction network may be a residual network.
[0028] In some optional implementations of some embodiments, the above-mentioned bursting bead feature map extraction network includes: a first convolution layer, a standard normalization layer (Batch Normalization), a corrected linear activation function layer, a first inverted residual bursting bead feature extraction network, a second inverted residual bursting bead feature extraction network, a third inverted residual bursting bead feature extraction network, a fourth inverted residual bursting bead feature extraction network, a fifth inverted residual bursting bead feature extraction network, a sixth inverted residual bursting bead feature extraction network, a seventh inverted residual bursting bead feature extraction network and a second convolution layer. Among them, the above-mentioned first convolution layer can be a convolution layer with a step size of 2 and a convolution kernel of 3*3. The above-mentioned corrected linear activation function layer can be a network layer whose activation function is the LeakyReLU (Leaky Rectified LinearUnit) activation function. The first inverted residual bursting bead feature extraction network may be a network including a residual structure that first increases the dimension through 1*1 convolution, then extracts the bursting bead image features through a 3*3 depth-separable convolution layer, then reduces the dimension through 1*1 convolution, and finally solves the importance of pixels in different channels and different positions in the same channel through a convolutional attention mechanism layer. The first inverted residual bursting bead feature extraction network includes a network with a step size of 1, an expansion factor of 1, and a convolutional extraction network with 16 channels in the output feature map. The seventh inverted residual bursting bead feature extraction network may be a network that first increases the dimension through 1*1 convolution, then extracts the bursting bead image features through a 3*3 depth-separable convolution layer, then reduces the dimension through 1*1 convolution, and finally solves the importance of pixels in different channels and different positions in the same channel through a convolutional attention mechanism. The seventh inverted residual bursting bead feature extraction network includes a network with a step size of 2, an expansion factor of 6, and a convolutional extraction network with 320 channels in the output feature map. The seventh inverted residual bursting bead feature extraction network with the convolutional attention mechanism removed is determined as the target inverted residual bursting bead feature extraction network. The second inverted residual bursting bead feature extraction network may be a convolutional network including two target inverted residual bursting bead feature extraction networks and one convolutional attention mechanism layer. The number of channels output by the second inverted residual bursting bead feature extraction network is 24. The third inverted residual bursting bead feature extraction network may be a convolutional network including three target inverted residual bursting bead feature extraction networks and one convolutional attention mechanism layer. The number of channels of the output feature map of the third inverted residual bursting bead feature extraction network is 32. The fourth inverted residual bursting bead feature extraction network may be a convolutional network including four target inverted residual bursting bead feature extraction networks and one convolutional attention mechanism layer. The number of channels of the output feature map of the fourth inverted residual bursting bead feature extraction network may be 64. The fifth inverted residual bursting bead feature extraction network is a convolutional network of three target inverted residual bursting bead feature extraction networks and one convolutional attention mechanism. The number of channels of the output feature map of the fifth inverse residual burst bead feature extraction network is 96.The sixth inverse residual bursting bead feature extraction network may be a convolutional network including three target inverse residual bursting bead feature extraction networks and a convolutional attention layer. The number of channels of the output feature map of the sixth inverse residual bursting bead feature extraction network is 160. The second convolutional layer may be a convolutional layer with a stride of 1 and a convolution kernel of 1*1. The number of channels of the output feature map of the second convolutional layer is 1280.
[0029] Optionally, the step of inputting the to-be-detected cigarette bursting bead image set into a trained bursting bead feature map extraction network to obtain a bursting bead feature map set may include the following steps:
[0030] The first step is to input the above-mentioned image set of the cigarette popping beads to be detected into the above-mentioned first convolutional layer to obtain the first cigarette popping bead feature atlas.
[0031] In the second step, the first tobacco popping bead feature atlas is input into the standard normalization layer to obtain the second tobacco popping bead feature atlas.
[0032] The third step is to input the second cigarette popping bead feature atlas into the modified linear activation function layer to obtain the third cigarette popping bead feature atlas.
[0033] The fourth step is to input the third cigarette popping bead feature atlas into the first inverse residual popping bead feature extraction network to obtain the fourth cigarette popping bead feature atlas.
[0034] The fifth step is to input the fourth cigarette popping bead feature atlas into the second inverse residual popping bead feature extraction network to obtain the fifth cigarette popping bead feature atlas.
[0035] The sixth step is to input the fifth cigarette popping bead feature atlas into the third inverse residual popping bead feature extraction network to obtain the sixth cigarette popping bead feature atlas.
[0036] In the seventh step, the sixth cigarette popping bead feature atlas is input into the fourth inverse residual popping bead feature extraction network to obtain the seventh cigarette popping bead feature atlas.
[0037] In the eighth step, the seventh cigarette popping bead feature atlas is input into the fifth inverse residual popping bead feature extraction network to obtain the eighth cigarette popping bead feature atlas.
[0038] The ninth step is to input the eighth cigarette popping bead feature atlas into the sixth inverse residual popping bead feature extraction network to obtain the ninth cigarette popping bead feature atlas.
[0039] The tenth step is to input the ninth cigarette popping bead feature atlas into the seventh inverse residual popping bead feature extraction network to obtain the tenth cigarette popping bead feature atlas.
[0040] In the eleventh step, the tenth cigarette popping bead feature atlas is input into the second convolutional layer to obtain the eleventh cigarette popping bead feature atlas.
[0041] In the twelfth step, the eleventh feature atlas of cigarette popping beads is input into the standard normalization layer to obtain the twelfth feature atlas of cigarette popping beads.
[0042] In the thirteenth step, the twelfth cigarette popping bead feature atlas is input into the above-mentioned corrected linear activation function layer to obtain the thirteenth cigarette popping bead feature atlas as the popping bead feature atlas.
[0043] In some optional implementations of some embodiments, the first inverse residual bursting bead feature extraction network includes: a third convolutional layer, a fourth convolutional layer, a depth-separable convolutional layer, a rectified linear activation function layer, a linear layer, and a convolutional attention mechanism layer. Among them, the third convolutional layer may be a convolutional layer that expands the number of channels of the input third cigarette bursting bead feature atlas. The activation function of the third convolutional layer is LeakyReLU. The fourth convolutional layer may be a convolutional layer that projects the input fourth inverse residual bursting bead feature atlas to a low-dimensional space to compress the fourth inverse residual bursting bead feature atlas. The fourth convolutional layer does not include an activation function. The depth-separable convolutional layer may be a convolutional network that includes expanding the feature map channel through a point-by-point convolution, extracting features through multiple depth-separable convolutions, and finally compressing the feature map channel through a point-by-point convolution. The multiple depth-separable convolutions may be at least two. The convolutional attention mechanism layer may include a channel attention module and a spatial attention module. The channel attention module can be a module that obtains two 1*1*C feature maps by global maximum pooling and global average pooling of the input initial feature map, and then inputs the two 1*1*C feature maps into a multi-layer perceptron (MLP) with shared weights to sum the two 1*1*C feature maps element by element and output the channel weight coefficient, and finally multiplies the channel weight coefficient and the initial feature map to obtain the output feature map. Wherein, C can be a predetermined threshold of the number of channels of the output feature map. The spatial attention module can be a convolutional network that performs channel-based maximum pooling and average pooling on the output feature map output by the channel attention module to obtain a pooled feature map, and then compresses the pooled feature map to 1 through a convolution layer with a convolution kernel of 7*7, and obtains the spatial weight coefficient through a Sigmoid activation function layer, and finally multiplies the spatial weight coefficient and the output feature map to output the feature map.
[0044] Optionally, the step of inputting the third cigarette popping bead feature atlas into the first inverse residual popping bead feature extraction network to obtain the fourth cigarette popping bead feature atlas may include the following steps:
[0045] In the first step, the third cigarette popping bead feature atlas is convoluted and dimensionally increased through the third convolutional layer to obtain the first inverse residual popping bead feature atlas.
[0046] In the second step, the first inverse residual bursting bead feature atlas is input into the above-mentioned corrected linear activation function layer to obtain the second inverse residual bursting bead feature atlas.
[0047] The third step is to input the second inverted residual bursting bead feature atlas into the depth-wise separable convolutional layer to obtain the third inverted residual bursting bead feature atlas.
[0048] The fourth step is to input the third inverse residual bursting bead feature atlas into the above-mentioned corrected linear activation function layer to obtain the fourth inverse residual bursting bead feature atlas.
[0049] The fifth step is to perform convolution dimensionality reduction processing on the fourth inverse residual bursting bead feature atlas through the fourth convolution layer to obtain the fifth inverse residual bursting bead feature atlas.
[0050] The sixth step is to input the fifth inverse residual bursting bead feature atlas into the linear layer to obtain the sixth inverse residual bursting bead feature atlas.
[0051] The seventh step is to fuse the features of each sixth inverse residual bursting bead feature map in the above-mentioned sixth inverse residual bursting bead feature map set and the third cigarette bursting bead feature map corresponding to the above-mentioned third cigarette bursting bead feature map set to generate a fused bursting bead feature map and obtain a fused bursting bead feature map set.
[0052] In the eighth step, the fused popping bead feature atlas is input into the convolutional attention mechanism layer to obtain the seventh inverted residual popping bead feature atlas as the fourth cigarette popping bead feature atlas.
[0053] Step 103, performing a priori frame detection processing on each bursting bead feature map in the bursting bead feature map set to generate a target bursting bead anchor frame group, thereby obtaining a target bursting bead anchor frame group set.
[0054] In some embodiments, the execution subject may perform a priori frame detection processing on each popping bead feature map in the popping bead feature map set to generate a target popping bead anchor frame group to obtain a target popping bead anchor frame group set. The target popping bead anchor frame in the target popping bead anchor frame group may be a rectangular frame for selecting the position information of the popping bead in the popping bead feature map.
[0055] In some optional implementations of some embodiments, the above-mentioned performing a priori frame detection processing on each bursting bead feature map in the above-mentioned bursting bead feature map set to generate a target bursting bead anchor frame group to obtain the target bursting bead anchor frame group set may include the following steps:
[0056] In the first step, the tenth cigarette popping bead feature atlas is input into the multi-layer popping bead convolution feature extraction layer to obtain the first popping bead feature atlas to be detected. The multi-layer popping bead convolution feature extraction network may include 5 layers, each of which includes a convolution layer with a convolution kernel of 3*3, a standard normalization layer, and a modified linear activation function layer.
[0057] The second step is to perform upsampling processing on the first to-be-detected popping bead feature atlas to obtain a second to-be-detected popping bead feature atlas, wherein the size of the second to-be-detected popping bead feature atlas is twice the size of the first to-be-detected popping bead feature atlas.
[0058] The third step is to perform feature fusion processing on the ninth feature atlas of the cigarette popping beads and the second feature atlas of the to-be-detected popping beads to obtain a first fused feature atlas of the to-be-detected popping beads.
[0059] The fourth step is to input the first fused feature atlas of the bursting beads to be detected into the multi-layer bursting bead feature extraction layer to obtain the third feature atlas of the bursting beads to be detected.
[0060] Step 5: Up-sample the third to-be-detected popping bead feature atlas to obtain a fourth to-be-detected popping bead feature atlas, wherein the size of the fourth to-be-detected popping bead feature atlas is twice the size of the third to-be-detected popping bead feature atlas.
[0061] The sixth step is to perform feature fusion processing on the eighth cigarette popping bead feature atlas and the fourth to-be-detected popping bead feature atlas to obtain a second fused to-be-detected popping bead feature atlas.
[0062] The seventh step is to input the second fused feature atlas of the bursting beads to be detected into the multi-layer bursting bead feature extraction layer to obtain the fifth feature atlas of the bursting beads to be detected.
[0063] In the eighth step, convolution feature extraction is performed on the first feature atlas of the popping beads to be detected, the third feature atlas of the popping beads to be detected, and the fifth feature atlas of the popping beads to be detected, to obtain the sixth feature atlas of the popping beads to be detected, the seventh feature atlas of the popping beads to be detected, and the eighth feature atlas of the popping beads to be detected. Among them, the convolution feature extraction can be firstly performed through a convolution layer with a convolution kernel of 3*3, a standard normalization layer, a corrected linear activation function layer, and a convolution layer with a convolution kernel of 1*1. The size of the sixth feature map of the popping beads to be detected can be 13*13*255. The size of the seventh feature map of the popping beads to be detected can be 26*26*255. The size of the eighth feature map of the popping beads to be detected is 52*52*255.
[0064] In the ninth step, hierarchical clustering is performed on the predicted a priori frame width set and the predicted a priori frame length set in the predicted a priori frame set included in the sixth to-be-detected burst bead feature atlas to obtain the first target a priori frame width set and the first target a priori frame length set. The first target a priori frame width set may be the width corresponding to the three cluster centers obtained after hierarchical clustering. The first target a priori frame length set may be the length corresponding to the three cluster centers obtained after hierarchical clustering.
[0065] In the tenth step, the first target a priori frame width set and the first target a priori frame length set are combined to obtain a first target a priori frame set, wherein the first target a priori frame set may be 9 a priori frames for small target detection.
[0066] In the eleventh step, a priori frame combination recommendation process is performed on the seventh to-be-detected burst bead feature atlas to obtain a second target priori frame set. The second target priori frame set may be 9 priori frames for medium target detection. The priori frame combination recommendation process may be a process of performing hierarchical clustering on the detection frame length set and the detection frame width set included in the seventh to-be-detected burst bead feature atlas and then performing a combination process.
[0067] Step 12: Perform a priori frame combination recommendation process on the eighth to-be-detected burst bead feature atlas to obtain a third target priori frame set, wherein the third target priori frame set may be 9 prior frames for large target detection.
[0068] In the thirteenth step, the first target prior frame set, the second target prior frame set and the third target prior frame set are determined as the target bursting bead anchor frame set.
[0069] Step 104 , performing bursting bead bubble defect detection on the target bursting bead anchor frame set to obtain a bursting bead bubble detection result.
[0070] In some embodiments, the execution subject may perform bubble defect detection on the target bursting bead anchor frame set to obtain a bubble detection result. The bubble detection result may be the result of a set of bursting bead images to be detected with bubble defects. In practice, the execution subject may input the target bursting bead anchor frame set into a fully connected layer to obtain a bubble detection result. The fully connected layer may be a fully connected layer in which the width and height of each feature map corresponding to each target bursting bead anchor frame set in the target bursting bead anchor frame set is the size of the convolution kernel. For example, the feature maps corresponding to the target bursting bead anchor frame set may be the sixth bursting bead feature map set to be detected, the seventh bursting bead feature map set to be detected, and the eighth bursting bead feature map set to be detected, respectively. Then the fully connected layer may be: a fully connected layer with a convolution kernel of 13*13, a fully connected layer with a convolution kernel of 26*26, and a fully connected layer with a convolution kernel of 52*52.
[0071] Step 105 , performing contour extraction on at least one to-be-detected cigarette bursting bead image that indicates that there is no bursting bead bubble defect in the bursting bead bubble detection result, to obtain a bursting bead contour set.
[0072] In some embodiments, the execution subject may perform contour extraction on at least one to-be-tested tobacco popping bead image that indicates the absence of a popping bead bubble defect in the popping bead bubble detection result to obtain a popping bead contour set. The popping bead contour in the popping bead contour set may be a geometric contour that describes the contour of the tobacco popping bead in the form of a line.
[0073] As an example, the execution subject may use the Canny edge detection algorithm to extract the contour of at least one to-be-detected cigarette bursting bead image that indicates the absence of bursting bead bubble defects in the bursting bead bubble detection result, and obtain a bursting bead contour set.
[0074] Step 106, performing geometric detection on the bursting bead contour set to obtain a bursting bead roundness information set.
[0075] In some embodiments, the execution subject may perform geometric detection on the popping bead contour set to obtain a popping bead roundness information set, wherein the popping bead roundness information in the popping bead roundness information set may be information on the center coordinates and radius of the detected popping bead for cigarette to be detected.
[0076] In some optional implementations of some embodiments, the geometric detection of the bursting bead contour set to obtain the bursting bead roundness information set may include the following steps:
[0077] In the first step, straight line detection is performed on the above-mentioned popping bead contour set to obtain a popping bead straight line contour set. The popping bead straight line contour in the above-mentioned popping bead straight line contour set may be the contour of the straight line corresponding to the platform for storing the popping bead for cigarettes. The above-mentioned straight line detection may be a straight line detection performed using a Hough transform straight line detection algorithm. It should be noted that the straight line detection is used to separate the popping bead from the platform in order to reduce misjudgment in subsequent detection.
[0078] In the second step, for each bursting bead straight line contour in the above bursting bead straight line contour set, perform the following extraction steps:
[0079] Sub-step 1, determining the straight line ordinate set of the straight line profile of the above-mentioned bursting bead.
[0080] Sub-step 2, based on the above-mentioned straight line ordinate set, the image of the to-be-detected cigarette popping bead corresponding to the above-mentioned straight line contour of the popping bead is clipped to obtain a clipped popping bead contour image. The clipped popping bead contour image can be a popping bead contour image obtained by clipping out interference pixels such as color bands in the image of the to-be-detected cigarette popping bead.
[0081] As an example, the execution subject may first, in response to determining that the range of the above-mentioned linear coordinate set is within the range of (0 mm, 90 mm), cut out the local image corresponding to a preset number of units from the bottom to the top of the above-mentioned image of the to-be-detected cigarette blasting beads, and obtain the cropped blasting beads contour map. The above-mentioned preset number can be determined based on the actual situation, which is not explained here. Then, in response to determining that the range of the above-mentioned linear coordinate set is within the range of (90 mm, 190 mm), the above-mentioned image of the to-be-detected cigarette blasting beads is cut out from the top to the bottom of the local image corresponding to a preset number of units, and the cropped blasting beads contour map is obtained. Finally, in response to determining that the range of the above-mentioned linear coordinate set is not within the range of (0 mm, 190 mm), the blasting beads contour is not cropped for the image of the to-be-detected cigarette blasting beads.
[0082] Sub-step 3, performing color space transformation processing on the cropped bead outline image to obtain a color transformed bead outline image. The color transformed bead outline image may be a bead outline image in an HSV (Hue Saturation Value) color space. The color space transformation processing may be a color conversion of converting a bead outline image in an RGB (Red Green Blue) color space into a bead outline image in an HSV color space.
[0083] Sub-step 4, performing median filtering on the above-mentioned bursting bead outline image after color transformation to obtain a filtered bursting bead outline image.
[0084] Sub-step 5, extracting the roundness of the popping bead from the filtered popping bead contour image to obtain the popping bead roundness information. The popping bead roundness information may be the coordinate information of the center of the circle and the radius of the circle corresponding to the popping bead. The popping bead roundness extraction may be performed using a Hough transform roundness detection algorithm.
[0085] Step 107, determining the inscribed circle area and circumscribed circle area of each of at least one to-be-detected tobacco popping bead images according to the popping bead roundness information set, and obtaining a popping bead inscribed circle area set and a popping bead circumscribed circle area set.
[0086] In some embodiments, the execution subject may determine the inscribed circle area and the circumscribed circle area of each of the at least one to-be-detected tobacco bead images according to the circumference information set of the circumference information set, and obtain a circumscribed circle area set and a circumscribed circle area set of the circumscribed circle. The circumscribed circle area may be the area of the inscribed circle of the roundness contour corresponding to the tobacco bead. The circumscribed circle area may be the area of the circumscribed circle of the roundness contour corresponding to the tobacco bead.
[0087] In some optional implementations of some embodiments, determining the inscribed circle area and the circumscribed circle area of each to-be-detected to-bead image in the at least one to-be-detected to-bead image according to the to-bead roundness set to obtain the inscribed circle area set and the circumscribed circle area set may include the following steps:
[0088] The first step is to determine the bursting bead circumscribed rectangle of each bursting bead roundness information in the bursting bead roundness information set to obtain a bursting bead circumscribed rectangle set. The bursting bead circumscribed rectangle may be a circumscribed rectangle used to frame the roundness contour corresponding to the bursting bead roundness information. Figure 2 The rectangle in the bead roundness detection image is shown.
[0089] In the second step, for each bursting bead bounding rectangle in the bursting bead bounding rectangle set, perform the following determination steps:
[0090] Sub-step 1, selecting the smallest value from the length of the bursting bead circumscribed rectangle and the width of the bursting bead circumscribed rectangle corresponding to the bursting bead circumscribed rectangle as the inscribed circle diameter of the bursting bead inscribed circle.
[0091] Sub-step 2, substituting the diameter of the inscribed circle into the circle area calculation formula to obtain the area of the inscribed circle of the bursting bead.
[0092] Sub-step 3, determining the radius of the circumscribed circle of the bursting bead circumscribed circle corresponding to the above bursting bead roundness information.
[0093] Sub-step 4, substituting the radius of the circumscribed circle into the circle area calculation formula to obtain the area of the circumscribed circle of the bursting bead.
[0094] Step 108 , performing a roundness defect detection on at least one to-be-detected cigarette popping bead image according to the popping bead inscribed circle area set and the popping bead circumscribed circle area set to obtain a popping bead roundness detection result.
[0095] In some embodiments, the execution subject may perform a roundness defect detection on the at least one to-be-detected tobacco popping bead image according to the inscribed circle area set and the circumscribed circle area set to obtain a roundness detection result. The roundness detection result may be a tobacco popping bead to-be-detected corresponding to the at least one to-be-detected tobacco popping bead image having a roundness defect in the at least one to-be-detected tobacco popping bead image.
[0096] As an example, the execution subject may first determine the difference between the circumscribed circle area of each bursting bead in the bursting bead circumscribed circle area set and the corresponding inscribed circle area of the bursting bead in the bursting bead inscribed circle area set to obtain a bursting bead area difference set. Then, at least one bursting bead area difference greater than a preset area difference range is selected from the bursting bead area difference set to obtain a target bursting bead area difference set. The preset area difference range may be a preset maximum value of the difference between the inner and outer circle areas of the bursting bead. The preset area difference range may be determined according to actual conditions and is not limited here. Finally, at least one bursting bead to be detected corresponding to the at least one bursting bead image to be detected in the target bursting bead area difference set is determined as a bursting bead roundness detection result. The correspondence between the bursting bead image to be detected and the bursting bead to be detected may be a correspondence determined by position information.
[0097] Step 109 , performing a bursting bead scale defect detection based on the bursting bead area on at least one bursting bead contour in the bursting bead roundness detection result indicating that there is no bursting bead roundness detection defect, to obtain a bursting bead size detection result.
[0098] In some embodiments, the execution subject may perform a bead size defect detection based on the bead area on at least one bead contour that indicates that there is no bead roundness detection defect in the bead roundness detection result to obtain a bead size detection result. The bead size detection result may be the result of the to-bead to-be tested cigarette corresponding to at least one bead contour that has a bead size defect.
[0099] In some optional implementations of some embodiments, performing a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour characterized by the absence of a bursting bead roundness detection defect in the bursting bead roundness detection result to obtain a bursting bead size detection result may include the following steps:
[0100] The first step is to determine the bursting bead contour area of each bursting bead contour in the at least one bursting bead contour to obtain a bursting bead contour area set.
[0101] The second step is to respond to the determination of whether the popping bead contour area set is within a preset popping bead contour area range, wherein the preset popping bead contour area range may be a preset maximum circular area of the popping bead for tobacco.
[0102] In the third step, in response to determining that there is at least one bursting bead contour area that is not within the preset bursting bead contour area range in the bursting bead contour area concentration, at least one bursting bead to be tested corresponding to the at least one bursting bead contour area is determined as the bursting bead size detection result.
[0103] In the process of adopting technical solutions to solve the above-mentioned technical problem one, the following technical problem two is often accompanied: Since there are size requirements for cigarette popping beads, how to accurately detect the size defects of the popping beads with subtle differences. In response to the above-mentioned technical problem two, the conventional solution is generally: set a size threshold based on expert experience, and perform a size defect detection of the cigarette popping beads based on the area of the popping beads. However, the above-mentioned conventional solution still has the following problems: since the size threshold is set based on expert experience, there is a certain degree of subjectivity, and it cannot be updated in real time, resulting in a low accuracy rate in the size detection of the popping beads, and the quality of the cigarette popping beads is low, which reduces the user experience. The inventor took into account the shortcomings of the above-mentioned conventional solutions, and combined with the technical status of the deep learning technology owned by the inventor's university, and jointly developed with cooperative enterprises, it was decided to adopt the following solution:
[0104] In some optional implementations of some embodiments, performing a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour characterized by the absence of a bursting bead roundness detection defect in the bursting bead roundness detection result to obtain a bursting bead size detection result may include the following steps:
[0105] The first step is to determine the bursting bead contour area of each bursting bead contour in the at least one bursting bead contour to obtain a bursting bead contour area set.
[0106] In the second step, the above-mentioned bursting bead contour area set is randomly selected to obtain the target bursting bead contour area as the bursting bead area root node.
[0107] The third step is to perform the following construction steps based on the burst bead area root node:
[0108] Sub-step 1, according to the root node of the bursting bead area, recursively construct the bursting bead contour area tree for the above-mentioned bursting bead contour area set to obtain the bursting bead contour area tree. The above-mentioned bursting bead contour area tree can be a tree structure that displays the above-mentioned bursting bead contour area set in a tree-shaped result.
[0109] As an example, the execution subject may recursively construct a bursting bead contour area tree for the bursting bead contour area set through the bursting bead area root node and the randomly preset area threshold to obtain a bursting bead contour area tree. The randomly preset area threshold may be a randomly determined random area threshold greater than or less than the bursting bead contour area corresponding to the bursting bead area root node or each bursting bead area node.
[0110] Sub-step 2, determining the number of times the above build step has been executed.
[0111] Sub-step 3, in response to determining that the number of executions is greater than or equal to a preset execution number threshold, determining the mean value of the bursting bead area depth of each bursting bead contour area in the bursting bead contour area set in the bursting bead area depth value group of each obtained bursting bead contour area tree, and obtaining a bursting bead area depth mean value set. The preset execution number threshold may be a preset maximum execution number of the construction step.
[0112] The fourth step, in response to determining that the number of executions is less than the above-mentioned preset execution number threshold, the above-mentioned bursting bead contour area set is randomly re-selected to obtain a random bursting bead contour area as the bursting bead area root node, and the sum of the number of executions and the preset value is determined as the number of executions, so as to execute the above-mentioned construction step again.
[0113] Step 5: Based on the above-mentioned bursting bead area depth mean value set, the above-mentioned bursting bead contour area set is subjected to outlier identification to obtain a first discrete value identification result. The above-mentioned first discrete value identification result may be the result of at least one bursting bead composition to be tested corresponding to the bursting bead contour area whose bursting bead area depth mean value is much larger or much smaller than the other bursting bead area depth mean values.
[0114] Step 6: Perform distance area discrete value recognition on the above-mentioned popping bead contour area set to obtain a second discrete value recognition result. The above-mentioned second discrete value recognition result can be the result of at least one area discrete value determined by the k-nearest neighbor algorithm corresponding to at least one composition of the popping bead to be detected.
[0115] In the seventh step, the statistical area discrete value recognition is performed on the above-mentioned popping bead contour area set to obtain a third discrete value recognition result. The above-mentioned third discrete value recognition result can be the result of at least one area discrete value determined by statistical characteristics (for example, mean, variance, median) corresponding to at least one composition of the popping bead to be tested.
[0116] In the eighth step, a bursting bead size detection result is generated according to the first discrete value recognition result, the second discrete value recognition result and the third discrete value recognition result.
[0117] As an example, the execution subject may first determine at least one repeated popping bead contour area in the popping bead contour area set corresponding to at least one to-be-detected popping bead for cigarettes included in the first discrete value recognition result, the popping bead contour area set corresponding to at least one to-be-detected popping bead for cigarettes included in the second discrete value recognition result, and the popping bead contour area set corresponding to at least one to-be-detected popping bead for cigarettes included in the third discrete value recognition result as a repeated popping bead contour area set. Then, the to-be-detected popping bead set corresponding to the repeated popping bead contour area set is determined as the popping bead size detection result.
[0118] The above-mentioned first to eighth steps and their related contents serve as an inventive point of an embodiment of the present disclosure, and solve the second technical problem mentioned in the background technology: "Since the size threshold is set according to expert experience, there is a certain subjectivity, and it cannot be updated in real time, the accuracy of the size detection of the popping beads is low, the quality of the popping beads for cigarettes is low, and the user experience is reduced." The factors that lead to the low accuracy of the size detection of the popping beads, the low quality of the popping beads for cigarettes, and the reduced user experience are often as follows: Since the size threshold is set according to expert experience, there is a certain subjectivity, and it cannot be updated in real time, the accuracy of the size detection of the popping beads is low, the quality of the popping beads for cigarettes is low, and the user experience is reduced. If the above-mentioned factors are solved, the effect of improving the accuracy of the size detection of the popping beads, improving the quality of the popping beads for cigarettes, and improving the user experience can be achieved. In order to achieve this effect, the present disclosure first determines a popping bead contour area set of at least one popping bead contour, so as to subsequently construct a popping bead contour area tree. Secondly, multiple popping bead contour area trees are constructed through iterative cycles, and the mean popping bead area depth of each popping bead contour area in the above multiple popping bead contour area trees is determined, so as to perform the first discrete value recognition based on the mean popping bead area depth. Since there is no need to pre-set the discrete threshold, the subjectivity of discrete value recognition and the accuracy of discrete value recognition are improved to a certain extent. Then, the distance discrete value recognition is performed on the popping bead contour area set, and the discrete value recognition is performed through the numerical distribution characteristics of the popping bead contour area, which can improve the accuracy of discrete value recognition. After that, the statistical feature discrete value recognition is performed on the popping bead contour area set, and the recognition process is simple, which reduces the complexity of identifying discrete values. Finally, the results of discrete value recognition based on the mean popping bead area depth, distance and statistical features are fused, which can further improve the accuracy of discrete value recognition, improve the subsequent rejection accuracy of the popping bead rejection equipment, and improve the quality of tobacco popping beads and user experience.
[0119] Step 110, according to the bursting bead bubble detection result, the bursting bead roundness detection result and the bursting bead size detection result, the bursting bead rejection device is controlled to reject defective bursting beads from the bursting bead set for cigarettes to be inspected corresponding to the bursting bead image set for cigarettes to be inspected.
[0120] In some embodiments, the execution subject may control the popping bead rejection device according to the popping bead bubble detection result, the popping bead roundness detection result and the popping bead size detection result, so as to reject defective popping beads from the to-be-detected popping bead set corresponding to the to-be-detected popping bead image set. The popping bead rejection device may be a device for rejecting defective popping beads. For example, the popping bead rejection device may be a jet-type defective popping bead rejection device.
[0121] As an example, the execution subject may determine at least one to-be-detected tobacco bead with a bubble defect corresponding to the bubble bubble detection result, at least one to-be-detected tobacco bead with a roundness defect corresponding to the bubble bubble roundness detection result, and at least one to-be-detected tobacco bead with a size defect corresponding to the bubble bubble size detection result as a defective tobacco bead set. Then, the bubble bubble removal device is controlled to remove the defective tobacco bead set.
[0122] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the popping bead defect detection method of some embodiments of the present disclosure can improve the accuracy of tobacco popping bead detection by performing multi-faceted detection of bubble defects, roundness defects and size defects on the tobacco popping beads to be detected, and improve the quality and user experience of tobacco popping beads. Specifically, the reason for the low accuracy of related popping bead detection, the production of a large number of unqualified tobacco popping bead products, and the reduction of the quality and user experience of tobacco popping beads is that: the target detection model only performs bubble detection on the popping beads, the detected defects are too single, and other defects cannot be detected, resulting in a low accuracy of popping bead detection, a large number of unqualified tobacco popping bead products, and the reduction of the quality and user experience of tobacco popping beads. Based on this, the popping bead defect detection method of some embodiments of the present disclosure can first obtain a set of images of tobacco popping beads to be detected. Here, the set of images of tobacco popping beads to be detected is used for subsequent popping bead defect detection. Secondly, the above-mentioned set of images of tobacco popping beads to be detected is input into the trained popping bead feature map extraction network to obtain a popping bead feature map set. Here, the bursting bead feature map extraction network can capture the key information of the bursting bead image to be detected and improve the quality of the bursting bead feature map set. Again, each bursting bead feature map in the above-mentioned bursting bead feature map set is processed by prior frame detection to generate a target bursting bead anchor frame group to obtain a target bursting bead anchor frame group set. Here, the accuracy of predicting the position of the bursting bead in the bursting bead image to be detected can be improved, and the positioning accuracy of the cigarette bursting bead can be improved. Subsequently, the above-mentioned target bursting bead anchor frame group set is subjected to bursting bead bubble defect detection to obtain a bursting bead bubble detection result. Here, the accuracy of bursting bead bubble detection can be improved. Next, contour extraction is performed on at least one bursting bead image to be detected for cigarettes in the above-mentioned bursting bead bubble detection result, and a bursting bead contour set is obtained. Here, contour extraction can remove noise data in the bursting bead image to be detected for cigarettes, retain the edge information of the bursting bead, and improve the quality of the bursting bead contour set. Afterwards, the above-mentioned bursting bead contour set is subjected to geometric detection to obtain a bursting bead roundness information set. Here, the positions of different bursting beads can be separated, and the boundary information of each cigarette bursting bead can be determined, so as to facilitate the subsequent determination of the area of the inscribed and circumscribed circles. Afterwards, according to the above-mentioned popping bead roundness information set, the inscribed circle area and the circumscribed circle area of each of the above-mentioned at least one popping bead image to be detected are determined to obtain the inscribed circle area set and the circumscribed circle area set of the popping bead. Here, the inscribed circle area set and the circumscribed circle area set of the popping bead are used for subsequent roundness detection of the popping bead through the areas of the inscribed and circumscribed circles. Then, according to the above-mentioned inscribed circle area set and the above-mentioned circumscribed circle area set of the popping bead, the at least one popping bead image to be detected is subjected to a popping bead roundness defect detection to obtain a popping bead roundness detection result. Here, the missed detection of the popping bead roundness detection by contour extraction and geometric detection can be compensated, and the accuracy of the popping bead roundness defect detection can be improved.Then, at least one bead contour that characterizes the absence of bead roundness detection defects in the above-mentioned bead roundness detection results is subjected to bead scale defect detection based on the bead area to obtain a bead size detection result. Here, by determining the area of the bead contour for scale defect detection, the influence of the bead radius on the scale can be expanded, and the accuracy of the bead scale detection can be improved. Finally, according to the above-mentioned bead bubble detection results, the above-mentioned bead roundness detection results, and the above-mentioned bead size detection results, the bead rejection device is controlled to reject defective beads for the to-bead set corresponding to the above-mentioned to-bead image set. Here, through multi-faceted defect detection, the detection accuracy of the to-bead to-bead and the rejection accuracy of the bead rejection device are further improved to improve the quality of the to-bead and the user experience. It can be obtained that the bead defect detection method can improve the accuracy of the detection of tobacco bead, the quality of tobacco bead and the user experience by performing multi-faceted detection of bubble defects, roundness defects and size defects on the tobacco bead to be detected.
[0123] Further references Figure 3 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device for detecting a bursting bead defect. Figure 1 Corresponding to the method embodiments shown, the burst bead defect detection device can be specifically applied to various electronic devices.
[0124] like Figure 3As shown, a popping bead defect detection device 300 includes: an acquisition unit 301, an input unit 302, a priori frame detection unit 303, a popping bead bubble defect detection unit 304, a contour extraction unit 305, a geometry detection unit 306, a determination unit 307, a popping bead roundness defect detection unit 308, a popping bead scale defect detection unit 309 and a control unit 310. Among them, the acquisition unit 301 is configured to: acquire a set of popping bead images for cigarettes to be detected. The input unit 302 is configured to: input the above-mentioned popping bead image set for cigarettes to be detected into the trained popping bead feature map extraction network to obtain a popping bead feature map set. The priori frame detection unit 303 is configured to: perform a priori frame detection process on each popping bead feature map in the above-mentioned popping bead feature map set to generate a target popping bead anchor frame group to obtain a target popping bead anchor frame group set. The popping bead bubble defect detection unit 304 is configured to: perform popping bead bubble defect detection on the above-mentioned target popping bead anchor frame group set to obtain a popping bead bubble detection result. The contour extraction unit 305 is configured to: perform contour extraction on at least one to-be-detected cigarette popping bead image characterized by the absence of a popping bead bubble defect in the above popping bead bubble detection result, and obtain a popping bead contour set. The geometric detection unit 306 is configured to: perform geometric detection on the above popping bead contour set, and obtain a popping bead roundness information set. The determination unit 307 is configured to: determine the inscribed circle area and the circumscribed circle area of each to-be-detected cigarette popping bead image in the above at least one to-be-detected cigarette popping bead image according to the above popping bead roundness information set, and obtain a popping bead inscribed circle area set and a popping bead circumscribed circle area set. The popping bead roundness defect detection unit 308 is configured to: perform a popping bead roundness defect detection on the above at least one to-be-detected cigarette popping bead image according to the above popping bead inscribed circle area set and the above popping bead circumscribed circle area set, and obtain a popping bead roundness detection result. The bead scale defect detection unit 309 is configured to: perform a bead scale defect detection based on the bead area on at least one bead contour that indicates that there is no bead roundness detection defect in the bead roundness detection result, and obtain a bead size detection result. The control unit 310 is configured to: control the bead rejection device according to the bead bubble detection result, the bead roundness detection result, and the bead size detection result, so as to reject defective beads from the bead set to be detected corresponding to the bead image set to be detected.
[0125] It is understood that the various units described in the burst bead defect detection device 300 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the burst bead defect detection device 300 and the units contained therein, and will not be repeated here.
[0126] Reference below Figure 4 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 400 suitable for implementing some embodiments of the present disclosure. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0127] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0128] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0129] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0130] It should be noted that the computer-readable medium mentioned above in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0131] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0132] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a set of images of to-be-detected popping beads for cigarettes; inputs the image set of to-be-detected popping beads for cigarettes into a trained popping bead feature map extraction network to obtain a popping bead feature map set; performs prior frame detection processing on each popping bead feature map in the popping bead feature map set to generate a target popping bead anchor frame group to obtain a target popping bead anchor frame group set; performs popping bead bubble defect detection on the target popping bead anchor frame group set to obtain a popping bead bubble detection result; performs contour extraction on at least one to-be-detected popping bead image for cigarettes that indicates the absence of a popping bead bubble defect in the popping bead bubble detection result to obtain a popping bead contour set; performs geometric detection on the popping bead contour set to obtain a popping bead roundness information set; and performs a geometric detection on the popping bead roundness information set based on the popping bead roundness information set. According to the information set, the inscribed circle area and the circumscribed circle area of each of the at least one to-be-detected to-bead image are determined to obtain the inscribed circle area set and the circumscribed circle area set of the to-bead; according to the inscribed circle area set and the circumscribed circle area set of the to-bead, the at least one to-bead image is subjected to a roundness defect detection to obtain a roundness detection result of the to-bead; according to the at least one to-bead roundness detection result, a roundness defect detection based on the area of the to-bead is performed on the at least one to-bead contour that indicates that there is no roundness detection defect of the to-bead, to obtain a size detection result of the to-bead; according to the bubble detection result, the roundness detection result and the size detection result of the to-bead, a to-bead rejection device is controlled to reject defective to-beads from the to-bead image set corresponding to the to-bead image set.
[0133] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0134] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0135] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The units described may also be set in a processor, for example, may be described as: a processor including an acquisition unit, an input unit, a priori frame detection unit, a bursting bead bubble defect detection unit, a contour extraction unit, a geometry detection unit, a determination unit, a bursting bead roundness defect detection unit, a bursting bead scale defect detection unit and a control unit. Among them, the names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring a bursting bead image set for cigarettes to be detected."
[0136] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0137] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A method for detecting burst beads, comprising: Obtain a set of images of cigarette explosion beads to be detected; The bursting bead image set to be detected is input into the trained bursting bead feature map extraction network to obtain a bursting bead feature map set, wherein the bursting bead feature map extraction network includes: a first convolution layer, a standard normalization layer, a modified linear activation function layer, a first inverse residual bursting bead feature extraction network, a second inverse residual bursting bead feature extraction network, a third inverse residual bursting bead feature extraction network, a fourth inverse residual bursting bead feature extraction network, a fifth inverse residual bursting bead feature extraction network, a sixth inverse residual bursting bead feature extraction network, a seventh inverse residual bursting bead feature extraction network and a second convolution layer; and the bursting bead image set to be detected is input into the trained bursting bead feature map extraction network to obtain a bursting bead feature map set, including: Inputting the to-be-detected cigarette popping bead image set into the first convolutional layer to obtain a first cigarette popping bead feature atlas; Inputting the first tobacco popping bead feature atlas into the standard normalization layer to obtain a second tobacco popping bead feature atlas; Inputting the second cigarette popping bead feature atlas into the corrected linear activation function layer to obtain a third cigarette popping bead feature atlas, wherein the corrected linear activation function layer is a network layer whose activation function is a LeakyReLU activation function; Inputting the third cigarette popping bead feature atlas into the first inverse residual popping bead feature extraction network to obtain a fourth cigarette popping bead feature atlas, wherein the first inverse residual popping bead feature extraction network firstly increases the dimension through 1*1 convolution, then extracts the popping bead image features through a 3*3 depthwise separable convolution layer, then reduces the dimension through a 1*1 convolution, and finally passes through a convolutional attention mechanism layer to solve the importance of pixels in different channels and different positions in the same channel, and includes a residual structure network, wherein the convolutional attention mechanism layer includes a channel attention module and a spatial attention module; Inputting the fourth cigarette popping bead feature atlas into the second inverse residual popping bead feature extraction network to obtain a fifth cigarette popping bead feature atlas; Inputting the fifth cigarette popping bead feature atlas into the third inverse residual popping bead feature extraction network to obtain a sixth cigarette popping bead feature atlas; Inputting the sixth cigarette popping bead feature atlas into the fourth inverse residual popping bead feature extraction network to obtain a seventh cigarette popping bead feature atlas; Inputting the seventh cigarette popping bead feature atlas into the fifth inverse residual popping bead feature extraction network to obtain an eighth cigarette popping bead feature atlas; Inputting the eighth cigarette popping bead feature atlas into the sixth inverse residual popping bead feature extraction network to obtain a ninth cigarette popping bead feature atlas; Inputting the ninth cigarette popping bead feature atlas into the seventh inverse residual popping bead feature extraction network to obtain a tenth cigarette popping bead feature atlas; Inputting the tenth cigarette popping bead feature atlas into the second convolutional layer to obtain an eleventh cigarette popping bead feature atlas; Inputting the eleventh tobacco popping bead feature atlas into the standard normalization layer to obtain a twelfth tobacco popping bead feature atlas; Inputting the twelfth cigarette popping bead feature atlas into the modified linear activation function layer to obtain a thirteenth cigarette popping bead feature atlas as the popping bead feature atlas; Performing a priori frame detection processing on each bursting bead feature map in the bursting bead feature map set to generate a target bursting bead anchor frame group, thereby obtaining a target bursting bead anchor frame group set; Performing a bursting bead bubble defect detection on the target bursting bead anchor frame set to obtain a bursting bead bubble detection result; Performing contour extraction on at least one to-be-detected cigarette bursting bead image that indicates that there is no bursting bead bubble defect in the bursting bead bubble detection result to obtain a bursting bead contour set; Performing geometric detection on the bursting bead contour set to obtain a bursting bead roundness information set; According to the popping bead roundness information set, determining the popping bead inscribed circle area and the popping bead circumscribed circle area of each to-be-detected popping bead image in the at least one to-be-detected popping bead image, and obtaining a popping bead inscribed circle area set and a popping bead circumscribed circle area set; According to the inscribed circle area set of the popping bead and the circumscribed circle area set of the popping bead, the at least one to-be-detected cigarette popping bead image is subjected to a popping bead roundness defect detection to obtain a popping bead roundness detection result; Performing a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour in the bursting bead roundness detection result indicating that there is no bursting bead roundness detection defect, to obtain a bursting bead size detection result, wherein performing a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour in the bursting bead roundness detection result indicating that there is no bursting bead roundness detection defect, to obtain a bursting bead size detection result, comprises: Determine a bursting bead contour area of each bursting bead contour in the at least one bursting bead contour to obtain a bursting bead contour area set; Randomly select the bursting bead contour area set to obtain a target bursting bead contour area as a bursting bead area root node; Based on the burst bead area root node, perform the following construction steps: According to the bursting bead area root node, recursively construct a bursting bead contour area tree for the bursting bead contour area set to obtain a bursting bead contour area tree; determining the number of times the build step has been executed; In response to determining that the number of executions is greater than or equal to a preset execution number threshold, determining a mean value of a bursting bead area depth of each bursting bead contour area in the bursting bead contour area set in the bursting bead area depth value group of each obtained bursting bead contour area tree, and obtaining a bursting bead area depth mean set; In response to determining that the number of executions is less than the preset execution number threshold, the bursting bead contour area set is randomly reselected to obtain a random bursting bead contour area as a bursting bead area root node, and the sum of the number of executions and the preset value is determined as the number of executions, so as to execute the construction step again; According to the mean value set of the bead area depth, outlier identification is performed on the bead contour area set to obtain a first discrete value identification result; Performing distance area discrete value recognition on the bursting bead contour area set to obtain a second discrete value recognition result; Performing statistical area discrete value recognition on the bursting bead contour area set to obtain a third discrete value recognition result; Generate a bursting bead size detection result according to the first discrete value recognition result, the second discrete value recognition result and the third discrete value recognition result; According to the bursting bead bubble detection result, the bursting bead roundness detection result and the bursting bead size detection result, a bursting bead removal device is controlled to remove defective bursting beads from the bursting bead set to be inspected corresponding to the bursting bead image set to be inspected.
2. The method according to claim 1, wherein: The step of performing geometric detection on the bursting bead contour set to obtain a bursting bead roundness information set includes: Performing straight line detection on the bursting bead contour set to obtain a bursting bead straight line contour set; For each bursting bead straight line profile in the bursting bead straight line profile set, the following extraction steps are performed: Determining a linear ordinate set of the linear profile of the bursting bead; According to the straight line ordinate set, the bursting bead image to be detected corresponding to the bursting bead straight line contour is subjected to bursting bead contour cropping to obtain a cropped bursting bead contour image; Performing color space transformation processing on the cropped burst bead outline image to obtain a color transformed burst bead outline image; Performing median filtering on the color-converted burst bead outline image to obtain a filtered burst bead outline image; The roundness of the popping beads is extracted from the filtered popping bead contour image to obtain the popping bead roundness information.
3. The method according to claim 1, wherein: The method of determining the inscribed circle area and the circumscribed circle area of each to-be-detected ... Determine the bursting bead circumscribed rectangle of each bursting bead roundness information in the bursting bead roundness information set to obtain a bursting bead circumscribed rectangle set; For each bursting bead circumscribed rectangle in the bursting bead circumscribed rectangle set, the following determination steps are performed: Filter out the smallest value from the length of the bursting bead circumscribed rectangle and the width of the bursting bead circumscribed rectangle corresponding to the bursting bead circumscribed rectangle as the inscribed circle diameter of the bursting bead inscribed circle; Substituting the inscribed circle diameter into the circle area calculation formula, the inscribed circle area of the bursting bead is obtained; Determine the radius of the circumscribed circle of the bursting bead circumscribed circle corresponding to the bursting bead roundness information; Substitute the radius of the circumscribed circle into the circle area calculation formula to obtain the circumscribed circle area of the bursting bead.
4. The method according to claim 1, wherein: The step of performing a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour in the bursting bead roundness detection result indicating that there is no bursting bead roundness detection defect, to obtain a bursting bead size detection result, comprises: Determine a bursting bead contour area of each bursting bead contour in the at least one bursting bead contour to obtain a bursting bead contour area set; In response to determining whether the bursting bead contour area set exists within a preset bursting bead contour area range; In response to determining that there is at least one bursting bead contour area in the bursting bead contour area concentration that is not within the preset bursting bead contour area range, at least one to-be-detected tobacco bursting bead corresponding to the at least one bursting bead contour area is determined as a bursting bead size detection result.
5. The method according to claim 1, wherein: The first inverted residual burst bead feature extraction network includes: a third convolution layer, a fourth convolution layer, a depthwise separable convolution layer, a rectified linear activation function layer, a linear layer, and a convolutional attention mechanism layer; and The step of inputting the third cigarette popping bead feature atlas into the first inverse residual popping bead feature extraction network to obtain a fourth cigarette popping bead feature atlas comprises: Through the third convolution layer, the third cigarette popping bead feature atlas is subjected to convolution dimensionality increase processing to obtain a first inverse residual popping bead feature atlas; Inputting the first inverse residual burst bead feature atlas into the modified linear activation function layer to obtain a second inverse residual burst bead feature atlas; Inputting the second inverted residual bursting bead feature atlas into the depthwise separable convolutional layer to obtain a third inverted residual bursting bead feature atlas; Inputting the third inverse residual bursting bead feature atlas into the modified linear activation function layer to obtain a fourth inverse residual bursting bead feature atlas; Through the fourth convolutional layer, convolution dimension reduction processing is performed on the fourth inverse residual bursting bead feature atlas to obtain a fifth inverse residual bursting bead feature atlas; Inputting the fifth inverse residual burst bead feature atlas into the linear layer to obtain a sixth inverse residual burst bead feature atlas; Performing feature fusion on each sixth inverse residual popping bead feature map in the sixth inverse residual popping bead feature map set and the third popping bead feature map corresponding to the third popping bead feature map set for cigarettes to generate a fused popping bead feature map, thereby obtaining a fused popping bead feature map set; The fused bursting bead feature atlas is input into the convolutional attention mechanism layer to obtain the seventh inverted residual bursting bead feature atlas as the fourth cigarette bursting bead feature atlas.
6. The method according to claim 1, wherein: The step of performing a priori frame detection processing on each bursting bead feature map in the bursting bead feature map set to generate a target bursting bead anchor frame group to obtain a target bursting bead anchor frame group set includes: Inputting the tenth cigarette popping bead feature atlas into the multi-layer popping bead convolution feature extraction layer to obtain a first popping bead feature atlas to be detected; Performing upsampling processing on the first to-be-detected popping bead feature atlas to obtain a second to-be-detected popping bead feature atlas; Performing feature fusion processing on the ninth feature atlas of the cigarette popping beads and the second feature atlas of the to-be-detected popping beads to obtain a first fused feature atlas of the to-be-detected popping beads; Inputting the first fused feature atlas of the to-be-detected popping beads into the multi-layer popping bead convolution feature extraction layer to obtain a third feature atlas of the to-be-detected popping beads; Performing upsampling processing on the third to-be-detected burst bead feature atlas to obtain a fourth to-be-detected burst bead feature atlas; Performing feature fusion processing on the eighth cigarette popping bead feature atlas and the fourth to-be-detected popping bead feature atlas to obtain a second fused to-be-detected popping bead feature atlas; Inputting the second fused bursting bead feature atlas to be detected into the multi-layer bursting bead convolution feature extraction layer to obtain a fifth bursting bead feature atlas to be detected; Performing convolution feature extraction on the first to-be-detected popping bead feature atlas, the third to-be-detected popping bead feature atlas, and the fifth to-be-detected popping bead feature atlas to obtain a sixth to-be-detected popping bead feature atlas, a seventh to-be-detected popping bead feature atlas, and an eighth to-be-detected popping bead feature atlas; hierarchical clustering is performed on the prediction a priori frame width group set and the prediction a priori frame length group set in the prediction a priori frame group set included in the sixth to-be-detected burst bead feature atlas to obtain a first target a priori frame width group set and a first target a priori frame length group set; Combining the first target a priori box width group set and the first target a priori box length group set to obtain a first target a priori box group set; Performing a priori frame combination recommendation processing on the seventh to-be-detected burst bead feature atlas to obtain a second target priori frame group set; Performing a priori frame combination recommendation processing on the eighth to-be-detected burst bead feature atlas to obtain a third target a priori frame group set; The first target priori frame set, the second target priori frame set and the third target priori frame set are determined as the target bursting bead anchor frame set.
7. A device for detecting bursting beads, comprising: An acquisition unit is configured to acquire a set of images of cigarette bursting beads to be detected; The input unit is configured to input the to-be-detected cigarette bursting bead image set into the trained bursting bead feature map extraction network to obtain the bursting bead feature map set, wherein the bursting bead feature map extraction network includes: a first convolutional layer, a standard normalization layer, a modified linear activation function layer, a first inverse residual bursting bead feature extraction network, a second inverse residual bursting bead feature extraction network, a third inverse residual bursting bead feature extraction network, a fourth inverse residual bursting bead feature extraction network, a fifth inverse residual bursting bead feature extraction network, a sixth inverse residual bursting bead feature extraction network, a seventh inverse residual bursting bead feature extraction network and a second convolutional layer; and the to-be-detected cigarette bursting bead image set is input into the trained bursting bead feature map extraction network to obtain the bursting bead feature map set, comprising: inputting the to-be-detected cigarette bursting bead image set into the trained bursting bead feature map extraction network to obtain the bursting bead feature map set. The detection cigarette popping bead image set is input into the first convolution layer to obtain the first cigarette popping bead feature atlas; the first cigarette popping bead feature atlas is input into the standard normalization layer to obtain the second cigarette popping bead feature atlas; the second cigarette popping bead feature atlas is input into the corrected linear activation function layer to obtain the third cigarette popping bead feature atlas, wherein the corrected linear activation function layer is a network layer whose activation function is the LeakyReLU activation function; the third cigarette popping bead feature atlas is input into the first inverse residual popping bead feature extraction network to obtain the fourth cigarette popping bead feature atlas, wherein the first inverse residual popping bead feature extraction network firstly increases the dimension through 1*1 convolution, and then extracts the popping bead image through a 3*3 depth-separable convolution layer. The image features are then reduced by 1*1 convolution, and finally a network including a residual structure is constructed by a convolutional attention mechanism layer to solve the importance of pixels in different channels and different positions in the same channel, wherein the convolutional attention mechanism layer includes a channel attention module and a spatial attention module; the fourth cigarette popping bead feature atlas is input into the second inverse residual popping bead feature extraction network to obtain the fifth cigarette popping bead feature atlas; the fifth cigarette popping bead feature atlas is input into the third inverse residual popping bead feature extraction network to obtain the sixth cigarette popping bead feature atlas; the sixth cigarette popping bead feature atlas is input into the fourth inverse residual popping bead feature extraction network to obtain the seventh cigarette popping bead feature atlas; the seventh cigarette popping bead feature atlas is input into the fifth The inverse residual popping bead feature extraction network is used to obtain an eighth popping bead feature atlas for cigarettes; the eighth popping bead feature atlas for cigarettes is input into the sixth inverse residual popping bead feature extraction network to obtain a ninth popping bead feature atlas for cigarettes; the ninth popping bead feature atlas for cigarettes is input into the seventh inverse residual popping bead feature extraction network to obtain a tenth popping bead feature atlas for cigarettes; the tenth popping bead feature atlas for cigarettes is input into the second convolutional layer to obtain an eleventh popping bead feature atlas for cigarettes; the eleventh popping bead feature atlas for cigarettes is input into the standard normalization layer to obtain a twelfth popping bead feature atlas for cigarettes; the twelfth popping bead feature atlas for cigarettes is input into the corrected linear activation function layer to obtain a thirteenth popping bead feature atlas for cigarettes as the popping bead feature atlas; a priori frame detection unit, configured to perform a priori frame detection processing on each bursting bead feature map in the bursting bead feature map set to generate a target bursting bead anchor frame group, thereby obtaining a target bursting bead anchor frame group set; A bursting bead bubble defect detection unit is configured to perform a bursting bead bubble defect detection on the target bursting bead anchor frame set to obtain a bursting bead bubble detection result; A contour extraction unit is configured to perform contour extraction on at least one to-be-detected cigarette bursting bead image that indicates that there is no bursting bead bubble defect in the bursting bead bubble detection result, to obtain a bursting bead contour set; A geometric detection unit is configured to perform geometric detection on the bursting bead contour set to obtain a bursting bead roundness information set; a determination unit configured to determine the inscribed circle area and the circumscribed circle area of each to-be-detected to-bead image of the at least one to-be-detected to-bead image according to the to-bead roundness information set, and obtain a to-bead inscribed circle area set and a to-bead circumscribed circle area set; A popping bead roundness defect detection unit is configured to perform a popping bead roundness defect detection on the at least one popping bead image to be detected according to the popping bead inscribed circle area set and the popping bead circumscribed circle area set, and obtain a popping bead roundness detection result; The bursting bead scale defect detection unit is configured to perform a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour that indicates that there is no bursting bead roundness detection defect in the bursting bead roundness detection result, and obtain a bursting bead size detection result, wherein the performing a bursting bead scale defect detection based on a bursting bead area on at least one bursting bead contour that indicates that there is no bursting bead roundness detection defect in the bursting bead roundness detection result, and obtaining a bursting bead size detection result, comprises: determining a bursting bead contour area of each bursting bead contour in the at least one bursting bead contour, and obtaining a bursting bead contour area set; randomly selecting the bursting bead contour area set, and obtaining a target bursting bead contour area as a bursting bead area root node; based on the bursting bead area root node, performing the following construction steps: recursively constructing a bursting bead contour area tree for the bursting bead contour area set according to the bursting bead area root node, and obtaining a bursting bead contour area tree; determining the number of times the construction step has been executed; in response to determining that the number of times the execution has been greater than or equal to a preset execution number threshold, Determine the mean value of the bursting bead area depth of each bursting bead contour area in the bursting bead contour area set in the bursting bead area depth value group of each obtained bursting bead contour area tree, and obtain the mean value set of the bursting bead area depth; in response to determining that the number of executions is less than the preset execution number threshold, re-randomly select the bursting bead contour area set to obtain a random bursting bead contour area as the bursting bead area root node, and determine the sum of the number of executions and the preset value as the number of executions, so as to perform the construction step again; perform outlier recognition on the bursting bead contour area set according to the mean value set of the bursting bead area depth to obtain a first discrete value recognition result; perform distance area discrete value recognition on the bursting bead contour area set to obtain a second discrete value recognition result; perform statistical area discrete value recognition on the bursting bead contour area set to obtain a third discrete value recognition result; generate a bursting bead size detection result according to the first discrete value recognition result, the second discrete value recognition result and the third discrete value recognition result; The control unit is configured to control the bursting bead rejection device according to the bursting bead bubble detection result, the bursting bead roundness detection result and the bursting bead size detection result, so as to reject defective bursting beads from the bursting bead set to be inspected corresponding to the bursting bead image set to be inspected.
8. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Faster RCNN-based cigarette bead blasting defect detection method, device and equipment
CN113516618A
Quantitative analysis method for morphology of initiating explosive device medicament particles
CN114184524A
Steel pipe defect intelligent detection method
CN114937039A
Insulator defect detection method based on adaptive feature fusion and lightweight YOLOv5s
CN117173526A