VGG network generation method and device and VGG network detection method and device for chip tray detection

Through the combination of VGG network based on transfer learning and DCGAN neural network, automatic detection of chip tray defects is realized, and the problem of difficulty in detecting subtle defects in the human eye in the prior art is solved, the detection accuracy and efficiency are improved, and the cost is reduced. And enhances automation of the production process.

CN119090842APending Publication Date: 2024-12-06WEIWEI (SUZHOU) INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411190360.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to automatically detect subtle defects in chip pallets, resulting in product quality being affected during production, which requires human judgment and insufficient efficiency and accuracy.

Method used

Using a VGG network based on transfer learning, the DCGAN neural network of the generator and discriminator is trained by obtaining chip tray pictures for defect enhancement processing and annotation, and combined with an automated optical imaging system, automatic detection of chip tray defects is achieved.

Benefits of technology

It improves the accuracy and efficiency of chip pallet defect detection, reduces manual intervention, enhances automation and quality control of the production process, reduces costs, and is scalable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090842A_ABST
    Figure CN119090842A_ABST
Patent Text Reader

Abstract

The invention discloses a VGG network generation method and device and a VGG network detection method and device for chip tray detection, and the generation method comprises the following steps: obtaining a plurality of first chip tray pictures; performing defect enhancement processing on each first chip tray picture to obtain a defect-enhanced second chip tray picture corresponding to each first chip tray picture; marking a corresponding first defect detection result for each second chip tray picture, the first defect detection result at least comprising: a plurality of defect positions, a defect type corresponding to each defect position, and a defect confidence corresponding to each defect position; and creating a VGG network based on transfer learning, and training the VGG network based on each second chip tray picture and the first defect detection result corresponding to the second chip tray picture. The VGG network can detect the defects of the chip tray.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip tray detection, and in particular to a generation and detection method and device of a VGG network for chip tray detection. Background Art

[0002] Chip trays are packaging trays used by semiconductor packaging and testing companies for their chip packaging and testing. During the production process of chip trays, due to reasons such as raw material, production molds, and processing technology, defects such as missing materials, burning, and burrs may occur, affecting the normal use of the product.

[0003] Since some defects are relatively subtle, it is difficult to detect them completely using only the human eye. The general practice in the industry is to use an optical microscope or an electron microscope to magnify the surface of the chip tray product and then rely on the experience of the technicians to judge the defects.

[0004] Therefore, being able to automatically detect defects in chip trays becomes an urgent problem to be solved. Summary of the invention

[0005] In view of this, the main purpose of the present invention is to provide a method and device for generating and detecting a VGG network for chip tray detection.

[0006] To achieve the above-mentioned purpose, the technical solution of the present invention is implemented as follows: a method for generating a VGG network for chip tray detection, comprising the following steps: obtaining multiple first chip tray images; performing defect enhancement processing on each first chip tray image, thereby obtaining a defect-enhanced second chip tray image corresponding to each first chip tray image; marking the corresponding first defect detection result for each second chip tray image, the first defect detection result at least including: several defect locations, the defect type corresponding to each defect location, and the defect confidence corresponding to each defect location; creating a VGG network based on transfer learning, and training the VGG network based on each second chip tray image and the first defect detection result corresponding to the second chip tray image.

[0007] As an improvement of an embodiment of the present invention, the "performing defect enhancement processing on each first chip tray image" specifically includes: performing defect enhancement processing on each first chip tray image, and the defect enhancement processing at least includes: rotation, shearing, scaling, distortion, filtering transformation and contrast transformation.

[0008] As an improvement of an embodiment of the present invention, the “performing defect enhancement processing on each first chip tray image” specifically includes: performing defect enhancement processing on each first chip tray image based on a trained DCGAN neural network.

[0009] As an improvement of an embodiment of the present invention, the generator in the DCGAN neural network is used to: receive a linear vector, reconstruct a first feature map through a linear layer, input the first feature map into a basic block, obtain a second feature map output by the basic block, and perform the following operations twice on the second feature map: send it to a DeConv layer, a BN layer, and a ReLu activation function layer in sequence to obtain a third feature map, replace the second feature map with the third feature map, and end this operation; then, send the second feature map to a DeConv layer, a BN layer, and a tanh activation function layer in sequence, and the generator outputs the feature map output by the tanh activation function layer; the discriminator in the DCGAN neural network includes a first convolution layer, a second The activation functions of the first, second and third convolutional layers are all LeakyReLu, basic blocks and BN layers are added in front of the second and third convolutional layers, and Dropout layers are added after the first and third convolutional layers; the discriminator is used to: input the feature map output by the generator into the first convolutional layer, input the feature map output by the first convolutional layer into the second convolutional layer, input the feature map output by the second convolutional layer into the third convolutional layer, and process the feature map output by the third convolutional layer with the Sigmoid activation function to obtain the probability of the sample being true and the probability of being false, and then output the probability of the sample being true and the probability of being false; the loss function of the generator in the DCGAN neural network is The loss function of the discriminator in the DCGAN neural network is Where n is the random difference between the true distribution and the generated distribution, P n is the difference between the true distribution and the generated distribution, λ is the regularization coefficient, is the gradient constraint; the objective function of the game between the generator and the discriminator in the DCGAN neural network is Among them, x is the real sample data, P r (x) is the probability distribution of x, E is the mathematical expectation, z is the random variable, P g (z) is the probability distribution of z, and V(D,G) is the value function of the discriminator and the generator.

[0010] As an improvement of an embodiment of the present invention, the “labeling each second chip tray image with a corresponding first defect detection result” specifically includes: using a data labeling tool Labelme to label each second chip tray image with a corresponding first defect detection result.

[0011] An embodiment of the present invention also provides a device for generating a VGG network for chip tray detection, comprising the following modules: an image acquisition module, used to acquire multiple first chip tray images; a processing module, used to perform defect enhancement processing on each first chip tray image, thereby obtaining a defect-enhanced second chip tray image corresponding to each first chip tray image; for each second chip tray image, a corresponding first defect detection result is marked, and the first defect detection result includes at least: a number of defect locations, a defect type corresponding to each defect location, and a defect confidence corresponding to each defect location; creating a VGG network based on transfer learning, and training the VGG network based on each second chip tray image and the first defect detection result corresponding to the second chip tray image.

[0012] As an improvement of the embodiment of the present invention, the processing module is further used to: perform defect enhancement processing on each first chip tray image, and the defect enhancement processing at least includes: rotation, shearing, scaling, distortion, filtering transformation and contrast transformation.

[0013] As an improvement of the embodiment of the present invention, the processing module is further used to: perform defect enhancement processing on each first chip tray image based on the trained DCGAN neural network.

[0014] An embodiment of the present invention also provides a detection method for a chip tray, comprising the following steps: executing the above-mentioned generation method multiple times to obtain multiple VGG networks; receiving a picture to be detected of the chip tray to be detected, and inputting the picture to be detected into each VGG network, thereby obtaining multiple second defect detection results, the second defect detection results including: passed detection and failed detection; when the number of passed detections>the number of failed detections, the chip tray to be detected passes the detection, otherwise, the chip tray to be detected fails the detection.

[0015] An embodiment of the present invention also provides a detection device for a chip tray, comprising the following modules: a convolutional neural network generation module, used to execute the above-mentioned generation method multiple times to obtain multiple VGG networks; a detection module, used to receive a picture to be detected of the chip tray to be detected, and input the picture to be detected into each VGG network, thereby obtaining multiple second defect detection results, the second defect detection results including: passed detection and failed detection; when the number of passed detections>the number of failed detections, the chip tray to be detected passes the detection, otherwise, the chip tray to be detected fails the detection.

[0016] The generation, detection method and device of the VGG network for chip tray detection provided by the embodiment of the present invention have the following advantages: The embodiment of the present invention discloses a generation, detection method and device of a VGG network for chip tray detection, the generation method comprises the following steps: obtaining a plurality of first chip tray images; performing defect enhancement processing on each first chip tray image, thereby obtaining a defect-enhanced second chip tray image corresponding to each first chip tray image; marking the corresponding first defect detection result for each second chip tray image, the first defect detection result at least including: a plurality of defect locations, a defect type corresponding to each defect location, and a defect confidence corresponding to each defect location; creating a VGG network based on transfer learning, and training the VGG network based on each second chip tray image and the first defect detection result corresponding to the second chip tray image. The VGG network can detect defects of the chip tray. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a flow chart of a method for generating a VGG network provided in an embodiment of the present invention;

[0018] Figure 2 is a structural diagram of an industrial high-definition linear array camera in an embodiment of the present invention;

[0019] Figure 3 is a training flow chart of a DCGAN neural network in an embodiment of the present invention;

[0020] Figure 4 4 is a structural diagram of a generator in a DCGAN neural network in an embodiment of the present invention;

[0021] Figure 5 is a structural diagram of a discriminator in a DCGAN neural network in an embodiment of the present invention;

[0022] Figure 6 is a structural diagram of a VGG neural network in an embodiment of the present invention;

[0023] Figure 7 4 is a training flow chart of the VGG neural network in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be described in detail below in conjunction with the embodiments shown in the accompanying drawings. However, the embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on the embodiments are all within the protection scope of the present invention.

[0025] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.

[0026] The terms "lateral", "crosswise", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like used herein to indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, are only for the convenience of describing this article and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description herein, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, or it can be the internal connection of two elements, it can be a direct connection, or it can be an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0027] Embodiment 1 of the present invention provides a method for generating a VGG network for chip tray detection, such as Figure 1 As shown, the following steps are included:

[0028] Step 101: Acquire multiple first chip tray images;

[0029] like Figure 2As shown, the generation method in the embodiment of the present invention adopts an industrial high-definition linear array camera, which can perform high-precision imaging of the surface of the chip tray and generate a high-resolution image with a horizontal pixel accuracy of 4096 pixels. The processing steps are as follows: (1) An optical system is established for the imaging characteristics of the chip tray, a uniform blue surface light source is deployed at the bottom of the detection device as background light, and a blue arched light source is used at the top of the detection device to cover the imaging area of ​​the line scan camera; (2) The chip tray product on the carrier is controlled to move at a uniform speed through an automated device, and the industrial high-definition linear array camera is used to scan the surface of the chip tray until the high-definition image acquisition of the entire chip tray surface is completed.

[0030] Chip tray products have the typical characteristics of small samples due to mature technology, good process control, very high manufacturing yield, few defective products and uneven distribution of defect types. This solution mainly combines small sample data enhancement and small sample learning to achieve defect recognition of small samples of chip trays.

[0031] Here, a small sample data set of chip trays is collected. The data is mainly collected based on real defect images, and engineering methods are introduced to simulate real defects. The engineering method mainly simulates real defects on real chip tray products, introduces defects through artificial manufacturing methods, generates defective samples, and then collects data. The sample images are mainly scanned and imaged using a high-definition industrial line scan camera through the optical imaging solution in step one to obtain defective sample images of chip trays.

[0032] Step 102: Perform defect enhancement processing on each first chip tray image, so as to obtain a defect-enhanced second chip tray image corresponding to each first chip tray image; for each second chip tray image, mark the corresponding first defect detection result, the first defect detection result at least includes: a number of defect locations, a defect type corresponding to each defect location, and a defect confidence corresponding to each defect location; create a VGG network based on transfer learning, and train the VGG network based on transfer learning based on each second chip tray image and the first defect detection result corresponding to the second chip tray image. The specific structure of the VGG network is as follows Figure 6 As shown, it includes 13 convolutional layers and 5 pooling layers, which are mainly responsible for feature extraction, and the last 3 fully connected layers are mainly responsible for completing the classification task. Optionally, the VGG network is specifically a VGG16 convolutional neural network.

[0033] In the experiment, the inventor created the VGG network as follows:

[0034] Step 1, import necessary libraries (os, json, numpy, matplotlib.pyplot, etc.), set relevant configurations (warnings and fonts), and prepare for subsequent image processing and deep learning tasks.

[0035] Step 2: Define the base directory and get the current working directory, set the folder path for the training set and the validation set, and build a directory containing the JSON files of the training and validation image labels.

[0036] Step 3: Data preprocessing. First, a real-time data enhancement generator function is defined. This function dynamically enhances image data by randomly applying multiple transformations and provides corresponding label information. Finally, the label information of the image file is read from the specified dataset, and the image file name and corresponding label category of the specified label category are filtered and output, and part of the annotation information is displayed.

[0037] Step 4: Import the pre-trained VGG16 convolutional neural network model. Use the VGG16 model instance in Keras as the convolution base (conv_base) and use the pre-trained weights on ImageNet. By setting the convolution layer to non-trainable, you can build a custom fully connected network on this basis to adapt to specific image classification tasks.

[0038] Step 4: Build a Sequential Model, using the pre-trained VGG16 model as the convolutional basis and adding a fully connected layer to adapt to the specific image classification task.

[0039] Step 5: Model training. Set the batch size and image size of the data generator, set the number of training runs, and observe the training process and the accuracy and loss rate of the training and validation sets.

[0040] Step 6: Visualize the training process. After a preset number of rounds of training, based on the "loss / acc" visualization chart below, you can see the accuracy of the training set and the validation set, the loss rate of the training set, and the loss rate of the validation set, so as to determine the training effect of the model.

[0041] Step 7: Perform model prediction. Define the image prediction function, read the test set folder, and output the final prediction results in batches of 25 results. The results show the accurate prediction effect of the test set images.

[0042] Step 8: Through steps 2-7, different training data sets are used to obtain a set of deep learning model combinations. The specific training process is as follows: Figure 7 shown.

[0043] In this embodiment, the “performing defect enhancement processing on each first chip tray image” specifically includes:

[0044] Defect enhancement processing is performed on each first chip tray image, and the defect enhancement processing at least includes: rotation, shearing, scaling, distortion, filtering transformation and contrast transformation.

[0045] In this embodiment, the “performing defect enhancement processing on each first chip tray image” specifically includes: performing defect enhancement processing on each first chip tray image based on the trained DCGAN neural network. Figure 3 shows the training process of the VGG network.

[0046] In this embodiment, Figure 4 and Figure 5 As shown, the generator in the DCGAN neural network is used to: receive a linear vector, reconstruct a first feature map through a linear layer, input the first feature map into a basic block, obtain a second feature map output by the basic block, and perform the following operations twice on the second feature map: send it to a DeConv layer, a BN layer, and a ReLu activation function layer in sequence to obtain a third feature map, replace the second feature map with the third feature map, and end this operation; then, send the second feature map to a DeConv layer, a BN layer, and a tanh activation function layer in sequence, and the generator outputs the feature map output by the tanh activation function layer; optionally, the received advance vector is 100-dimensional.

[0047] The discriminator in the DCGAN neural network includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the activation functions of the first, second and third convolutional layers are all LeakyReLu, basic blocks and BN layers are added in front of the second and third convolutional layers, and Dropout layers are added after the first and third convolutional layers; the discriminator is used to: input the feature map output by the generator into the first convolutional layer, input the feature map output by the first convolutional layer into the second convolutional layer, input the feature map output by the second convolutional layer into the third convolutional layer, and process the feature map output by the third convolutional layer through the Sigmoid activation function to obtain the probability of the sample being true and the probability of being false, and then output the probability of the sample being true and the probability of being false;

[0048] The loss function of the generator in the DCGAN neural network is The loss function of the discriminator in the DCGAN neural network is Where n is the random difference between the true distribution and the generated distribution, P n is the difference between the true distribution and the generated distribution, λ is the regularization coefficient, is the gradient constraint; the objective function of the game between the generator and the discriminator in the DCGAN neural network is Among them, x is the real sample data, P r (x) is the probability distribution of x, E is the mathematical expectation, z is the random variable, P g (z) is the probability distribution of z, and V(D,G) is the value function of the discriminator and the generator.

[0049] Here, different from image data such as faces, the defect features in the chip tray image have the following characteristics: the morphological similarity is relatively large, but there are some differences in the distribution location, defect size, and shape. For example, multi-material defects are usually presented in the image as irregular granular particles attached to a normal chip IC tray. The DCGAN network structure can be used to generate simulated defect data.

[0050] The DCGAN model uses a fully convolutional network structure, which consists of a generator and a discriminator. The generator has a transposed convolution structure, and its purpose is to generate samples that are as close to the real ones as possible; the discriminator has a convolution structure, and its purpose is to distinguish between generated samples and real samples. The two optimize their respective performances through continuous iterative confrontation, and finally reach Nash equilibrium.

[0051] Optionally, the linear vector dimension is 100, the size of the first feature map is 256×8×8, and the addition of the basic block only improves the network feature extraction capability, and does not change the size and number of channels of the output first feature map; the basic block of the generator includes a transposed convolution layer. In the discriminator, the input 3×64×64 feature map is converted into a 256×8×8 feature map through the first, second and third convolutions.

[0052] Embodiment 2 of the present invention provides a device for generating a VGG network for chip tray detection, comprising the following modules: an image acquisition module, used to acquire multiple first chip tray images; a processing module, used to perform defect enhancement processing on each first chip tray image, so as to obtain a defect-enhanced second chip tray image corresponding to each first chip tray image; for each second chip tray image, a corresponding first defect detection result is marked, and the first defect detection result includes at least: a number of defect locations, a defect type corresponding to each defect location, and a defect confidence corresponding to each defect location; a VGG network based on transfer learning is created, and the VGG network is trained based on each second chip tray image and the first defect detection result corresponding to the second chip tray image.

[0053] In this embodiment, the processing module is further used to perform defect enhancement processing on each first chip tray image, and the defect enhancement processing at least includes: rotation, shearing, scaling, distortion, filtering transformation and contrast transformation.

[0054] In this embodiment, the processing module is further used to: perform defect enhancement processing on each first chip tray image based on the trained DCGAN neural network.

[0055] Embodiment 3 of the present invention provides a detection method for a chip tray, comprising the following steps: executing the generation method in embodiment 1 multiple times to obtain multiple VGG networks; receiving a picture to be detected of the chip tray to be detected, and inputting the picture to be detected into each VGG network, thereby obtaining multiple second defect detection results, the second defect detection results including: passed detection and failed detection; when the number of passed detections>the number of failed detections, the chip tray to be detected passes the detection, otherwise, the chip tray to be detected fails the detection.

[0056] Embodiment 4 of the present invention provides a detection device for a chip tray, comprising the following modules: a convolutional neural network generation module, used to execute the generation method in embodiment 1 multiple times to obtain multiple VGG networks; a detection module, used to receive a picture to be detected of the chip tray to be detected, and input the picture to be detected into each VGG network, so as to obtain multiple second defect detection results, the second defect detection results include: passed detection and failed detection; when the number of passed detections>the number of failed detections, the chip tray to be detected passes the detection, otherwise, the chip tray to be detected fails the detection.

[0057] The VGG network in the embodiment of the present invention has the following beneficial effects: through the integration of the automated optical imaging system and the artificial intelligence system, the system eliminates the process of manual inspection and defect classification of chip tray products, improves production efficiency and the accuracy of defect classification, and the generated image data can also provide guarantee for subsequent quality tracing.

[0058] Different from the traditional chip tray product surface visual imaging technology, the present invention first uses a linear array camera to improve the imaging stability while ensuring the imaging accuracy, and reduces the workload and eigenvalue loss caused by image stitching required by the area array camera method.

[0059] Furthermore, the present invention mainly adopts traditional digital image processing and deep convolutional generative adversarial network (DCGAN) methods for data enhancement through this scheme, and combines the method of transfer learning deep learning algorithm model and Volting model fusion to realize the establishment of chip tray defect algorithm model and defect detection, overcomes the problem of small sample size in chip tray defect modeling, and achieves good detection effect.

[0060] Furthermore, the present invention uses an artificial intelligence AI algorithm model based on real sample modeling of chip tray products to detect and classify product surface defects. It reduces the reliance on surface defect imaging, and as long as the corresponding defects can be photographed, stable detection can be achieved; it reduces the impact of imaging background, lighting stability, dust and impurities in the environment on detection stability, and effectively controls the over-inspection rate while ensuring the defect detection rate.

[0061] This method is low-cost and highly flexible and scalable, and the accuracy of the entire system can be continuously improved during operation. For companies related to shaft product processing, this method can provide them with a set of visual recognition and discrimination standards based on product surface features. Companies can achieve self-growth on this system according to their actual conditions, reducing labor costs while increasing the economic value of the production line.

[0062] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

[0063] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating a VGG network for chip tray detection, It is characterized in that The following steps are involved: Acquire multiple first chip tray images; Performing defect enhancement processing on each first chip tray image, thereby obtaining a defect-enhanced second chip tray image corresponding to each first chip tray image; For each second chip tray image, a corresponding first defect detection result is marked, where the first defect detection result at least includes: a number of defect locations, a defect type corresponding to each defect location, and a defect confidence level corresponding to each defect location; A VGG network based on transfer learning is created, and the VGG network is trained based on each second chip tray image and a first defect detection result corresponding to the second chip tray image.

2. The generation method according to claim 1, It is characterized in that The “performing defect enhancement processing on each first chip tray image” specifically includes: Defect enhancement processing is performed on each first chip tray image, and the defect enhancement processing at least includes: rotation, shearing, scaling, distortion, filtering transformation and contrast transformation.

3. The generation method according to claim 1, It is characterized in that The “performing defect enhancement processing on each first chip tray image” specifically includes: Based on the trained DCGAN neural network, defect enhancement processing is performed on each first chip tray image.

4. The generation method according to claim 3, It is characterized in that The generator in the DCGAN neural network is used to: receive a linear vector, reconstruct a first feature map through a linear layer, input the first feature map into a basic block, obtain a second feature map output by the basic block, and perform the following operations twice on the second feature map: send it to a DeConv layer, a BN layer, and a ReLu activation function layer in sequence to obtain a third feature map, replace the second feature map with the third feature map, and end this operation; then, send the second feature map to a DeConv layer, a BN layer, and a tanh activation function layer in sequence, and the generator outputs the feature map output by the tanh activation function layer; The discriminator in the DCGAN neural network includes a first convolutional layer, a second convolutional layer and a third convolutional layer, the activation functions of the first, second and third convolutional layers are all LeakyReLu, basic blocks and BN layers are added in front of the second and third convolutional layers, and Dropout layers are added after the first and third convolutional layers; the discriminator is used to: input the feature map output by the generator into the first convolutional layer, input the feature map output by the first convolutional layer into the second convolutional layer, input the feature map output by the second convolutional layer into the third convolutional layer, and process the feature map output by the third convolutional layer through the Sigmoid activation function to obtain the probability of the sample being true and the probability of being false, and then output the probability of the sample being true and the probability of being false; The loss function of the generator in the DCGAN neural network is The loss function of the discriminator in the DCGAN neural network is Where n is the random difference between the true distribution and the generated distribution, P n is the difference between the true distribution and the generated distribution, λ is the regularization coefficient, is the gradient constraint; the objective function of the game between the generator and the discriminator in the DCGAN neural network is Among them, x is the real sample data, P r (x) is the probability distribution of x, E is the mathematical expectation, z is the random variable, P g (z) is the probability distribution of z, and V(D,G) is the value function of the discriminator and the generator.

5. The generation method according to claim 4, It is characterized in that The “marking the corresponding first defect detection result for each second chip tray image” specifically includes: The data annotation tool Labelme is used to annotate each second chip tray image with the corresponding first defect detection result.

6. A device for generating a VGG network for chip tray detection, It is characterized in that Includes the following modules: A picture acquisition module, used to acquire a plurality of first chip tray pictures; A processing module, configured to perform defect enhancement processing on each first chip tray image, thereby obtaining a defect-enhanced second chip tray image corresponding to each first chip tray image; For each second chip tray image, a corresponding first defect detection result is marked, where the first defect detection result at least includes: a number of defect locations, a defect type corresponding to each defect location, and a defect confidence level corresponding to each defect location; A VGG network based on transfer learning is created, and the VGG network is trained based on each second chip tray image and a first defect detection result corresponding to the second chip tray image.

7. The generating device according to claim 6, It is characterized in that The processing module is also used for: Defect enhancement processing is performed on each first chip tray image, and the defect enhancement processing at least includes: rotation, shearing, scaling, distortion, filtering transformation and contrast transformation.

8. The generating device according to claim 6, It is characterized in that The processing module is also used for: Based on the trained DCGAN neural network, defect enhancement processing is performed on each first chip tray image.

9. A detection method for a chip tray, It is characterized in that The following steps are involved: Execute the generation method described in any one of claims 1 to 5 multiple times to obtain multiple VGG networks; Receive the image to be inspected of the chip tray to be inspected, and input the image to be inspected into each VGG network to obtain multiple second defect detection results, where the second defect detection results include: passed detection and failed detection; when the number of passed detections>the number of failed detections, the chip tray to be inspected passes the detection, otherwise, the chip tray to be inspected fails the detection.

10. A detection device for a chip tray, It is characterized in that Includes the following modules: A convolutional neural network generation module, used to execute the generation method described in any one of claims 1 to 5 multiple times to obtain multiple VGG networks; The detection module is used to receive the image to be detected of the chip tray to be detected, and input the image to be detected into each VGG network to obtain multiple second defect detection results, and the second defect detection results include: passed detection and failed detection; when the number of passed detections>the number of failed detections, the chip tray to be detected passes the detection, otherwise, the chip tray to be detected fails the detection.