Graphite sheet assembly appearance defect detection method based on deep learning

Through deep learning, combining high and low light source time-sharing strobe technology and 16K line scanning camera, the graphite sheet components are detected using FPN+ResNet34 and ResNet50 network models, solving the problems of low manual detection efficiency and unstable quality, and achieving rapid and Stable defect identification and screening significantly reduces the missed and past detection rates.

CN118967599APending Publication Date: 2024-11-15FLEXSINE IND TECH SUZHOU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410997637.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing graphite sheet defect detection mainly relies on manual labor, has low efficiency and has problems of over-detection and miss detection, resulting in unstable product inspection quality.

Method used

Deep learning-based detection method, combined with high and low light source time-sharing strobe technology and 16K line scanning camera, defect detection of graphite sheet components through primary and secondary learning networks, and defect identification and use FPN+ResNet34 and ResNet50 network models for defect identification and filter.

Benefits of technology

It realizes rapid and stable detection of graphite sheet components, reduces the missed detection rate and over-test rate, avoids the influence of subjective factors of manual inspection, and improves product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967599A_ABST
    Figure CN118967599A_ABST
Patent Text Reader

Abstract

The invention discloses a graphite flake assembly appearance defect detection method based on deep learning, and relates to the field of automatic detection, and the method comprises the following steps: S1, generating a to-be-detected image of a graphite flake assembly by adopting high and low light source time-sharing stroboflash; s2, establishing a workpiece coordinate system, respectively cutting the graphite sheet area and the nickel sheet area into a plurality of small images, and sending the small images to a deep learning network; s3, the deep learning network comprises a first-level learning network and a second-level learning network, and the first-level learning network judges that the deep learning network is NG and sends the deep learning network to the second-level learning network for reinspection; and S4, analyzing the NG image output by the secondary learning network, carrying out quality screening according to the defect position and number, and if the defect exceeds a preset condition, judging the corresponding graphite sheet assembly as a final NG product. Through the verification of batch production of a production line, the overall omission ratio of the equipment is reduced to 0.05%, the over-detection rate is reduced to 1%, and the product screening stability is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic detection, and in particular to a method for detecting appearance defects of graphite sheets based on deep learning. Background Art

[0002] With the rise of the semiconductor industry, graphite sheets are widely used as heat dissipation materials. However, defective graphite sheets will have adverse effects on packaged devices, so it is very important to detect defects in graphite sheets in advance. In graphite sheet defect detection, most manufacturers use manual detection methods. Due to the influence of human vision, emotions, fatigue and other factors, it is not only inefficient, but also has serious problems such as over-inspection and missed inspection, and the set network’s defect screening standards are inconsistent with the quality inspector’s screening standards, resulting in unstable product inspection quality. Therefore, it is urgent to propose an effective method that can quickly and stably detect the appearance defects of graphite sheets. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a method for detecting appearance defects of graphite sheets based on deep learning.

[0004] The technical solution of the present invention is: a method for detecting appearance defects of a graphite sheet assembly based on deep learning, wherein the graphite sheet assembly includes a graphite sheet area and a nickel sheet area, and the method includes the following steps:

[0005] S1, using high and low light sources to strobe in time-sharing mode to obtain a high-exposure image and a low-exposure image of the graphite sheet assembly, respectively, extracting the graphite sheet area in the high-exposure image and the nickel sheet area in the low-exposure image, merging the extracted graphite sheet area and nickel sheet area, and generating an image to be detected of the graphite sheet assembly;

[0006] S2, establishing a workpiece coordinate system, using image processing technology on the image to be detected to locate the graphite sheet area and the nickel sheet area to the workpiece coordinate system respectively, and cutting the graphite sheet area and the nickel sheet area into several small images respectively, and sending them to the deep learning network;

[0007] S3, the deep learning network includes a primary learning network and a secondary learning network. The primary learning network traverses all defects of several small images sent from the graphite sheet area and the nickel sheet area, and divides them into graphite sheet area defects and nickel sheet area defects according to different detection objects;

[0008] If the first-level learning network outputs OK, the corresponding graphite sheet component is considered a qualified product. If the first-level learning network outputs NG, a preliminary screening is performed based on the length, width, area and other parameters of the defects output by the first-level learning network. For defects that do not meet the conditions, the corresponding graphite sheet components are still considered qualified products.

[0009] For defective images that meet the conditions, they are sent to the secondary learning network for re-inspection. If the secondary learning network outputs OK, the corresponding graphite sheet assembly is considered a qualified product; if the secondary learning network outputs NG, it goes to step S4;

[0010] S4. Analyze the NG image output by the secondary learning network, and perform quality screening according to the defect location and number. If the defects exceed the pre-set conditions, the corresponding graphite sheet component is determined to be the final NG product.

[0011] Furthermore, in step S1, high and low light sources are used to strobe in time to obtain a high exposure image and a low exposure image of the graphite sheet assembly, respectively, including:

[0012] S11, using high and low light source time-sharing stroboscopic technology to scan the image, splitting and recombining the odd and even rows of the captured image into two images, and obtaining a high-exposure image and a low-exposure image corresponding to the same product.

[0013] Furthermore, in step S1, a 16K line scan camera is used in conjunction with high and low light sources to perform image scanning.

[0014] Furthermore, in step S1, generating an image to be detected of the graphite sheet assembly includes:

[0015] S12, using automatic threshold segmentation technology to extract dark areas on the high-exposure image to obtain the graphite sheet area; for bright areas such as bubbles and scratches in the graphite sheet area, connectivity analysis is performed with the dark areas in the graphite sheet area, and they are still divided into the graphite sheet area; for dark areas such as dirt and indentations in the nickel sheet area, feature screening is performed and they are not divided into the graphite sheet area;

[0016] S13. On the low-exposure image, read the nickel sheet outer edge dxf file of the specific graphite sheet assembly model, use the fixed threshold segmentation to extract the graphite sheet area, and calculate the characteristic parameters of the circumscribed rectangle of the graphite sheet area, and use the circumscribed rectangle of the graphite sheet area as the standard, increase the offset in the width and height directions, as the nickel sheet RO I area after the range is reduced; apply the contour matching algorithm to the nickel sheet RO I area, align the nickel sheet outer edge dxf file to the current nickel sheet RO I area image, and the area surrounded by the nickel sheet outer edge dxf file minus the graphite sheet area is the corresponding nickel sheet area;

[0017] S14, respectively calculating the row and column coordinate values ​​and corresponding grayscale values ​​of the graphite sheet area and the nickel sheet area, storing the row and column coordinate values ​​and corresponding grayscale values ​​in a storage medium, and the position where the grayscale value is not saved is defaulted to 255, that is, obtaining the image to be detected of the graphite sheet assembly.

[0018] Furthermore, the process of establishing the dxf file of the outer edge of the nickel sheet in step S13 is as follows:

[0019] Retrieve the graphite sheet component model from the preset template image, use CAD software to extract the edge of the nickel sheet as the outer contour, and save it as a dxf file of the nickel sheet outer edge.

[0020] Furthermore, in step S2, the first-level learning network adopts the FPN+ResNet34 network model, and the second-level learning network adopts the ResNet50 network model.

[0021] Further, in step S2, a workpiece coordinate system is established, and the graphite sheet area and the nickel sheet area are respectively located in the workpiece coordinate system using image processing technology on the image to be detected, and the graphite sheet area and the nickel sheet area are respectively cropped into several small images, which are sent to the deep learning network, including:

[0022] S21, using the Canny algorithm to detect the left and upper edge lines of the nickel sheet, after straight line fitting, using the line intersection as the origin o' of the workpiece coordinate system of the graphite sheet assembly, using the angle between the fitting line of the upper edge line of the nickel sheet and the X-axis in the image coordinate system XY as the angle of the tool coordinate system, and establishing the workpiece coordinate system X'Y';

[0023] S22. In the workpiece coordinate system X'Y', set the detection ROI area, split the nickel sheet area and the graphite sheet area, and the special detection ROI area at the junction of the nickel sheet area and the graphite sheet area, and crop the set ROI area into small images and send them to the deep learning network for subsequent defect detection;

[0024] Furthermore, in step S3, defect images that meet the conditions are sent to the secondary learning network for re-inspection, including:

[0025] S31. For the NG images output by the first-level learning network, according to the segmented defect category and location information, take the center of each defect as the ROI center, take the minimum circumscribed rectangle feature of the defect as a reference, set the ROI width and height, crop the small defect images, create folders according to the defect category, put the small images containing the corresponding defects into the folders, import all the folders into the second-level learning network, and complete the re-inspection.

[0026] Furthermore, step S3 also includes model training, including:

[0027] S32, marking the graphite sheet component image: collect OK and NG products of the graphite sheet component, mark the NG products according to the defect category, and manually mark the exact shape of the defect and the category name; mark the OK products as qualified; flip and rotate all the marked OK and NG products, and identify the images from different angles;

[0028] S33. Train the detection model: set the Patch size to 256 pixels, crop the input image into a small area of ​​256*256 pixels for training and detection, and the number of iterations is between 35,000 and 40,000. After iterative training of the FPN+ResNet34 network, generate a deep learning model file, and load the deep learning model file at runtime.

[0029] The beneficial technical effects of the present invention are:

[0030] The optical scheme of the present invention adopts a 16K line scan camera with high and low light sources, and uses time-sharing stroboscopic technology to obtain two images of the same position of the product under high exposure and low exposure, and uses image processing technology to generate a new image from the two images. The graphite area and the nickel sheet area of ​​the new image both show relatively good imaging effects. The detection scheme based on deep learning uses a detection system of pre-processing algorithm (positioning, fusion, filtering, etc.) + deep learning network (FPN_ResNet34 segmentation network + ResNet50 classification network) + post-processing algorithm (defect data analysis) to perform defect detection on graphite sheet components, which can meet the needs of comprehensive and stable detection of graphite sheet components.

[0031] After verification by mass production on the production line, the technical solution of the present invention has the following advantages:

[0032] 1. Machines replace manual labor, saving labor costs of 10 people per shift;

[0033] 2. The automatic detection efficiency of the equipment is 8s / piece, while it usually takes 1 to 2 minutes to manually detect a product, which greatly alleviates the pressure on production capacity;

[0034] 3. The overall missed detection rate of the equipment is reduced to 0.05%, and the pass rate is reduced to 1%, meeting customer requirements and effectively avoiding product quality problems caused by subjective factors brought about by manual inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a high-exposure image of the graphite sheet assembly flashed in time;

[0036] Figure 2 It is a low-exposure image of the time-sharing strobing of the graphite sheet assembly;

[0037] Figure 3 is the image to be detected generated by the graphite sheet assembly;

[0038] Figure 4 A schematic diagram of a process of extracting a graphite sheet area and a nickel sheet area from a high-exposure image and a low-exposure image to generate an image to be detected;

[0039] Figure 5 It is a flowchart of the deep learning network solution. DETAILED DESCRIPTION

[0040] In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples. The following examples are used to illustrate the present invention but are not used to limit the scope of the present invention.

[0041] See also Figure 1-5 This specific embodiment discloses a method for detecting appearance defects of a graphite sheet assembly based on deep learning. The graphite sheet assembly includes a graphite sheet area and a nickel sheet area. The method includes the following steps:

[0042] S1. Use high and low light sources to strobe in time to obtain a high-exposure image and a low-exposure image of the graphite sheet assembly respectively, extract the graphite sheet area in the high-exposure image and the nickel sheet area in the low-exposure image, merge the extracted graphite sheet area and the nickel sheet area, and generate an image to be detected of the graphite sheet assembly; in this specific embodiment, the high-exposure image is selected to extract the graphite sheet area, and the low-exposure image is selected to extract the nickel sheet area, which is based on the low reflectivity of the graphite sheet area and the high reflectivity of the nickel sheet area.

[0043] S2, establishing a workpiece coordinate system, using image processing technology on the image to be detected to locate the graphite sheet area and the nickel sheet area to the workpiece coordinate system respectively, and cutting the graphite sheet area and the nickel sheet area into several small images respectively, and sending them to the deep learning network;

[0044] S3, the deep learning network includes a primary learning network and a secondary learning network. The primary learning network traverses all defects of several small images sent from the graphite sheet area and the nickel sheet area, and divides them into graphite sheet area defects and nickel sheet area defects according to different detection objects;

[0045] If the first-level learning network outputs OK, the corresponding graphite sheet component is considered a qualified product. If the first-level learning network outputs NG, a preliminary screening is performed based on the length, width, area and other parameters of the defects output by the first-level learning network. For defects that do not meet the conditions, the corresponding graphite sheet components are still considered qualified products.

[0046] For defective images that meet the conditions, they are sent to the secondary learning network for re-inspection. If the secondary learning network outputs OK, the corresponding graphite sheet component is considered a qualified product; if the secondary learning network outputs NG, it goes to S4;

[0047] S4. Analyze the NG image output by the secondary learning network, and perform quality screening according to the defect location and number. If the defects exceed the pre-set conditions, the corresponding graphite sheet component is determined to be the final NG product.

[0048] In this specific embodiment, in S1, high and low light sources are used to strobe in time to obtain high exposure images and low exposure images of the graphite sheet assembly, respectively, including:

[0049] S11, using high and low light source time-sharing stroboscopic technology (that is, two light sources strobe alternately to take pictures, the pictures are Figure 1 One row is black and the other is white, and then the odd and even rows are separated and reassembled into two images, and the two images correspond to the lighting of two light sources), and a high-exposure image and a low-exposure image corresponding to the same product are obtained, wherein the present invention adopts a 16K line scan camera with high and low light sources for image scanning.

[0050] The field of view of a 16K line scan camera is about 290*400mm, and the size of the graphite sheet assembly (i.e., the effective area) is about 200*270mm. The defects that need to be detected, such as deformation, scratches, indentations, wrinkles, pits, bumps, bubbles, dirt, etc., are calculated based on the short side of the minimum circumscribed rectangle of the above defects, and the minimum size of the defect is about 0.5mm. The deep learning detection strategy of the present invention is to detect all defects first, analyze the results of the first-level learning network while ensuring that no defects are missed, and enable the second-level learning network to re-judge whether there is an over-inspection. Therefore, the first-level learning network needs to select a semantic segmentation class (pixel-level classification) model that can reliably detect all defects with high accuracy requirements. In this specific implementation, the first-level learning network adopts the FPN+ResNet34 network model, and the second-level learning network adopts the ResNet50 network model.

[0051] Among the classic deep learning segmentation models, Faster R_CNN has the highest accuracy and SSD+MobileNet has the fastest speed, but the latter has a poor detection effect on small targets and is not suitable for the detection requirements of graphene components. Faster R_CNN uses the final convolutional features of VGG, which are 7*7*512 in size, but the features of Faster R_CNN after multiple convolutions usually have a large receptive field and are not suitable for detecting small objects. Compared with traditional CNN, ResNet (Deep Residual Network) solves the gradient vanishing and gradient exploding problems of CNN by adding residual blocks, so that deeper network structures can be trained and have better performance in detection tasks. FPN (Feature Pyramid Network) processes targets of different scales by constructing a multi-scale feature pyramid. It mainly includes two key steps: bottom-up feature extraction and top-down feature fusion. FPN does not change the original backbone network. It extracts the feature maps of each layer of the original backbone network, and then uses upsampling operations to interpolate the feature maps of higher levels to obtain feature maps that match the size of the corresponding low-level feature maps, and then fuses them by element-by-element addition. In this way, for small target objects, the detection accuracy will not be lost because it is based on the last layer of the predicted image (the features are more abstract and the receptive field is larger). Therefore, in this specific embodiment, the FPN+ResNet34 network model is used as the first-level network; the second-level network uses the ResNet50 network model.

[0052] More specifically, in S1, generating the image to be detected of the graphite sheet assembly includes the following specific steps:

[0053] S12, using automatic threshold segmentation technology to extract dark areas on the high-exposure image to obtain the graphite sheet area; for bright areas such as bubbles and scratches in the graphite sheet area, the connectivity between them and the dark areas in the graphite sheet area is analyzed, and they are still divided into the graphite sheet area; for dark areas such as dirt and indentations in the nickel sheet area, feature screening is performed and they are not divided into the graphite sheet area;

[0054] S13. On the low-exposure image, read the nickel sheet outer edge dxf file of the corresponding graphite sheet assembly model, use fixed threshold segmentation to extract the graphite sheet area (set to 50 pixels in the present invention), and calculate the characteristic parameters of the circumscribed rectangle of the graphite sheet area, and use the circumscribed rectangle of the graphite sheet area as the standard, increase the width and height offset (the width is 150 pixels and the height is 500 pixels in the present invention) as the nickel sheet ROI area after the range is reduced. Apply the contour matching algorithm to the nickel sheet ROI area, align the nickel sheet outer edge dxf file to the current nickel sheet ROI area image, and the area surrounded by the nickel sheet outer edge dxf file minus the graphite sheet area is the corresponding nickel sheet area.

[0055] S14, respectively calculating the row and column coordinate values ​​and the corresponding grayscale values ​​of the graphite sheet area and the nickel sheet area, and storing the above row and column coordinate values ​​and the corresponding grayscale values ​​in a storage medium. The position where the grayscale value is not saved is defaulted to 255, that is, the image to be detected of the graphite sheet assembly is obtained. The whole process is as shown in the attached figure. Figure 1-4 shown.

[0056] In this specific implementation, the process of creating the dxf file of the outer edge of the nickel sheet is as follows:

[0057] Retrieve the graphite sheet component model from the preset template, use CAD software to extract the edge of the nickel sheet as the outer contour, and save it as a nickel sheet outer edge dxf file (or provided by the customer).

[0058] More specifically, in S2, a workpiece coordinate system is established, and the graphite sheet area and the nickel sheet area are respectively located in the workpiece coordinate system using image processing technology on the image to be detected, and the graphite sheet area and the nickel sheet area are respectively cropped into several small images, which are sent to the deep learning network, including:

[0059] S21, using the Canny algorithm to detect the left and upper edge lines of the nickel sheet, after straight line fitting, using the line intersection as the origin o' of the workpiece coordinate system of the graphite sheet assembly, using the angle between the fitting line of the upper edge line of the nickel sheet and the X-axis in the image coordinate system XY as the angle of the tool coordinate system, and establishing the workpiece coordinate system X'Y';

[0060] S22. In the workpiece coordinate system X'Y', set the detection ROI area, split the nickel sheet area and the graphite sheet area, and the special detection ROI area at the junction of the nickel sheet area and the graphite sheet area, and crop the set detection ROI area into small images and send them to the deep learning network for subsequent defect detection.

[0061] More specifically, the deep learning in step 3 uses a two-level network structure, and the overall flow chart is shown in Figure 3. The first level uses a segmentation network (FPN_ResNet34) to detect defects such as deformation, scratches, indentations, wrinkles, concave points, convex points, bubbles, and dirt on the nickel surface and graphite surface. For NG defects output by the segmentation network, preliminary filtering is performed based on the size parameters of the defects, such as length, width, and area, to exclude small defects that do not meet the conditions.

[0062] The second level uses a classification network (ResNet50). According to the NG defect type of the previous level network, a defect folder with a corresponding name is set according to the defect category, and the defect folder is sent to the classification network for detection. The NG defect type output by the second level network is further judged by the different detection standards of different defects at different locations. Only defects that exceed the set standards will be judged as the final NG product. The specific steps include the following:

[0063] A first-level segmentation network model is used. For NG images output by the first-level network, a rough analysis is performed to determine whether they are truly NG based on the minimum bounding rectangle features and area values ​​of the defects output by the network. If the shape features of the defects are smaller than the preset judgment criteria, they are classified as OK, and the NG images are sent to the second-level multi-classification network for re-judgment.

[0064] Use a two-level multi-classification network model. For the NG images of the first-level network, according to the segmented defect category and location information, take the center of each defect as the ROI center, take the defect circumscribed rectangle feature as a reference, set the ROI width and height, crop the defect small block image, use the defect category as the folder name, and put the small image containing the corresponding defect into the folder. Import all folders into the second-level classification network to complete the re-inspection.

[0065] In this specific embodiment, S3 also includes model training, and the model training also includes the following steps:

[0066] S32. Label the images of graphite sheet assemblies: First, collect OK and NG products of graphite sheet assemblies, label the NG products according to the defect category, and manually mark the exact shape of the defect and the category name; second, add the OK products of graphite sheet assemblies to the model training and label them as qualified products, which helps to reduce the phenomenon of over-inspection; third, flip and rotate the marked images, and identify the images from different angles, which helps to improve learning performance.

[0067] S33, training the detection model: set the patch size to 256 pixels, crop the input image into a small area of ​​256*256 pixels for training and detection, and the number of iterations is generally selected between 35,000 and 40,000. After iterative training of the FPN+ResNet34 network, a deep learning model file is generated, which is loaded for detection during actual operation.

[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for detecting appearance defects of a graphite sheet assembly based on deep learning, wherein the graphite sheet assembly includes a graphite sheet area and a nickel sheet area, characterized in that: The method comprises the following steps: S1, using high and low light sources to strobe in time-sharing mode to obtain a high-exposure image and a low-exposure image of the graphite sheet assembly, respectively, extracting the graphite sheet area in the high-exposure image and the nickel sheet area in the low-exposure image, merging the extracted graphite sheet area and nickel sheet area, and generating an image to be detected of the graphite sheet assembly; S2, establishing a workpiece coordinate system, using image processing technology on the image to be detected to locate the graphite sheet area and the nickel sheet area to the workpiece coordinate system respectively, and cutting the graphite sheet area and the nickel sheet area into several small images respectively, and sending them to the deep learning network; S3, the deep learning network includes a primary learning network and a secondary learning network. The primary learning network traverses all defects of several small images sent from the graphite sheet area and the nickel sheet area, and divides them into graphite sheet area defects and nickel sheet area defects according to different detection objects; If the first-level learning network outputs OK, the corresponding graphite sheet component is considered a qualified product. If the first-level learning network outputs NG, a preliminary screening is performed based on the length, width, area and other parameters of the defects output by the first-level learning network. For defects that do not meet the conditions, the corresponding graphite sheet components are still considered qualified products. For defective images that meet the conditions, they are sent to the secondary learning network for re-inspection. If the secondary learning network outputs OK, the corresponding graphite sheet assembly is considered a qualified product; if the secondary learning network outputs NG, it goes to step S4; S4. Analyze the NG image output by the secondary learning network, and perform quality screening according to the defect location and number. If the defects exceed the pre-set conditions, the corresponding graphite sheet component is determined to be the final NG product.

2. According to the method for detecting appearance defects of graphite sheet components based on deep learning in claim 1, it is characterized in that: In step S1, high and low light sources are used to strobe in time division to obtain a high exposure image and a low exposure image of the graphite sheet assembly, respectively, including: S11, using high and low light source time-sharing stroboscopic technology to scan the image, splitting and recombining the odd and even rows of the captured image into two images, and obtaining a high-exposure image and a low-exposure image corresponding to the same product.

3. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 2, characterized in that: In step S1, a 16K line scan camera is used in conjunction with high and low light sources to perform image scanning.

4. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 2, characterized in that: In step S1, the image to be detected of the graphite sheet assembly is generated, and the method further includes: S12, using automatic threshold segmentation technology to extract dark areas on the high-exposure image to obtain the graphite sheet area; for bright areas such as bubbles and scratches in the graphite sheet area, connectivity analysis is performed with the dark areas in the graphite sheet area, and they are still divided into the graphite sheet area; for dark areas such as dirt and indentations in the nickel sheet area, feature screening is performed and they are not divided into the graphite sheet area; S13. On the low-exposure image, read the nickel sheet outer edge dxf file of the specific graphite sheet assembly model, use fixed threshold segmentation to extract the graphite sheet area, and calculate the characteristic parameters of the circumscribed rectangle of the graphite sheet area, and use the circumscribed rectangle of the graphite sheet area as the standard to increase the offset in the width and height directions as the nickel sheet ROI area after the range is reduced; apply the contour matching algorithm to the nickel sheet ROI area, align the nickel sheet outer edge dxf file to the current nickel sheet ROI area image, and the area enclosed by the nickel sheet outer edge dxf file minus the graphite sheet area is the corresponding nickel sheet area; S14, respectively calculating the row and column coordinate values ​​and corresponding grayscale values ​​of the graphite sheet area and the nickel sheet area, storing the row and column coordinate values ​​and corresponding grayscale values ​​in a storage medium, and the position where the grayscale value is not saved is defaulted to 255, that is, obtaining the image to be detected of the graphite sheet assembly.

5. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 4, characterized in that: The process of establishing the dxf file of the outer edge of the nickel sheet in step S13 is as follows: Retrieve the graphite sheet component model from the preset template image, use CAD software to extract the edge of the nickel sheet as the outer contour, and save it as a dxf file of the nickel sheet outer edge.

6. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 1, characterized in that: In step S2, the first-level learning network adopts the FPN+ResNet34 network model, and the second-level learning network adopts the ResNet50 network model.

7. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 6, characterized in that: In step S2, a workpiece coordinate system is established, and the graphite sheet area and the nickel sheet area are respectively located in the workpiece coordinate system using image processing technology on the image to be detected, and the graphite sheet area and the nickel sheet area are respectively cut into several small images and sent to the deep learning network, including: S21, using the Canny algorithm to detect the left and upper edge lines of the nickel sheet, after straight line fitting, using the line intersection as the origin o' of the workpiece coordinate system of the graphite sheet assembly, using the angle between the fitting line of the upper edge line of the nickel sheet and the X-axis in the image coordinate system XY as the angle of the tool coordinate system, and establishing the workpiece coordinate system X'Y'; S22. In the workpiece coordinate system X'Y', set the detection ROI area, split the nickel sheet area and the graphite sheet area, and the special detection ROI area at the junction of the nickel sheet area and the graphite sheet area, and crop the set ROI area into small images and send them to the deep learning network for subsequent defect detection.

8. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 7, characterized in that: In step S3, defect images that meet the conditions are sent to the secondary learning network for re-inspection, including: S31. For the NG images output by the first-level learning network, according to the segmented defect category and location information, take the center of each defect as the ROI center, take the minimum circumscribed rectangle feature of the defect as a reference, set the ROI width and height, crop out the small defect images, create folders according to the defect category, put the small images containing the corresponding defects into the folders, import all the folders into the second-level learning network, and complete the re-inspection.

9. The method for detecting appearance defects of graphite sheet components based on deep learning according to claim 8, characterized in that: Step S3 also includes model training, which specifically includes: S32, marking the graphite sheet component image: collect OK and NG products of the graphite sheet component, mark the NG products according to the defect category, and manually mark the exact shape of the defect and the category name; mark the OK products as qualified; flip and rotate all the marked OK and NG products, and identify the images from different angles; S33. Train the detection model: set the Patch size to 256 pixels, crop the input image into a small area of ​​256*256 pixels for training and detection, and the number of iterations is between 35,000 and 40,000. After iterative training of the FPN+ResNet34 network, generate a deep learning model file, and load the deep learning model file at runtime.