A universal model building and detection method for panel production line defect detection

Through deep learning and target detection algorithms, combined with computer vision post-processing, a general model for panel production line defect detection is constructed, which solves the problems of low efficiency and low accuracy in the existing technology, achieves efficient and accurate defect detection, and adapts to Complex production environment, reducing costs and error rates.

CN118505704BActive Publication Date: 2024-10-22CHENGDU UNION BIG DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410964461.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-22
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

The existing panel defect detection system has low efficiency and high cost, and is difficult to adapt to complex defect types and diverse production environments, resulting in long project delivery times and low model accuracy.

Method used

Deep learning technology is used to collect diversified panel production line sample data for defect annotation and model training. Target detection algorithms such as YOLO, SSD or Faster R-CNN are used, combined with computer vision post-processing, to build a universal model to achieve efficient defect detection. Positioning and classification to adapt to different production environments and defect types.

Benefits of technology

It improves the accuracy and efficiency of panel defect detection, reduces communication and verification time, enhances the applicability and accuracy of detection results, reduces manual detection costs and error rates, and achieves rapid delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118505704B_ABST
    Figure CN118505704B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of intelligent manufacturing technology, and discloses a general model modeling detection method, system, equipment and storage medium for panel production line defect detection, which includes the following steps: step 1, collecting panel production line sample data and performing defect annotation to obtain a sample data set; step 2, modeling and training the data set to obtain a positioning model; step 3, cutting out images containing defects based on the data set and classifying them to form a defect map data set; step 4, modeling and training the defect map data set to obtain an image classifier, and connecting it in series with the positioning model; step 5, mapping the defects to specific defect names through the image classifier and the positioning model according to factory attributes and process attributes; the method can perform accurate defect name mapping according to specific production environment and needs, and the overall solution reduces communication and verification time, increases sales, and also improves the applicability and accuracy of detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to a method, system, device and storage medium for building a universal model for defect detection in a panel production line. Background Art

[0002] In modern industrial production, panels (such as LCD screens, OLED screens, etc.) are crucial components in electronic products. With the development of technology and the increase in market demand, the production volume and types of panels are increasing. However, in the production process of panels, various defects are inevitable, such as foreign matter, residue, scratches, dirt, film breakage, missing, etc. Panel defects will not only reduce product quality, but also increase production costs and even affect the stability of the entire supply chain. Therefore, the detection of panel defects has become a key link in the production process.

[0003] At present, panel defect detection mainly relies on manual inspection and traditional inspection equipment. Although manual inspection is flexible, it is inefficient, costly, and easily affected by human factors. With the increase in production speed and product complexity, the limitations of manual inspection are becoming more and more obvious. Traditional inspection equipment usually performs inspections based on fixed rules and features. Although it can provide certain inspection effects in specific scenarios, it is difficult to cope with complex and changeable defect types and changes in the actual production environment.

[0004] Most existing automated inspection systems use preset rules and features for inspection. This method is prone to missed detection and false detection when faced with complex defect types. In addition, the process and product types of different factories and production lines are different, and traditional inspection systems are difficult to adapt to such diverse needs. For example, when engineers check the rules with customers, the rules are often not unified, resulting in low model accuracy and repeated iterations. This situation will cause the project delivery time to be long and it is difficult to achieve the goal of rapid delivery in the short term. Therefore, it is particularly important to develop a defect detection system that can quickly adapt to different defect types and different production environments and has high precision and high efficiency.

[0005] In recent years, with the development of deep learning technology, image recognition and classification technology based on deep learning has been widely used in various fields. Deep learning has powerful feature extraction capabilities and adaptability, can process complex image data, and recognize fine image features. It has achieved remarkable results in medical image analysis, autonomous driving, intelligent security and other fields.

[0006] In the field of panel defect detection, deep learning also shows great potential. Through large-scale data training, deep learning models can automatically learn and extract defect features, thereby achieving high-precision defect detection. However, existing deep learning applications in panel defect detection still face some challenges, such as insufficient training data, weak model generalization ability, and the balance between detection speed and accuracy. Therefore, how to build an efficient and universal defect detection model has become a hot topic and difficulty in research. Summary of the invention

[0007] In order to solve the problem mentioned in the above background technology center that ultimately leads to the length of project delivery time, the present invention provides a general model modeling and detection method, system, device and storage medium for panel production line defect detection. Specifically, it includes a general model modeling and detection method for panel production line defect detection, including the following steps: Step 1, collect panel production line sample data and perform defect annotation to obtain a sample data set; Beneficial effect: ensure the diversity and coverage of data, and improve the generalization ability and detection accuracy of the model. Step 2, model and train the positioning model based on the data set; Beneficial effect: obtain efficient defect positioning ability through deep learning training, and improve the accuracy and efficiency of defect detection. Step 3, based on the data set, cut out images containing defects and classify them to form a defect map data set; Beneficial effect: extract and classify defect images, refine defect features, and provide an accurate data basis for the training of subsequent classifiers. Step 4, model and train the defect map data set to obtain an image classifier, and connect it in series with the positioning model; Beneficial effect: combine positioning and classification capabilities to form a complete detection model, which can simultaneously realize defect positioning and classification, and improve detection efficiency. Step 5: Map the defects to specific defect names through the image classifier and positioning model according to the factory attributes and process attributes. Beneficial effects: Accurate defect name mapping is performed according to the specific production environment and needs. The overall solution reduces communication and verification time, increases sales, and also improves the applicability and accuracy of the test results.

[0008] The invention also discloses a feature that the panel production line sample data includes panel defect images of various processes and production lines. Beneficial effect: Through diversified data sources, the adaptability and robustness of the model to different production environments and defect types are enhanced.

[0009] Features are also disclosed, and the data set is modeled using a target detection algorithm. Beneficial effects: The target detection algorithm is used to improve the accuracy and detection speed of defect positioning and adapt to complex production environments.

[0010] The feature is also disclosed, and the target detection algorithm is a YOLO, SSD or Faster R-CNN model. The advanced target detection algorithm is used to ensure the excellent performance of the positioning model in terms of speed and accuracy.

[0011] A feature is also disclosed, in step 5, the factory attributes and process attributes include but are not limited to process parameters, machine numbers, and product models. By introducing multiple attributes, the accuracy and adaptability of defect name mapping are enhanced to adapt to different production conditions and requirements.

[0012] The invention also discloses a feature that in step 5, computer vision post-processing is required before mapping. Beneficial effect: through computer vision post-processing, the accuracy and robustness of defect mapping are improved, and the reliability of detection results is ensured.

[0013] Features are also disclosed, and the computer vision post-processing includes image enhancement, feature extraction and rule-based classification algorithm. Beneficial effect: Through image enhancement and feature extraction and other processing, the image quality and feature expression ability are improved, and the detection and mapping effects are further improved.

[0014] And the corresponding panel production line defect detection general model building and detection system, which includes:

[0015] The data collection and annotation module is used to collect sample data from the panel production line and annotate defects to obtain a sample data set, ensuring data diversity and annotation accuracy, and providing a high-quality data foundation for subsequent modeling and training;

[0016] The positioning model training module is used to train the positioning model. Through training, an efficient positioning model is obtained to achieve accurate positioning of defects and improve detection efficiency.

[0017] A defect classification module is used to crop and classify images containing defects to form a defect image dataset, and to model and train an image classifier based on the defect image dataset. The defect images are extracted and classified by the classification module to improve the training effect and classification accuracy of the classifier.

[0018] The defect detection module is used to connect the positioning model and the image classifier in series, map the defects to specific defect names, and realize the positioning and classification of defects by connecting the positioning model and the classifier in series, and perform accurate mapping to improve the overall performance of the detection system.

[0019] And a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: when the processor executes the computer program, the general model building and detection method for panel production line defect detection is implemented, and the above-mentioned detection method is implemented by the computer device to ensure efficient execution and stable operation of the method.

[0020] And a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the general model building detection method for panel production line defect detection is implemented. The detection method is stored and executed by the computer-readable storage medium, thereby ensuring convenient deployment and wide application of the method. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 This is a flow chart of Example 1 of the present invention. DETAILED DESCRIPTION

[0023] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0024] In order to solve the defects of the prior art mentioned in the background technology center, this embodiment provides a general model building detection method for panel production line defect detection, such as Figure 1 , which comprises the steps of:

[0025] Step 1, collecting panel production line sample data and annotating defects to obtain a sample data set, wherein the panel production line sample data includes panel defect images of various processes and production lines;

[0026] These images can be captured in real time by high-resolution cameras installed on the production line, or they can be extracted from historical data. In order to improve the diversity of image acquisition, multi-angle and multi-spectral imaging technology can be used to increase image acquisition in different spectral ranges such as infrared and ultraviolet to capture more defect features.

[0027] Each process may include different process stages, such as coating, exposure, etching, and development, and each stage may produce different types of defects. By analyzing the defect distribution of each process stage, a targeted defect collection plan is formulated to ensure that the defect data of each process stage is balanced.

[0028] The collected images are classified and sorted according to attributes such as process, production line, and time sequence to ensure the orderliness and traceability of the data. The data is managed using a database management system (such as MySQL, MongoDB, etc.) and indexes are established to improve data retrieval efficiency.

[0029] For each image, record relevant metadata, including acquisition time, device number, product model, etc. When recording metadata, a unique identifier (UUID) can be used to assign a unique ID to each image for subsequent tracking and management.

[0030] Use image annotation tools (such as LabelImg, VGG Image Annotator, etc.) to annotate defects in the image. The annotation content includes information such as the location, shape, and type of the defect to ensure the accuracy and consistency of the annotation. The annotation data is stored in XML or JSON format for subsequent processing. In this embodiment, a double annotation mechanism is adopted, that is, two people annotate the same image separately, and finally take the intersection or consistent part to ensure the quality of the annotation. In order to further improve the accuracy of the annotation, an automatic annotation suggestion system based on cluster analysis can be introduced, and the K-means or DBSCAN algorithm can be used to perform cluster analysis on the defect image to provide automatic annotation suggestions.

[0031] Aggregate the labeled image data to form a complete sample data set. The sample data set should contain multiple types of defects to ensure the generalization ability of the model. During the data set construction process, you can use the Generative Adversarial Network (GAN) to generate synthetic defect images, expand the diversity of the data set, and enhance the generalization ability of the model.

[0032] Step 2: Use the target detection algorithm to build and train the positioning model based on the dataset. Select a suitable target detection algorithm according to project requirements and computing resources, such as YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector) or Faster R-CNN (Region-based Convolutional Neural Networks). The characteristics of each algorithm are:

[0033] YOLO: Good real-time performance, suitable for real-time detection.

[0034] SSD: Balances detection speed and accuracy and is suitable for medium-scale detection tasks.

[0035] Faster R-CNN: It has high detection accuracy but large computational complexity and is suitable for scenarios with high precision requirements.

[0036] Different object detection models can be customized according to the needs of different factories and processes. In terms of model selection, transfer learning can be combined to fine-tune the models pre-trained on large general data sets (such as COCO, ImageNet) to adapt to specific defect detection tasks. In addition, multi-task learning models can be designed to perform defect detection and classification at the same time to improve the overall performance of the model.

[0037] According to different model characteristics, they can be used alone or in combination. A new hybrid network structure is created first. The hybrid model is trained in parallel on multiple GPUs. The loss function used will combine cross entropy loss and IoU loss to optimize the model's ability to locate defects. In the loss function, Focal Loss can be introduced to deal with the problem of sample category imbalance and improve the model's ability to detect defects in small sample categories.

[0038] During the training process, a dynamic learning rate adjustment strategy, such as cosine annealing scheduling, is used to improve the convergence speed and performance of the model. Specifically, the learning rate update formula is:

[0039]

[0040] in, is the current learning rate, and are the minimum and maximum learning rates, T cur is the current iteration number, T max is the maximum number of iterations.

[0041] Among them, the sample data set (the data set) needs to be preprocessed, including image normalization, scaling, data enhancement (such as rotation, flipping, noise addition, etc.) to increase data diversity. Then the selected target detection model (i.e., the positioning model after construction) is built and trained using the preprocessed sample data set.

[0042] During the training process, set appropriate hyperparameters, such as learning rate, batch size, number of iterations, etc. Use the validation set to monitor model performance and prevent overfitting. During the hyperparameter optimization process, you can use the Bayesian optimization algorithm to automatically search for the best hyperparameter combination to improve model performance.

[0043] After training is completed, the test set is used to evaluate the performance of the model and calculate indicators such as detection accuracy (Precision), recall (Recall), F1-score, etc. The model is optimized based on the evaluation results. The network structure can be adjusted, training data can be added, or hyperparameters can be tuned. The calculation formula for the evaluation indicators is as follows:

[0044] Accuracy:

[0045] Recall:

[0046]

[0047] F1-score:

[0048]

[0049] F1-score is an indicator used to measure the performance of classification models. It is the harmonic mean of precision and recall, combining the advantages and disadvantages of both. The value of F1-score is between 0 and 1. The closer the value is to 1, the better the performance of the model. It seeks a balance between precision and recall, and is particularly suitable for datasets with imbalanced classes.

[0050] Among them, TP, FP and FN represent true positive, false positive and false negative, respectively.

[0051] Step 3, based on the data set, images containing defects are cropped and classified to form a defect map data set; defect areas are located in the sample data set using the trained positioning model, and these areas are cropped to form new images. Each cropped image should contain only one defect as much as possible to improve the accuracy of subsequent classification. During the cropping process, the minimum enclosing rectangle method can be used to accurately crop the defect area to improve the quality of the cropped image. Specifically, the cv2.boundingRect function in OpenCV is used for cropping.

[0052] The cropped images are classified according to the different types of defects to form a multi-category defect image dataset. This classification can be performed manually or semi-automatically based on the shape, size, color and other features of the defects. Feature engineering-based methods can be introduced to extract texture features (such as LBP, GLCM, etc.) and shape features (such as Hu moment, Fourier descriptor, etc.) of defect images to improve the accuracy of classification.

[0053] The classified defect images are stored by category to form a defect image dataset with a clear structure and clear labels, ensuring that the sample size of each category is sufficient and as balanced as possible to facilitate the training of subsequent models. During the storage process, a distributed file system (such as Hadoop HDFS) is used to improve the reliability and scalability of the data.

[0054] Step 4, model and train the defect image dataset to obtain an image classifier, and connect it in series with the positioning model; select a suitable image classification algorithm, such as a convolutional neural network (CNN). Common network structures include VGG, ResNet, Inception, etc. The image classifier contains multiple convolutional layers, pooling layers, and fully connected layers, as well as Dropout layers to prevent overfitting, and a cross-validation method is used to optimize the network structure and parameters. Transfer learning can be performed based on the pre-trained model to improve training efficiency and model performance. When designing a classification network, an attention mechanism (such as SE-Block, CBAM, etc.) can be introduced to enhance the model's focus on key features and improve classification performance.

[0055] Before training, the defect image dataset must also be preprocessed, including image normalization, resizing, and data enhancement. Then, an image classifier is built and trained using the preprocessed defect image dataset. Appropriate hyperparameters are set, and the best model is selected through cross-validation. The specific method of cross-validation can be K-fold cross-validation, with a commonly used K value of 5 or 10. The stability of the model can be improved through multiple training and validation.

[0056] Use the validation set and test set to evaluate the performance of the image classifier and calculate indicators such as classification accuracy and confusion matrix. Optimize the model based on the evaluation results, adjust the network structure or perform hyperparameter tuning. During the evaluation process, the AUC-ROC curve can be used to evaluate the classification ability of the model. The higher the AUC value, the better the model performance.

[0057] Step 5, connect the trained positioning model and image classifier in series to form a complete defect detection and classification system. Input a picture and output the bbox of the defect and the name of the major category. According to the factory attributes and process attributes, further distinguish the major categories of defects. The defects are mapped by the image classifier and positioning model. Before mapping, computer vision post-processing is required to map them to specific defect names. The factory attributes and process attributes include but are not limited to process parameters, machine numbers, and product models. The computer vision post-processing includes image enhancement, feature extraction, and rule-based classification algorithms.

[0058] Specifically, in the computer vision post-processing part, the results of the image classifier output are post-processed, including image enhancement (such as contrast adjustment, edge enhancement, etc.) and feature extraction (such as edge detection, texture analysis, etc.). The extracted features are further classified using a rule-based classification algorithm to improve the accuracy of defect naming. According to factory attributes (such as process parameters, machine number, product model, etc.) and process attributes, the detected defects are mapped to specific defect names. A mapping rule base can be built or a database can be used to store and query relevant information. The positioning model and image classifier are integrated into the quality monitoring system of the production line to realize automated defect detection and classification. Ensure the real-time and stability of the system, and promptly detect and report defects that occur during the production process. Verify the system in an actual production environment to ensure its accuracy and reliability. Regularly maintain and upgrade the system, including retraining the model and updating the rule base, to adapt to changes in the production line and new defect types.

[0059] This embodiment also discloses a panel production line defect detection general model building detection system, which includes:

[0060] 1. Data collection and annotation module

[0061] Function: This module is responsible for real-time acquisition of high-resolution defect images from the production line and extracting images from the historical database. It is also responsible for detailed defect annotation of the images.

[0062] Workflow:

[0063] Images are captured in real time using high-resolution cameras using multispectral and HDR imaging techniques.

[0064] Classify defects generated at each process stage (coating, exposure, etching, development, etc.).

[0065] Metadata of the captured image (capture time, device number, product model, etc.).

[0066] Use image annotation tools to annotate the location, shape, and type of defects and store them in XML or JSON format.

[0067] A double annotation mechanism is implemented to ensure the annotation quality and form a complete sample dataset.

[0068] 2. Positioning model training module

[0069] Functionality: This module models and trains sample datasets using object detection algorithms to create a model that can accurately locate defects.

[0070] Workflow:

[0071] Choose a suitable target detection algorithm (YOLO, SSD, Faster R-CNN) or create a hybrid network structure.

[0072] Perform preprocessing (normalization, scaling, data augmentation) on the sample dataset.

[0073] The model is trained in parallel on multiple GPUs using cross entropy loss and IoU loss functions.

[0074] Apply a dynamic learning rate adjustment strategy (such as a cosine annealing schedule).

[0075] Use validation and test sets to evaluate model performance and perform optimization.

[0076] 3. Defect Classification Module

[0077] Function: This module is responsible for cropping image regions containing defects and classifying these regions to form a defect map dataset.

[0078] Workflow:

[0079] The defect area is located in the sample dataset using the localization model and cropped to form a new image.

[0080] The cropped images are classified based on the defects’ features like shape, size, color, etc.

[0081] Store the classified defect images to ensure that the sample size is sufficient and balanced.

[0082] 4. Defect detection module

[0083] Function: This module connects the positioning model and image classifier in series to form a complete defect detection and classification system.

[0084] Workflow:

[0085] Defects are mapped based on factory and process attributes using image classifiers and localization models.

[0086] Perform computer vision post-processing, including image enhancement and feature extraction.

[0087] Use rule-based classification algorithms to classify features and improve the accuracy of defect naming.

[0088] Build a mapping rule base or use a database to store and query related information.

[0089] Integrate into the quality monitoring system of the production line to realize automatic defect detection and classification.

[0090] Through the detailed description of the above modules, we can ensure the efficiency and adaptability of the panel production line defect detection general model modeling detection system, and at the same time, we can promptly discover and report defects in the production process to ensure product quality. Regular system maintenance and upgrades will further improve the accuracy and reliability of the system to adapt to changes in the production line and new defect types. Such a system design not only improves production efficiency, but also reduces the cost and error rate of manual inspection.

[0091] In addition, in one embodiment, the present application further provides a computer storage medium, on which a computer program is stored, and the computer program implements the method in the aforementioned embodiment when executed by a processor.

[0092] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.

[0093] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0094] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0095] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0096] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0097] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0099] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A general model building and detection method for panel production line defect detection, characterized in that: Includes steps: Step 1: Collect sample data of the panel production line and annotate defects to obtain a sample data set; Step 2, modeling and training the data set to obtain a positioning model; Step 3, based on the data set, cutting out images containing defects and classifying them to form a defect image data set; Step 4, modeling and training the defect image dataset to obtain an image classifier, and connecting it in series with the positioning model; Step 5: Map the defects to specific defect names through the image classifier and positioning model according to the factory attributes and process attributes: The trained positioning model and image classifier are connected in series to form a complete defect detection and classification system. The image is input, and the defect bbox and major category name are output. The major categories of defects are further specifically distinguished according to the factory attributes and process attributes. The defects are mapped through the image classifier and positioning model. Computer vision post-processing is required before mapping to specific defect names. The factory attributes and process attributes include process parameters, machine numbers, and product models. The computer vision post-processing includes image enhancement, feature extraction, and rule-based classification algorithms. The extracted features are further classified using rule-based classification algorithms.

2. The panel production line defect detection general model building detection method according to claim 1, characterized in that: The panel production line sample data includes panel defect images of various processes and production lines.

3. The panel production line defect detection universal model building detection method according to claim 1, characterized in that: In step 2, the data set is modeled using a target detection algorithm.

4. The panel production line defect detection universal model building detection method according to claim 3, characterized in that: The target detection algorithm is YOLO, SSD or Faster R-CNN model.

5. A universal model building and detection system for panel production line defect detection, characterized in that: include: The data collection and annotation module is used to collect sample data of the panel production line and annotate defects to obtain a sample data set; A positioning model training module, used for training the positioning model; A defect classification module is used to crop and classify images containing defects to form a defect image dataset, and to model and train an image classifier based on the defect image dataset; The defect detection module is used to connect the positioning model and the image classifier in series, map the defects to specific defect names, that is, connect the trained positioning model and the image classifier in series to form a complete defect detection and classification system, input the picture, output the bbox of the defect and the major category name, further distinguish the major categories of defects according to the factory attributes and process attributes, map the defects through the image classifier and the positioning model, and perform computer vision post-processing before mapping to specific defect names. The factory attributes and process attributes include process parameters, machine numbers, and product models. The computer vision post-processing includes image enhancement, feature extraction, and rule-based classification algorithms. The extracted features are further classified using rule-based classification algorithms.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the general model building and detection method for panel production line defect detection described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the general model building and detection method for panel production line defect detection described in any one of claims 1 to 4 is implemented.