Product intelligent detection model minimization learning method and device, electronic equipment and storage medium
By extracting multi-scale guiding feature maps of product images and learning network parameters, and generating target product detection models, the problem of the long learning time and local optimal solutions in industrial intelligent detection is solved, and efficient and real-time product detection is achieved.
Patent Information
- Application Number
- CN202411603002.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-25
AI Technical Summary
The existing deep learning algorithms have problems such as long learning time and local optimal solutions in industrial intelligent detection, which is difficult to meet the real-time and low-cost requirements of industrial production lines.
By obtaining product image training sets for different projects in different fields, using the pre-trained original deep learning model to extract the multi-scale guiding feature map of product sample images, determining the feature information fusion matrix and guidance signal fusion matrix in the preset small neural network model, and learning network parameters to generate the target product detection model.
The network structure size of the target product detection model is significantly reduced, the training speed is improved, the learning of global optimal solutions is ensured, and the detection efficiency and production line management level are improved.
Smart Images

Figure CN119516334A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial product detection, and in particular to a method, device, electronic equipment and storage medium for miniaturized learning of a product intelligent detection model. Background Art
[0002] Modern advanced intelligent flexible industrial production lines require fast, real-time, automatic and high-precision detection of product quality to meet the high-speed production rhythm of products. The corresponding online detection of product quality must keep up with the speed of industrial production lines. Therefore, high requirements are placed on real-time automatic intelligent detection, which requires not only high detection accuracy, but also fast real-time detection speed. Generally speaking, high-precision detection requires more complex and larger AI models and more learning parameters, but the reasoning speed of large models is generally slower and requires a lot of resources, such as large memory, high-performance graphics cards, and strong computing power, which makes it difficult to meet the real-time and low-cost production requirements of industrial production lines.
[0003] Although AI deep learning has been successfully applied to many fields in recent years. However, the existing deep learning algorithm is an iterative method based on gradients, and there are common problems such as inherent local suboptimal solutions, overfitting, and relatively weak generalization ability. Therefore, the quality of the deep network model after training is generally not guaranteed. Since the model obtained by each training is generally a local suboptimal solution, it is generally necessary to repeatedly run the training to obtain multiple models in actual application, and then select the best model from them. However, this best model is generally still not the global optimal solution. Therefore, in actual industrial intelligent detection applications, the learning process of obtaining a deep model with satisfactory performance is relatively long, and it is difficult to adapt to the time requirements of rapid product changeovers of many flexible production lines, which greatly affects the detection quality and production efficiency of the production line, and causes huge losses in economic benefits, affecting the application and promotion of AI in real-time industrial detection. In addition, due to the diversity and complexity of the objects detected on the actual industrial production line and the diversity of detection performance requirements, it is usually difficult to determine in advance the training set size and deep learning model structure required for intelligent detection in a specific project. It is usually necessary to adjust the training set and model structure (corresponding to different configurations) multiple times to obtain a deep intelligent detection model that meets the performance requirements. However, each adjustment of the training set or deep model structure not only requires repeating the above-mentioned complicated learning process, but also because existing deep learning methods generally cannot obtain the global optimal solution even after multiple trainings, there is an incomparable problem when comparing trained models under different configurations, that is, generally only two local suboptimal solutions can be compared, which may lead to wrong results. For example, if the local suboptimal solution of the first configuration is better than the local suboptimal solution of the second configuration, it does not mean that the global optimal solution of the first configuration is better than the global optimal solution of the second configuration. Therefore, it is still a challenging task to efficiently and correctly evaluate and compare the performance of deep models with different configurations. Summary of the invention
[0004] The present invention provides a method, device, electronic device and storage medium for miniaturized learning of a product intelligent detection model, which not only significantly reduces the network structure size of the target product detection model and greatly improves the training speed of the target product detection model, but also overcomes the problems of long learning time and inherent local optimal solutions in existing deep learning algorithms, and can effectively ensure that the target product detection model can learn the global optimal solution.
[0005] According to one aspect of the present invention, a method for miniaturizing a product intelligent detection model is provided, comprising:
[0006] Obtain product image training sets of different fields and projects; wherein the product image training sets contain at least two product sample images;
[0007] Extracting guiding feature maps of at least two scales from each product sample image in the product image training set respectively through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields;
[0008] According to the guiding feature graph of each scale, determining a feature information fusion matrix and a guiding signal fusion matrix of a network layer corresponding to each scale in a preset small neural network model; wherein the number of network layers included in the preset small neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer;
[0009] According to the feature information fusion matrix and the guidance signal fusion matrix, the network parameters in the corresponding network layer in the preset small neural network model are learned to generate a target product detection model.
[0010] According to another aspect of the present invention, there is provided a device for miniaturizing and learning a product intelligent detection model, comprising:
[0011] A product image training set acquisition module, used to acquire product image training sets of different fields and projects; wherein the product image training set contains at least two product sample images;
[0012] A guidance feature map extraction module, used to extract guidance feature maps of at least two scales of each product sample image in the product image training set through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields;
[0013] An information fusion matrix determination module is used to determine, according to the guidance feature map of each scale, a feature information fusion matrix and a guidance signal fusion matrix of a network layer corresponding to each scale in a preset fine neural network model; wherein the number of network layers included in the preset fine neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer;
[0014] The target product detection model learning module is used to learn the network parameters in the corresponding network layer in the preset fine neural network model according to the feature information fusion matrix and the guidance signal fusion matrix, and generate a target product detection model.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the product intelligent detection model miniaturization learning method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the product intelligent detection model miniaturization learning method described in any embodiment of the present invention when executed.
[0020] The product intelligent detection model miniaturization learning scheme of the embodiment of the present invention obtains a product image training set of different fields and different projects; wherein the product image training set contains at least two product sample images; extracts at least two scales of guiding feature maps of each product sample image in the product image training set through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields; according to the guiding feature map of each scale, determines the feature information fusion matrix and the guiding signal fusion matrix of the network layer corresponding to each scale in the preset miniaturized neural network model; wherein the number of network layers contained in the preset miniaturized neural network model is the same as the number of network blocks contained in the original deep learning model, and each network block contained in the original deep learning model is composed of at least one network layer; according to the feature information fusion matrix and the guiding signal fusion matrix, learns the network parameters in the corresponding network layer in the preset miniaturized neural network model to generate a target product detection model. The technical solution provided by the embodiment of the present invention not only significantly reduces the network structure size of the target product detection model, greatly improves the training speed of the target product detection model, but also overcomes the problems of long learning time and inherent local optimal solutions in existing deep learning algorithms, and can effectively ensure that the target product detection model can learn the global optimal solution, and can efficiently and comprehensively evaluate and compare the performance of different deep network models under different configurations, accelerate the speed of updating and adjusting the product detection model, thereby further improving the detection efficiency of the product through the target product detection model, and improving the online, changeover planning and management level of industrial flexible production lines.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flowchart of a method for miniaturizing a product intelligent detection model provided in the first embodiment of the present invention;
[0024] Figure 2 A flowchart of a method for miniaturizing a product intelligent detection model provided in the second embodiment of the present invention;
[0025] Figure 3 A schematic diagram of a product intelligent detection model learning process provided by an embodiment of the present invention;
[0026] Figure 4 A flowchart of a product intelligent detection model miniaturization learning method and a product detection method provided in Embodiment 3 of the present invention;
[0027] Figure 5 A schematic diagram of a product detection process provided by an embodiment of the present invention;
[0028] Figure 6 A schematic diagram of the structure of an intelligent detection system for industrial product detection provided by Embodiment 4 of the present invention;
[0029] Figure 7 A schematic diagram of the structure of a device for miniaturizing and learning a product intelligent detection model provided in Embodiment 5 of the present invention;
[0030] Figure 8 A schematic diagram of the structure of an electronic device for implementing the product intelligent detection model miniaturization learning method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1A flowchart of a method for miniaturizing a product intelligent detection model is provided for the first embodiment of the present invention. This embodiment is applicable to the case of miniaturizing a product intelligent detection model. The method can be performed by a miniaturized learning device for a product intelligent detection model. The miniaturized learning device for a product intelligent detection model can be implemented in the form of hardware and / or software. The miniaturized learning device for a product intelligent detection model can be configured in an electronic device. Figure 1 As shown, the method includes:
[0035] S110, obtaining product image training sets of different fields and projects; wherein the product image training sets contain at least two product sample images.
[0036] In an embodiment of the present invention, industrial production involves multiple fields, and each field contains different projects. For example, for the technical field of mobile terminals (such as mobile phones), multiple different projects are involved, such as the same project corresponds to the same model of mobile phones. At least two product sample images of different projects in different fields are obtained, and a product image training set is generated based on at least two product sample images. Among them, the product sample images included in the product image training set are representative and diverse, and the product image training set contains a first preset number of product positive sample images and a second preset number of product negative sample images. Exemplarily, the product positive sample images included in the product image training set are sample images taken by the camera at different shooting angles and different lighting conditions for each positive product (that is, products without quality problems or non-abnormal products) of different projects in different fields; the product negative sample images included in the product image training set are sample images taken by the camera at different shooting angles and different lighting conditions for each defective product (that is, products with quality problems or abnormal products) of different projects in different fields.
[0037] S120. Extracting guiding feature maps of at least two scales for each product sample image in the product image training set through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields.
[0038] In an embodiment of the present invention, a pre-trained original deep learning model is obtained, wherein the pre-trained original deep learning model can be understood as an original deep learning model that has been trained, and the original deep learning model is a deep learning model trained based on product images of different projects in different fields. Exemplarily, based on at least two product images of different projects in different fields, a preset fine neural network model is trained to generate an original deep learning model. Among them, the product images of different projects in different fields used to train the original deep learning model include product positive sample images and product negative sample images. The original deep learning model is a large neural network model, and the original deep learning model may be composed of hundreds of network layers. Exemplarily, the original deep learning model is composed of multiple network blocks, each network block contains multiple network layers, such as each network block contains 10-50 network layers. Each product sample image in the product image training set is input into the original deep learning model respectively, and at least two scales of guiding feature maps corresponding to each product sample image are obtained through the original deep learning model. Exemplarily, the original deep learning model is used to obtain the three scales of guiding feature maps corresponding to each product sample image, such as respectively obtaining guiding feature maps of size 128*128, 64*64, and 32*32. For example, if the product image training set contains 1000 product sample images, then the original deep learning model can be used to obtain 1000*S2 128*128 guiding feature maps, 1000*S3 64*64 guiding feature maps, and 1000*S4 32*32 guiding feature maps, where Si is the number of channels of the guiding feature map at the corresponding scale.
[0039] S130. Determine, based on the guiding feature map of each scale, a feature information fusion matrix and a guiding signal fusion matrix of the network layer corresponding to each scale in a preset small neural network model; wherein the number of network layers included in the preset small neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer.
[0040] In an embodiment of the present invention, a preset small neural network model is obtained, wherein the network structure of the preset small neural network model is much smaller than the network structure of the original deep learning model, that is, the number of network layers included in the preset small neural network model is much smaller than the number of network layers included in the original deep learning model. Optionally, the number of network layers included in the preset small neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer. Exemplarily, the original deep learning model includes five network blocks, and the five network blocks are respectively a network block with an output feature map size of 256*256, a network block of 128*128, a network block of 64*64, a network block of 32*32, and a network block of 16*16, and the network block of 256*256, the network block of 128*128, the network block of 64*64, the network block of 32*32, and the network block of 16*16 are connected sequentially from input to output, and the preset fine neural network model is also composed of a network layer with an output feature map size of 256*256, a network layer of 128*128, a network layer of 64*64, a network layer of 32*32, and a network layer of 16*16 connected sequentially from input to output. Among them, the number of network layers contained in each network block constituting the original product detection model can be the same or different. In addition, the initial network parameters in the preset fine neural network model can be any value, and the embodiment of the present invention does not limit the initial network parameters in the preset fine neural network model.
[0041] For each scale of the guiding feature maps of at least two scales, determine the feature information fusion matrix A and the guidance information fusion matrix B of the network layer corresponding to each scale in the pre-trained neural network model according to the guiding feature map of the scale. It is understandable that all guiding feature maps of the same scale are analyzed to determine the feature information fusion matrix and the guidance signal fusion matrix of the network layer corresponding to each scale in the preset fine neural network model. Exemplarily, according to 1000*S1 sheets of 256*256 guiding feature maps, determine the feature information fusion matrix A1 and the guidance signal fusion matrix B1 of the network layer corresponding to the scale of 256*256 in the preset fine neural network model; according to 1000*S2 sheets of 128*128 guiding feature maps, determine the feature information fusion matrix A2 and the guidance signal fusion matrix B2 of the network layer corresponding to the scale of 128*128 in the preset fine neural network model; according to 1000*S3 sheets of 64*64 guiding feature maps, determine the feature information fusion matrix A1 and the guidance signal fusion matrix B1 of the network layer corresponding to the scale of 256*256 in the preset fine neural network model; according to 1000*S4 sheets of 64*64 guiding feature maps, determine the feature information fusion matrix A2 and the guidance signal fusion matrix B2 of the network layer corresponding to the scale of 128*128 in the preset fine neural network model; according to 1000*S5 sheets of 64*64 guiding feature maps, determine the feature information fusion matrix A1 and the guidance signal fusion matrix B1 of the network layer corresponding to the scale of 256*256 in the preset fine neural network model; according to 1000*S6 sheets of 64*64 guiding feature maps, determine the feature information fusion matrix A1 and the guidance signal fusion matrix B1 of the network layer corresponding to the scale of 256*256 in the preset fine neural network model; according to 1000* The feature information fusion matrix A3 and the guidance signal fusion matrix B3 of the network layer corresponding to the scale of 64*64 in the network model; according to 1000*S4 sheets of 32*32 guidance feature maps, the feature information fusion matrix A4 and the guidance signal fusion matrix B4 of the network layer corresponding to the scale of 32*32 in the preset small neural network model are determined; according to 1000*S5 sheets of 16*16 guidance feature maps, the feature information fusion matrix A5 and the guidance signal fusion matrix B5 of the network layer corresponding to the scale of 16*16 in the preset small neural network model are determined. Among them, the number of feature information fusion matrices and the number of guidance signal fusion matrices are the same as the number of network layers included in the preset small neural network model, and are also the same as the number of scales involved in the guidance feature maps.
[0042] S140. According to the feature information fusion matrix and the guidance signal fusion matrix, the network parameters in the corresponding network layer in the preset small neural network model are learned to generate a target product detection model.
[0043] In an embodiment of the present invention, the characteristic information fusion matrix and the guidance signal fusion matrix of the network layer of each scale in the preset fine neural network model are processed according to the preset processing strategy, and the network parameters of the corresponding network layer in the preset fine neural network model are learned. Exemplarily, according to the characteristic information fusion matrix A1 and the guidance signal fusion matrix B1 of the network layer corresponding to the scale of 256*256 in the preset fine neural network model, the network parameters of the network layer corresponding to the scale of 256*256 in the preset fine neural network model are learned; according to the characteristic information fusion matrix A2 and the guidance signal fusion matrix B2 of the network layer corresponding to the scale of 128*128 in the preset fine neural network model, the network parameters of the network layer corresponding to the scale of 128*128 in the preset fine neural network model are learned; according to the characteristic information fusion matrix A2 and the guidance signal fusion matrix B2 of the network layer corresponding to the scale of 64*64 in the preset fine neural network model, the network parameters of the network layer corresponding to the scale of 64*64 in the preset fine neural network model are learned. According to the feature information fusion matrix A3 and the guidance signal fusion matrix B3, the network parameters of the network layer corresponding to the scale of 64*64 in the preset small neural network model are learned; according to the feature information fusion matrix A4 and the guidance signal fusion matrix B4 of the network layer corresponding to the scale of 32*32 in the preset small neural network model, the network parameters of the network layer corresponding to the scale of 32*32 in the preset small neural network model are learned; according to the feature information fusion matrix A5 and the guidance signal fusion matrix B5 of the network layer corresponding to the scale of 16*16 in the preset small neural network model, the network parameters of the network layer corresponding to the scale of 16*16 in the preset small neural network model are learned. According to the above method, the network parameters of each network layer in the preset small neural network model can be quickly calculated, so that the preset small neural network model with the network parameters of each network layer determined is used as the target product detection model.
[0044] The product intelligent detection model miniaturization learning scheme of the embodiment of the present invention obtains a product image training set of different fields and different projects; wherein the product image training set contains at least two product sample images; extracts at least two scales of guiding feature maps of each product sample image in the product image training set through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields; according to the guiding feature map of each scale, determines the feature information fusion matrix and the guiding signal fusion matrix of the network layer corresponding to each scale in the preset miniaturized neural network model; wherein the number of network layers contained in the preset miniaturized neural network model is the same as the number of network blocks contained in the original deep learning model, and each network block contained in the original deep learning model is composed of at least one network layer; according to the feature information fusion matrix and the guiding signal fusion matrix, learns the network parameters in the corresponding network layer in the preset miniaturized neural network model to generate a target product detection model. The technical solution provided by the embodiment of the present invention not only significantly reduces the network structure size of the target product detection model, greatly improves the training speed of the target product detection model, but also overcomes the problems of long learning time and inherent local optimal solutions in existing deep learning algorithms, and can effectively ensure that the target product detection model can learn the global optimal solution, and can efficiently and comprehensively evaluate and compare the performance of different deep network models under different configurations, accelerate the speed of updating and adjusting the product detection model, thereby further improving the detection efficiency of the product through the target product detection model, and improving the online, changeover planning and management level of industrial flexible production lines.
[0045] Embodiment 2
[0046] Figure 2 A flowchart of a product intelligent detection model miniaturization learning method provided in the second embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0047] S210, obtaining product image training sets of different fields and different projects; wherein the product image training sets contain at least two product sample images.
[0048] S220, traversing each product sample image in the product image training set, and extracting a guiding feature map of the product sample image having the same scale as the corresponding network block through the network block of each scale in the pre-trained original deep learning model.
[0049] In an embodiment of the present invention, the original deep learning model is composed of at least two network blocks of different scales, wherein the scales of the network blocks are different, the sizes of the output feature maps are different, and each network block of the original deep learning model is composed of multiple network layers. It should be noted that the scale of the corresponding network block is defined according to the size of the feature map output by each network block contained in the original deep learning model. Each product sample image in the product image training set is traversed, and each product sample image is input into the original deep learning model. The guiding feature map of the product sample image is extracted according to the network blocks of each scale in the original deep learning model, wherein the size of the guiding feature map of the product sample image extracted by the network blocks of each scale is the same as the scale of the corresponding network block. Exemplarily, Figure 3 A schematic diagram of a product intelligent detection model learning process provided by an embodiment of the present invention, such as Figure 3 As shown, the original deep learning model G contains a total of m network blocks, namely the first layer network block G1, the second layer network block G2, ..., the m-th layer network block Gm. The m network blocks in the original deep learning model G are connected sequentially from input to output, that is, the output end of the first layer network block G1 is connected to the input end of the second layer network block G2, the output end of the second layer network block G2 is connected to the input end of the third layer network block G3, ..., the output end of the m-1th layer network block G(m-1) is connected to the input end of the m-th layer network block Gm. The product sample image is input into the first network block G1 in the original deep learning model G, and the guiding feature map T1 with the same scale size as that of the first network block G1 is extracted from the product sample image through the first network block G1; the guiding feature map T1 output by the first network block G1 is input into the second network block G2, and the guiding feature map T2 with the same scale size as that of the second network block G2 is extracted through the second network block G2; and so on, the guiding feature map Tm with the same scale size as that of the mth network block Gm can be obtained through the mth network block Gm.
[0050] S230, determining the structural information of each network layer in the preset small neural network model.
[0051] In an embodiment of the present invention, the structural information of each network layer in the preset small neural network model is determined, wherein the structural information includes the structural parameters and the number of channels of the convolution layer of each network layer. The structural information of each network layer is used to characterize the various network parameters that need to be determined for the corresponding network layer. Figure 3As shown, the preset small neural network model C contains a total of m network layers, namely the first network layer C1, the second network layer C2, ..., the mth network layer Cm. The m network layers in the preset small neural network model C are connected in sequence from input to output, that is, the output end of the first network layer C1 is connected to the input end of the second network layer C2, the output end of the second network layer C2 is connected to the input end of the third network layer C3, ..., the output end of the m-1th network layer C(m-1) is connected to the input end of the mth network layer Cm. The structural information H1 of the first network layer C1, the structural information H2 of the second network layer C2, ..., and the structural information Hm of the mth network layer Cm are determined respectively. Optionally, the structural information of each network layer in the preset small neural network model can be determined according to the information input by the user, that is, the structural information of each network layer in the preset small neural network model can be the network structure information pre-set by the user.
[0052] S240. Determine, based on the guiding feature graph of each scale, a feature information fusion matrix and a guiding signal fusion matrix of the network layer corresponding to each scale in a preset small neural network model; wherein the number of network layers included in the preset small neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer.
[0053] For example, Figure 3 As shown, the global learning module determines the feature information fusion matrix A1 and the guidance signal fusion matrix B1 corresponding to the first network block G1 according to all the guidance feature maps T1 corresponding to the product image training set output by the first network block G1 of the original deep learning model; the global learning module determines the feature information fusion matrix A2 and the guidance signal fusion matrix B2 corresponding to the second network block G2 according to all the guidance feature maps T2 corresponding to the product image training set output by the second network block G2 of the original deep learning model; and so on, the global learning module determines the feature information fusion matrix Am and the guidance signal fusion matrix Bm corresponding to the mth network block Gm according to all the guidance feature maps Tm corresponding to the product image training set output by the mth network block Gm of the original deep learning model.
[0054] S250. Based on the feature information fusion matrix, the guidance signal fusion matrix and the structural information of the network layer of the corresponding scale in the preset fine neural network model, learn the network parameters in the corresponding network layer in the preset fine neural network model to generate a target product detection model.
[0055] In the embodiment of the present invention, the structural information of each network layer in the preset small neural network model is used to characterize the various network parameters that need to be determined for the corresponding network layer. Therefore, the processing strategy for the feature information fusion matrix and the guidance signal fusion matrix of the corresponding network layer can be determined according to the structural information of each network layer, and the feature information fusion matrix and the guidance signal fusion matrix of the corresponding network layer can be processed according to the corresponding processing strategy, so as to learn the network parameters of the corresponding network layer in the preset small neural network model, and realize the global training and learning of the network parameters of each network layer in the preset small neural network model. Figure 3 As shown, the global learning module determines the various network parameters of the first network layer C1 in the preset fine neural network model according to the feature information fusion matrix A1 and the guidance signal fusion matrix B1 corresponding to the first network block G1 of the original deep learning model and the structural information H1 of the first network layer C1 in the preset fine neural network model; the global learning module determines the various network parameters of the second network layer C2 in the preset fine neural network model according to the feature information fusion matrix A2 and the guidance signal fusion matrix B2 corresponding to the second network block G2 of the original deep learning model and the structural information H2 of the second network layer C2 in the preset fine neural network model; and so on, the global learning module determines the various network parameters of the mth network layer Cm in the preset fine neural network model according to the feature information fusion matrix Am and the guidance signal fusion matrix Bm corresponding to the mth network block Gm of the original deep learning model and the structural information Hm of the mth network layer Cm in the preset fine neural network model.
[0056] The technical solution provided by the embodiment of the present invention not only significantly reduces the network structure size of the target product detection model, greatly improves the training speed of the target product detection model, but also overcomes the problems of long learning time and inherent local optimal solutions in existing deep learning algorithms, and can effectively ensure that the target product detection model can learn the global optimal solution, and can efficiently and comprehensively evaluate and compare the performance of different deep network models under different configurations, accelerate the speed of updating and adjusting the product detection model, thereby further improving the detection efficiency of the product through the target product detection model, and improving the online, changeover planning and management level of industrial flexible production lines.
[0057] Embodiment 3
[0058] Figure 4 A flowchart of a product intelligent detection model miniaturization learning method and a product detection method provided in Embodiment 3 of the present invention, such as Figure 4 As shown, the method includes:
[0059] S410, obtaining product image training sets of different fields and different projects; wherein the product image training sets contain at least two product sample images.
[0060] S420. Extract at least two scales of guiding feature maps for each product sample image in the product image training set through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields.
[0061] S430. According to the guiding feature map of each scale, determine the feature information fusion matrix and the guiding signal fusion matrix of the network layer corresponding to each scale in the preset small neural network model; wherein the number of network layers included in the preset small neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer.
[0062] S440. According to the feature information fusion matrix and the guidance signal fusion matrix, the network parameters in the corresponding network layer in the preset small neural network model are learned to generate a target product detection model.
[0063] S450: Acquire an image of a product to be inspected.
[0064] In the embodiment of the present invention, an image of the product to be detected is obtained, and the image of the product to be detected is used as the image of the product to be detected. The image of the product to be detected may be one or more images, and the embodiment of the present invention does not limit the number of images of the product to be detected.
[0065] S460: extract target feature maps of at least two scales of the product image to be detected through the target product detection model, and generate a target feature atlas based on the target feature maps of at least two scales.
[0066] In an embodiment of the present invention, the image of the product to be detected is input into the target product detection model, and the target feature map of the product image to be detected is extracted through the network layer of each scale in the target product detection model, wherein the size of the target feature map of the product image to be detected extracted by the network layer of each scale is the same as the scale of the corresponding network layer. Based on the target feature map of the product image to be detected extracted by the network layer of each scale in the target product detection model, a target feature map set is generated.
[0067] S470: Determine a detection result of the product to be detected corresponding to the product image to be detected based on the target feature atlas.
[0068] Exemplarily, the target feature maps of at least two scales in the target feature atlas can be fused to generate a fused feature map, the fused feature map can be compared with the feature map corresponding to the pre-stored product positive sample, and the detection result of the product to be detected corresponding to the product image to be detected is determined based on the comparison result. Among them, the detection result of the product to be detected corresponding to the product image to be detected includes qualified detection and unqualified detection, or the product to be detected is a genuine product and the product to be detected is a defective product. Optionally, the detection result of the product to be detected corresponding to the product image to be detected based on the target feature atlas is determined, including: obtaining the core feature atlas corresponding to the target product detection model; comparing the target feature atlas with the core feature atlas, and generating a detection heat map according to the comparison result; determining the detection result of the product to be detected corresponding to the product image to be detected based on the detection heat map.
[0069] Exemplarily, a core feature atlas corresponding to the target product detection model is obtained, wherein the core feature atlas contains at least two core feature maps. For example, a feature map can be extracted from each product positive sample image used to train the target product detection model, and the extracted feature map is used as the core feature map in the core feature atlas. It should be noted that the embodiment of the present invention does not limit the number of core feature maps contained in the core feature atlas. Optionally, the core feature atlas corresponding to the target product detection model is obtained, including: extracting core feature maps of at least two scales of each product sample image in the product image training set through the target product detection model, and generating a multi-scale feature atlas based on the core feature maps of at least two scales; selecting a multi-scale feature map subset from the multi-scale feature map set, and generating a core feature atlas based on the core feature maps contained in the multi-scale feature map subset. Exemplarily, each product sample image in the project product image training set is traversed, the product sample image is input into the target product detection model, and the core feature map of the corresponding scale is extracted through each network layer of the target product detection model. For example, if the product image training set contains 10,000 product sample images, then the first network layer C1 of the target product detection model can extract S1*10,000 core feature maps N1 of corresponding scales, and the second network layer C2 of the target product detection model can extract S2*10,000 core feature maps N2 of corresponding scales. By analogy, the Nth network layer Cm of the target product detection model can extract Sm*10,000 core feature maps Nm of corresponding scales. Based on the core feature maps of at least two scales, a multi-scale feature atlas is generated. For example, the multi-scale feature atlas contains a total of m core feature maps, wherein the m core feature maps include 10,000 core feature maps N1, 10,000 core feature maps N2, ..., 10,000 core feature maps Nm. According to the preset screening strategy, a multi-scale feature map subset is selected from the multi-scale feature map set, for example, r1 core feature maps N1, r2 core feature maps N2, ..., rm core feature maps Nm are selected, and based on r1 core feature maps N1, r2 core feature maps N2, ..., rm core feature maps Nm, a multi-scale feature map subset is generated. It should be noted that r1, r2, ..., rm can be the same or different, and the embodiment of the present invention does not limit the size relationship of r1, r2, ..., rm. A core feature map set is generated based on the core feature maps included in the multi-scale feature map subset. For example, the multi-scale feature map subset can be directly used as the core feature map set, or the core feature maps of the same scale in the multi-scale feature map subset can be fused according to the preset fusion strategy, and a core feature map set is generated based on the fused core feature maps of each scale.
[0070] At least two scales of target feature maps in the target feature map set are fused to generate a fused target feature map. Exemplarily, the target feature map of the corresponding scale determined by the first network layer C1 of the target product detection model, the target feature map of the corresponding scale determined by the second network layer C2 of the target product detection model, ..., and the target feature map of the corresponding scale determined by the mth network layer Cm of the target product detection model are fused according to a preset fusion strategy to generate a fused target feature map. Similarly, the core feature maps in the core feature map set are fused according to a preset fusion strategy to generate a fused core feature map. Then the fused target feature map and the fused core feature map are compared, and a detection heat map is generated according to the comparison result. It should be noted that the greater the difference between the fused target feature map and the fused core feature map, the darker the overall color of the generated detection heat map; conversely, the smaller the difference between the fused target feature map and the fused core feature map, the lighter the overall color of the generated detection heat map. Then, according to the pre-set detection index, the detection heat map is analyzed to determine the detection result of the product to be detected corresponding to the product image to be detected. Exemplarily, the hot area in the detection heat map whose color depth is greater than the preset color depth threshold is determined, and the ratio of the area of the hot area to the area of the entire detection heat map is calculated. If the ratio is greater than the preset threshold, it can be determined that the product to be detected corresponding to the image of the product to be detected is a defective product; if the ratio is less than the preset threshold, it can be determined that the product to be detected corresponding to the image of the product to be detected is a genuine product.
[0071] Optionally, the target feature atlas is compared with the core feature atlas, and a detection heat map is generated according to the comparison result, including: comparing the target feature map of each scale in the target feature atlas with the core feature map of the corresponding scale in the core feature atlas, and generating a corresponding initial heat map according to the comparison result; fusing the initial heat maps corresponding to all scales to generate a detection heat map.
[0072] Exemplarily, the target feature map of the product image to be detected of the corresponding scale determined by the first network layer C1 of the target product detection model is compared with the core feature map of the corresponding scale in the core feature map set, and the initial heat map P1 is generated according to the comparison result; the target feature map of the product image to be detected of the corresponding scale determined by the second network layer C2 of the target product detection model is compared with the core feature map of the corresponding scale in the core feature map set, and the initial heat map P2 is generated according to the comparison result; and so on, the target feature map of the product image to be detected of the corresponding scale determined by the mth network layer Cm of the target product detection model is compared with the core feature map of the corresponding scale in the core feature map set, and the initial heat map Pm is generated according to the comparison result. It should be noted that the greater the difference between the target feature map and the core feature map, the darker the overall color of the generated initial heat map; conversely, the smaller the difference between the target feature map and the core feature map, the lighter the overall color of the generated initial heat map. The initial heat maps of all scales are fused, that is, the initial heat map P1, the initial heat map P2, ..., the initial heat map Pm are fused to generate a detection heat map. Then, according to the pre-set detection index, the detection heat map is analyzed to determine the detection result of the product to be detected corresponding to the product image to be detected.
[0073] For example, Figure 5 A schematic diagram of a product detection process provided by an embodiment of the present invention. Figure 5 Please understand and I will not elaborate on it again.
[0074] Through the technical solution provided by the embodiment of the present invention, the detection result of the product to be detected can be determined quickly and accurately through the generated target product detection model.
[0075] Embodiment 4
[0076] Figure 6 This is a schematic diagram of the structure of an intelligent detection system for industrial product detection provided by the fourth embodiment of the present invention. Figure 6 As shown, the intelligent detection system includes: a target product detection model unit, a target product detection model global learning unit, a core feature atlas unit, a core feature atlas acquisition unit, a product detection reasoning unit, a training sample database management unit, a training data acquisition unit, a training image selection unit, a multi-domain database unit, and a quality accuracy control unit.
[0077] Target product detection model unit: used to store the trained target product detection model, through which feature maps can be extracted. For example, the core feature map of each product sample image contained in the product image training set can be extracted through the target product detection model; for example, when detecting industrial products, the target feature map of the product image to be detected can be extracted through the target product detection model, so as to detect the product to be detected according to the target feature map. Since it is generally difficult to obtain a large number of samples in the specific project of industrial production line detection, the learning process and the online process of AI intelligent detection are greatly hindered and delayed. In the embodiment of the present invention, a large amount of sample data can be accumulated by collecting samples of many similar but different projects in the same industry. Then, based on a large amount of widely representative sample data in different fields, a deep convolutional neural network learning algorithm is used to learn and train the domain intelligent detection model, so that the common features of different project data samples can be mined, extracted and learned. Domain knowledge such as domain knowledge. Therefore, the domain intelligent detection model not only overcomes the problem of insufficient samples in the specific project of industrial product detection, but also improves the quality and generalization ability of the AI model.
[0078] Target product detection model global learning unit: used to extract at least two scales of guiding feature maps of each product sample image in the product image training set through the pre-trained original deep learning model, and globally learn the network parameters of each network layer of the preset fine neural network model according to the guiding feature maps of at least two scales, so as to determine the network parameters of each network layer in the preset fine neural network model, generate the target product detection model, and send the target product detection model to the target product detection model unit for storage. The fast global training method provided by the embodiment of the present invention not only significantly reduces the network structure size of the target product detection model, but also significantly reduces the learning time of the target product detection model unit, enhances the generalization ability of the target product detection model unit, and avoids the problem of the product detection model falling into the local optimal solution in the existing deep learning process.
[0079] Core feature atlas unit: used to store the core feature atlas corresponding to the target product detection model, wherein the core feature atlas is used to match the target feature set of the product image to be detected to obtain a normal or abnormal detection result of the product to be detected.
[0080] Core feature atlas acquisition unit: used to extract core feature maps of at least two scales of the product image training set through the target product detection model, and generate a multi-scale feature atlas based on the core feature maps of at least two scales, select a multi-scale feature map subset from the multi-scale feature map set, and then obtain a core feature atlas by selecting, fusing and optimizing the multi-scale feature map subset, and send the core feature atlas to the core feature atlas unit.
[0081] Product detection reasoning unit: used to extract target feature maps of at least two scales of the product image to be detected through the target product detection model, and then compare the target feature maps of at least two scales with the core feature atlas corresponding to the target product detection model stored in the core feature atlas unit to obtain a detection heat map, so as to determine the detection result of the product to be detected corresponding to the product image to be detected according to the detection heat map.
[0082] Training sample database management unit: responsible for data collection, management and optimization of data samples in the sample database to ensure the quality and consistency of data samples.
[0083] Training data acquisition unit: used to collect sample data on industrial production lines and pre-process the sample data to improve data consistency and sample data quality.
[0084] Training image selection unit: used to select a suitable image set from the image set collected by the training data collection unit for training the target product detection model according to the specific requirements of the detection project.
[0085] Multi-domain database unit: used to store sample images of different projects in various fields.
[0086] Quality and accuracy control unit: used to control and set the configuration parameters of the entire intelligent detection system, including sample quality control parameters, real-time detection accuracy settings, learning process accuracy settings, and learning hyperparameter settings. The configuration parameters are set with default configuration values, which are generally not required to be modified by the user. The user can also flexibly configure configuration parameters such as learning hyperparameters according to the specific needs of the project to effectively improve the learning and training efficiency of the target product detection model.
[0087] Through the intelligent detection system provided by the embodiment of the present invention, under the condition of a given number of training samples and deep neural network structure, the training learning time of the target product detection model can be quickly estimated, which greatly improves the management level of production line launch and changeover planning. In addition, in the process of training the target product detection model, since there is no training convergence problem, the global optimal solution can be found in one training, so there is no need for manual intervention to check whether the training converges, whether it converges to the correct solution, etc., and there is no need to train the neural network model multiple times and select the best training learning result from it, thereby not only greatly improving the training speed of the target product detection model, but also overcoming the inherent local optimal solution problem in the existing deep learning algorithm, and effectively ensuring that the target product detection model can learn the global optimal solution, so that the target product detection model can be quickly launched or seamlessly connected when the new detection project or the existing project updates the product model, significantly reducing the waiting time of the current existing deep learning technology and improving the economic benefits. In addition, since the network structure of the target product detection model is much smaller than the network structure of the original deep learning model, the target product detection model generated by global learning is significantly reduced, making the application of the target product detection model in the field of industrial product detection more extensive and convenient. In addition, when training and learning the target product detection model, each sample data only needs to be learned once to remember the complete information of the sample data. There is no need to learn multiple times, only new sample data needs to be learned. Therefore, there is no need to save and learn old sample data additionally, which reduces the maintenance cost of sample data and significantly saves the storage space and cost of training samples.
[0088] Embodiment 5
[0089] Figure 7 This is a schematic diagram of the structure of a product intelligent detection model miniaturization learning device provided in Embodiment 5 of the present invention. Figure 7 As shown, the device comprises:
[0090] The product image training set acquisition module 710 is used to acquire product image training sets of different fields and projects; wherein the product image training sets contain at least two product sample images;
[0091] A guidance feature map extraction module 720, configured to extract guidance feature maps of at least two scales for each product sample image in the product image training set by using a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields;
[0092] The information fusion matrix determination module 730 is used to determine the feature information fusion matrix and the guidance signal fusion matrix of the network layer corresponding to each scale in the preset fine neural network model according to the guidance feature map of each scale; wherein the number of network layers included in the preset fine neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer;
[0093] The target product detection model learning module 740 is used to learn the network parameters in the corresponding network layer in the preset small neural network model according to the feature information fusion matrix and the guidance signal fusion matrix, and generate a target product detection model.
[0094] Optionally, the original deep learning model includes at least two network blocks of different scales;
[0095] The guiding feature map extraction module is used to:
[0096] Each product sample image in the product image training set is traversed, and a guiding feature map of the product sample image having the same scale as the corresponding network block is extracted through the network block of each scale in the pre-trained original deep learning model.
[0097] Optionally, the device further comprises:
[0098] A structure information determination module, used to determine the structure information of each network layer in the preset fine neural network model before learning the network parameters in the corresponding network layer in the preset fine neural network model according to the feature information fusion matrix and the guidance signal fusion matrix;
[0099] The target product detection model generation module is used to:
[0100] According to the feature information fusion matrix, the guidance signal fusion matrix and the structural information of the network layer of the corresponding scale in the preset fine neural network model, the network parameters in the corresponding network layer in the preset fine neural network model are learned to generate a target product detection model.
[0101] Optionally, also include:
[0102] The module for acquiring the image of the product to be detected is used to acquire the image of the product to be detected after generating the target product detection model;
[0103] A target feature map extraction module, used to extract target feature maps of at least two scales of the product image to be detected through the target product detection model, and generate a target feature map set based on the target feature maps of at least two scales;
[0104] The detection result determination module is used to determine the detection result of the product to be detected corresponding to the product image to be detected based on the target feature atlas.
[0105] Optionally, the detection result determination module includes:
[0106] A core feature atlas acquisition unit, used to acquire a core feature atlas corresponding to the target product detection model;
[0107] A detection heat map acquisition unit, used for comparing the target feature atlas with the core feature atlas, and generating a detection heat map according to the comparison result;
[0108] A detection result determination unit is used to determine a detection result of the product to be detected corresponding to the image of the product to be detected based on the detection heat map.
[0109] Optionally, the core feature atlas acquisition unit is used to:
[0110] Extracting core feature maps of at least two scales of each product sample image in the product image training set respectively through the target product detection model, and generating a multi-scale feature map set based on the core feature maps of at least two scales;
[0111] A multi-scale feature map subset is selected from the multi-scale feature map set, and a core feature map set is generated based on the core feature maps included in the multi-scale feature map subset.
[0112] Optionally, the detection heat map acquisition unit is used to:
[0113] Compare the target feature map of each scale in the target feature map set with the core feature map of the corresponding scale in the core feature map set, and generate a corresponding initial heat map according to the comparison result;
[0114] The initial heat maps corresponding to all scales are fused to generate a detection heat map.
[0115] The device for miniaturizing and learning a product intelligent detection model provided in an embodiment of the present invention can execute the method for miniaturizing and learning a product intelligent detection model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0116] Embodiment 6
[0117] Figure 8A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0118] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0119] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0120] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running deep learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a product intelligent detection model miniaturization learning method.
[0121] In some embodiments, the product intelligent detection model miniaturization learning method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the product intelligent detection model miniaturization learning method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the product intelligent detection model miniaturization learning method in any other appropriate manner (for example, by means of firmware).
[0122] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0123] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0124] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0125] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0126] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by 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), a blockchain network, and the Internet.
[0127] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0129] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A product intelligent detection model miniaturization learning method, characterized in that: include: Obtain product image training sets of different fields and projects; wherein the product image training sets contain at least two product sample images; Extracting guiding feature maps of at least two scales from each product sample image in the product image training set respectively through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields; According to the guiding feature graph of each scale, determining a feature information fusion matrix and a guiding signal fusion matrix of a network layer corresponding to each scale in a preset small neural network model; wherein the number of network layers included in the preset small neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer; According to the feature information fusion matrix and the guidance signal fusion matrix, the network parameters in the corresponding network layer in the preset small neural network model are learned to generate a target product detection model.
2. The method according to claim 1, characterized in that The original deep learning model includes at least two network blocks of different scales; Extracting guiding feature maps of at least two scales from each product sample image in the product image training set through a pre-trained original deep learning model, including: Each product sample image in the product image training set is traversed, and a guiding feature map of the product sample image having the same scale as the corresponding network block is extracted through the network block of each scale in the pre-trained original deep learning model.
3. The method according to claim 1, characterized in that Before learning the network parameters in the corresponding network layer in the preset small neural network model according to the feature information fusion matrix and the guidance signal fusion matrix, the method further includes: Determine the structural information of each network layer in the preset small neural network model; According to the feature information fusion matrix and the guidance signal fusion matrix, learning the network parameters in the corresponding network layer in the preset small neural network model to generate a target product detection model, including: According to the feature information fusion matrix, the guidance signal fusion matrix and the structural information of the network layer of the corresponding scale in the preset fine neural network model, the network parameters in the corresponding network layer in the preset fine neural network model are learned to generate a target product detection model.
4. The method according to claim 1, characterized in that: After generating the target product detection model, it also includes: Acquire the image of the product to be inspected; Extracting target feature maps of at least two scales of the product image to be detected by the target product detection model, and generating a target feature atlas based on the target feature maps of at least two scales; A detection result of the product to be detected corresponding to the product image to be detected is determined based on the target feature atlas.
5. The method according to claim 4, characterized in that Determining a detection result of the product to be detected corresponding to the product image to be detected based on the target feature atlas includes: Obtaining a core feature atlas corresponding to the target product detection model; Comparing the target feature atlas with the core feature atlas, and generating a detection heat map according to the comparison result; A detection result of the product to be detected corresponding to the product image to be detected is determined based on the detection heat map.
6. The method according to claim 5, characterized in that Obtain the core feature atlas corresponding to the target product detection model, including: Extracting core feature maps of at least two scales of each product sample image in the product image training set respectively through the target product detection model, and generating a multi-scale feature map set based on the core feature maps of at least two scales; A multi-scale feature map subset is selected from the multi-scale feature map set, and a core feature map set is generated based on the core feature maps included in the multi-scale feature map subset.
7. The method according to claim 5, characterized in that Comparing the target feature atlas with the core feature atlas, and generating a detection heat map according to the comparison result, including: Compare the target feature map of each scale in the target feature map set with the core feature map of the corresponding scale in the core feature map set, and generate a corresponding initial heat map according to the comparison result; The initial heat maps corresponding to all scales are fused to generate a detection heat map.
8. A product intelligent detection model miniaturization learning device, characterized in that: include: A product image training set acquisition module, used to acquire product image training sets of different fields and projects; wherein the product image training set contains at least two product sample images; A guidance feature map extraction module, used to extract guidance feature maps of at least two scales of each product sample image in the product image training set through a pre-trained original deep learning model; wherein the original deep learning model is a deep learning model trained based on product images of different fields; An information fusion matrix determination module is used to determine, according to the guidance feature map of each scale, a feature information fusion matrix and a guidance signal fusion matrix of a network layer corresponding to each scale in a preset fine neural network model; wherein the number of network layers included in the preset fine neural network model is the same as the number of network blocks included in the original deep learning model, and each network block included in the original deep learning model is composed of at least one network layer; The target product detection model learning module is used to learn the network parameters in the corresponding network layer in the preset fine neural network model according to the feature information fusion matrix and the guidance signal fusion matrix, and generate a target product detection model.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the product intelligent detection model miniaturization learning method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the product intelligent detection model miniaturization learning method described in any one of claims 1 to 7 when executed.
Citation Information
Cited By
Image data management method and system based on engineering supervision platform
CN119851214A
Product quality detection method of adaptive adjustment feature fusion layer
CN121414669A