A method and system for detecting defects in automotive interior and exterior plastic parts
Patent Information
- Application Number
- CN202610640474.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-11
- Publication Date
- 2026-09-15
Smart Images

Figure CN122760418A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a method and system for detecting defects in automotive interior and exterior plastic parts. Background Technology
[0002] For a long time, the detection of surface defects in plastic products has mainly relied on manual visual inspection and contact equipment. Although it has a certain degree of flexibility, it has obvious shortcomings in terms of detection accuracy and efficiency. In particular, for large-scale continuous plastic product manufacturing enterprises, the production speed of plastic products can reach hundreds or thousands of pieces per minute. Traditional detection methods can hardly meet the advanced industry's demand for low detection cost, high precision and high efficiency. Summary of the Invention
[0003] The purpose of this invention is to provide a method and system for detecting defects in automotive interior and exterior plastic parts, which solves the problems existing in the background art.
[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The present invention provides a method for detecting defects in automotive interior and exterior plastic parts, specifically including the following steps: S1. Collect multiple sets of image data of automotive interior and exterior plastic parts through image acquisition equipment, and process the collected image data through image processing to obtain processed image data; S2. Perform quantitative analysis on the processed image data using image analysis methods to obtain the quantitatively analyzed image data. S3. Construct a defect detection model based on the quantitatively analyzed and processed image data; S4. Real-time acquisition of image data of plastic parts inside and outside the car, and defect detection through the constructed defect detection model.
[0005] Preferably, the step of acquiring multiple sets of image data of automotive interior and exterior plastic parts through an image acquisition device, and processing the acquired image data to obtain processed image data includes the following steps: S11. Convert the collected image data of multiple sets of automotive interior and exterior plastic parts to grayscale to obtain grayscale images, and then use Gaussian filtering to reduce noise in the grayscale images to obtain noise-reduced images. S12. Enhance the denoised image using image enhancement methods to obtain the enhanced image; S13. Set the enhanced image to the processed image data.
[0006] Preferably, the step of enhancing the denoised image using image enhancement methods to obtain the enhanced image includes the following steps: Linear image enhancement is performed on the acquired denoised image based on the brightness data in the denoised image; ; in, Represents the coordinates in the denoised image. The corresponding pixel value before contrast enhancement. Represents the coordinates in the image after contrast enhancement and noise reduction. The corresponding pixel value, Q is the contrast gain parameter.
[0007] Preferably, the step of performing quantization analysis on the processed image data using image analysis methods to obtain the quantized image data includes the following steps: S21. The processed image data is detected by pixel detection method to obtain the detected image data; Set a detection window and quantize the pixels to be detected in the processed image data based on the detection window; Set a 3×3 detection window, merge the eight pixels in the neighborhood of the pixel to be detected in the current image in pairs to obtain four neighboring pixels, and calculate the gray value of each of the four neighboring pixels. Set the corresponding anomaly detection threshold, and determine the location of the anomaly based on the gray values of the four neighboring pixels; The grayscale values, pixel values, and location coordinates of all anomalies are summarized to obtain the detected image data. S22. Perform clustering and quantization processing on the detected image data to obtain the quantized image data.
[0008] Preferably, the step of performing clustering and quantization processing on the detected image data to obtain quantized image data includes the following steps: Based on the size of the detected image data, the detected image data is divided into K clusters, and a set of detected image data is randomly selected in each cluster as the data center; According to the distance formula, Calculate the image data Z after each group of detections. i Calculate the distance to K data centers and assign them to the category corresponding to the data center with the smallest distance. Add 1 data center for each calculation until the preliminary clustering of all detected image data is completed, and output the preliminary clustering results of all detected image data. in, x represents the image data after the i-th group of detections. i To data center a k The distance, a k Indicates the Kth data center; The data centers for each category are updated based on the initial clustering results of the samples, while the new data centers are compared with the old data centers. Set a distance threshold. If the distance between the new data center and the old data center is less than the set distance threshold, it means that the location of the updated data center has not changed much and the convergence is stable. It is considered that the clustering has achieved the expected result and the algorithm terminates. Otherwise, it iteratively calculates the distance from each group of detected image data to K data centers based on the updated data centers until the data centers converge and stabilize, and outputs the clustered image data. The clustered image data is set to be the image data after quantization analysis.
[0009] Preferably, the defect detection model constructed based on the quantized and processed image data includes the following steps: The defect types can be defined as: dimensional defects, color defects, and breakage defects; S31. Based on the image data after quantization analysis, a convolutional neural network is trained to construct a defect detection model for color defects and damage defects. S32. Based on the processed image data, size defect detection is performed on the processed image data by contour comparison. Set an image binarization threshold, and binarize the processed image data based on the set image binarization threshold to obtain binarized image data; Create a one-dimensional array to record the gray values of the eight neighborhoods surrounding each pixel in the binarized image data. If the gray values of the eight neighborhoods surrounding a pixel are the same as the gray value of the center point, then the pixel is set to be inside the contour and deleted. If the gray values of the eight neighboring areas of a pixel are different from the gray value of the center point, then the pixel is set to the edge of the outline and is preserved. Traverse and summarize each pixel in the binarized image data to obtain the outline of the processed image data; Collect standard contour data of automotive interior and exterior plastic parts, and compare the contour of the processed image data with the standard contour data of automotive interior and exterior plastic parts. At the same time, record the degree of contour overlap. When the two sets of contours overlap, it means that there is no dimensional defect detection in the processed image data; otherwise, there is dimensional defect detection. S33. Summarize the defect detection results of dimensional defects, color defects, and broken defects to obtain the defect detection model.
[0010] Preferably, the step of training a convolutional neural network based on the quantized image data to construct a defect detection model for color defects and breakage defects includes the following steps: Set a pixel contrast threshold, and based on the set pixel contrast threshold, divide the quantized image data into color defect image data and damage defect image data; Image data after quantization analysis with a pixel contrast threshold greater than or equal to the threshold is classified as damaged or defective image data, while image data after quantization analysis with a pixel contrast threshold less than the threshold is classified as color defective image data. The color defect image data and the damage defect image data are evenly divided to obtain the training set and the validation set; The color defect image data and damage defect image data in the training set and the validation set are divided into image data blocks of the same size, and the divided image data blocks are input into the convolutional neural network. The convolutional neural network includes: convolutional layers, pooling layers, and fully connected layers, wherein the convolutional layers and pooling layers are stacked on top of each other; Set the initial weights, stride, and kernel size in the convolutional neural network; After receiving the input image data block, the convolutional neural network performs convolution calculations on the input image data block based on the set initial weights, convolution stride and convolution kernel size, and extracts the features of the input image data block through the convolution calculation; The features of the obtained image data blocks are input into the pooling layer. The pooling layer pools the features of the obtained image data blocks by means calculation. After pooling, the pooled features are input into the fully connected layer. The fully connected layer combines the features to obtain feature arrays of color defect image data and damage defect image data, and saves them. Select color defect image data and damage defect image data of the same type in the training set and validation set, and conduct similar comparisons among similar image data, and judge the training results according to the similarity comparison method; A similarity threshold is set. When the similarity value between selected image data of the same type is greater than or equal to the set similarity threshold, it means that the training has passed. At this time, the convolutional neural network under the corresponding weight is a defect detection model for color defects and damage defects. Otherwise, it means that the training has failed. The weights of the convolutional neural network are adjusted and iterative training is performed until the training passes.
[0011] Preferably, the real-time acquisition of image data of automotive interior and exterior plastic parts, and the defect detection using the constructed defect detection model, includes the following steps: The image data of the automotive interior and exterior plastic parts, acquired in real time, will be input into the defect detection model. First, the contour comparison method is used to compare the real-time acquired image data of automotive interior and exterior plastic parts to determine whether there are dimensional defects. When there are no dimensional defects in the real-time image data of automotive interior and exterior plastic parts, the image data of the real-time acquired automotive interior and exterior plastic parts is detected by the defect detection model of color defects and breakage defects to determine whether there are color defects and breakage defects in the real-time acquired automotive interior and exterior plastic parts image data. If color defects and breakage defects pass the test, it means that there are no defects in the real-time image data of the automotive interior and exterior plastic parts; otherwise, color defects and breakage defects exist.
[0012] The present invention also provides a defect detection system for automotive interior and exterior plastic parts, which is used to implement a method for detecting defects in automotive interior and exterior plastic parts. The system includes: an image acquisition module, an image processing module, an image analysis module, and a defect detection module. The image acquisition module is used to acquire image data of automotive interior and exterior plastic parts in real time. The image processing module is used to process the image data of the real-time acquired automotive interior and exterior plastic parts to obtain the processed image data; The image analysis module is used to perform quantitative analysis on the processed image data to obtain the quantitatively analyzed image data. The defect detection module is used to construct a defect detection model based on the quantitatively analyzed image data and the processed image data, and to detect defects in the interior and exterior plastic parts of the car in real time based on the defect detection model.
[0013] The beneficial effects of this invention are as follows: (1) This invention acquires multiple sets of image data of automotive interior and exterior plastic parts through an image acquisition device, processes the acquired image data through image processing, performs quantitative analysis on the processed image data through image analysis, constructs a defect detection model based on the quantitatively analyzed image data and the processed image data after the quantitative analysis, and finally acquires image data of automotive interior and exterior plastic parts in real time and performs defect detection through the constructed defect detection model, thereby improving the accuracy of defect detection of automotive interior and exterior plastic parts. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram of the defect detection method for automotive interior and exterior plastic parts according to the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] In a specific embodiment of the present invention, Reference Figure 1 As shown, the present invention provides a method for detecting defects in automotive interior and exterior plastic parts, comprising the following steps: S1. Collect multiple sets of image data of automotive interior and exterior plastic parts through image acquisition equipment, and process the collected image data through image processing to obtain processed image data; S2. Perform quantitative analysis on the processed image data using image analysis methods to obtain the quantitatively analyzed image data. S3. Construct a defect detection model based on the quantitatively analyzed and processed image data; S4. Real-time acquisition of image data of plastic parts inside and outside the car, and defect detection through the constructed defect detection model; Furthermore, referring to Figure 1 As shown, multiple sets of image data of automotive interior and exterior plastic parts are acquired using an image acquisition device, and the acquired image data is processed using image processing methods to obtain the processed image data. The process includes the following steps: S11. Convert the collected image data of multiple sets of automotive interior and exterior plastic parts to grayscale to obtain grayscale images, and then use Gaussian filtering to reduce noise in the grayscale images to obtain noise-reduced images. The formula for the Gaussian function is shown below:
[0018] in, Represents variance. This represents the pixel value after grayscale conversion of the corresponding coordinates in the image, where x is the horizontal coordinate, y is the vertical coordinate, and e is the base of the natural number. S12. Enhance the denoised image using image enhancement methods to obtain the enhanced image; Linear image enhancement is performed on the acquired denoised image based on the brightness data in the denoised image; ; in, Represents the coordinates in the denoised image. The corresponding pixel value before contrast enhancement. Represents the coordinates in the image after contrast enhancement and noise reduction. The corresponding pixel value, Q is the contrast gain parameter; S13. Set the enhanced image to the processed image data; Furthermore, referring to Figure 1 As shown, the processed image data is quantized using image analysis methods to obtain the quantized image data, which includes the following steps: S21. The processed image data is detected by pixel detection method to obtain the detected image data; Set a detection window and quantize the pixels to be detected in the processed image data based on the detection window; Set a 3×3 detection window, merge the eight pixels in the neighborhood of the pixel to be detected in the current image in pairs to obtain four neighboring pixels, and calculate the gray value of each of the four neighboring pixels. Furthermore, an appropriate threshold for anomaly detection is set, and the location of the anomaly is determined based on the grayscale values of four neighboring pixels. The formula for determining the outlier threshold parameter is as follows: ; in, Y represents the grayscale values of four neighboring pixels; Y is the outlier threshold parameter, which is set when the average grayscale value of the four neighboring pixels is greater than the global average grayscale value T. g When the value is in the bright area, it indicates that the pixel to be detected is in the bright area, and the outlier threshold parameter is set to... Conversely, when the average gray value of four neighboring pixels is less than or equal to the global average gray value T... g When the value is in the dark, it indicates that the pixel to be detected is in a dark area, and the outlier threshold parameter is set to... , This represents the threshold determination function. Represents the mean function; Furthermore, based on the determined outlier threshold parameter Y, when the difference between the pixel to be detected and the outlier threshold parameter Y is greater than the maximum value among the gray values of the four neighboring pixels, it indicates that the current pixel to be detected is an outlier. Furthermore, the grayscale values, pixel values, and location coordinates corresponding to all the calculated anomalies are summarized to obtain the detected image data; S22. Perform clustering and quantization processing on the detected image data to obtain the quantized image data; Based on the size of the detected image data, the detected image data is divided into K clusters, and a set of detected image data is randomly selected in each cluster as the data center; Furthermore, according to the distance formula, Calculate the image data Z after each group of detections. i Calculate the distance to K data centers and assign them to the category corresponding to the data center with the smallest distance. Add 1 data center for each calculation until the preliminary clustering of all detected image data is completed, and output the preliminary clustering results of all detected image data. in, This represents the image data x after the i-th group of detection being transferred to the data center a. k The distance, a k Indicates the Kth data center; Furthermore, the data centers for each category are updated based on the preliminary clustering results of the samples, while the new data centers are compared with the old data centers; Furthermore, a distance threshold is set. If the distance between the new data center and the old data center is less than the set distance threshold, it means that the location of the updated data center has not changed much and the convergence is stable. It is considered that the clustering has achieved the expected result and the algorithm terminates. Otherwise, the distance from each group of detected image data to the K data centers is calculated iteratively based on the updated data centers until the data centers converge and stabilize, and the clustered image data is output. Furthermore, the clustered image data is defined as the image data after quantization analysis; Furthermore, referring to Figure 1 As shown, constructing a defect detection model based on the quantized and processed image data includes the following steps: The defect types can be defined as: dimensional defects, color defects, and breakage defects; S31. Based on the image data after quantization analysis, a convolutional neural network is trained to construct a defect detection model for color defects and damage defects. Set a pixel contrast threshold, and based on the set pixel contrast threshold, divide the quantized image data into color defect image data and damage defect image data; Image data after quantization analysis with a pixel contrast threshold greater than or equal to the threshold is classified as damaged or defective image data, while image data after quantization analysis with a pixel contrast threshold less than the threshold is classified as color defective image data. Furthermore, the color defect image data and the damage defect image data are evenly divided to obtain the training set and the validation set; Furthermore, the color defect image data and damage defect image data in the training set and validation set are divided into image data blocks of the same size, and the divided image data blocks are input into the convolutional neural network; The convolutional neural network includes: convolutional layers, pooling layers, and fully connected layers, wherein the convolutional layers and pooling layers are stacked on top of each other; Set the initial weights, stride, and kernel size in the convolutional neural network; Furthermore, after receiving the input image data block, the convolutional neural network performs convolution calculations on the input image data block based on the set initial weights, convolution stride, and convolution kernel size, and extracts the features of the input image data block through the convolution calculation; The formula for calculating convolution is as follows: ; Where I represents the input image data block, w represents the initial weights in the convolutional neural network, b represents the bias value, and F represents the features of the image data block; Furthermore, the features of the obtained image data blocks are input into the pooling layer. The pooling layer pools the features of the obtained image data blocks by means calculation. After pooling, the pooled features are input into the fully connected layer. The fully connected layer combines the features to obtain feature arrays of color defect image data and damage defect image data, and saves them. Furthermore, color defect image data and damage defect image data of the same type are selected in the training set and validation set, and similar comparisons are made among the image data of the same type. The training results are judged according to the similarity comparison method. The similarity calculation is as follows: ; Where E and G represent the color defect image data and damage defect image data selected from the training set and validation set, respectively. express Similarity values between two sets of color defect image data and damage defect image data; Set a similarity threshold. When the similarity value between selected image data of the same type is greater than or equal to the set similarity threshold, it means that the training is successful. At this time, the convolutional neural network under the corresponding weight is a defect detection model for color defects and damage defects. Otherwise, it means that the training is unsuccessful. Adjust the weight of the convolutional neural network and perform iterative training until the training is successful. S32. Based on the processed image data, size defect detection is performed on the processed image data by contour comparison. Set an image binarization threshold, and binarize the processed image data based on the set image binarization threshold to obtain binarized image data; Furthermore, a one-dimensional array is created to record the gray values of the eight neighborhoods surrounding each pixel in the binarized image data. When the gray values of the eight neighborhoods surrounding a pixel are the same as the gray value of the center point, the pixel is set to be inside the contour and the pixel is deleted. If the gray values of the eight neighboring areas of a pixel are different from the gray value of the center point, then the pixel is set to the edge of the outline and is preserved. Traverse and summarize each pixel in the binarized image data to obtain the outline of the processed image data; Furthermore, standard contour data of automotive interior and exterior plastic parts are collected, and the contour of the processed image data is compared with the standard contour data of automotive interior and exterior plastic parts. At the same time, the degree of contour overlap is recorded. When the two sets of contours overlap, it means that there is no dimensional defect detection in the processed image data; otherwise, there is dimensional defect detection. S33. Summarize the defect detection results of dimensional defects, color defects, and damage defects to obtain the defect detection model; Furthermore, referring to Figure 1 As shown, the real-time acquisition of image data of automotive interior and exterior plastic parts, and the defect detection using the constructed defect detection model, includes the following steps: The image data of the automotive interior and exterior plastic parts, acquired in real time, will be input into the defect detection model. First, the contour comparison method is used to compare the real-time acquired image data of automotive interior and exterior plastic parts to determine whether there are dimensional defects. When there are no dimensional defects in the real-time image data of automotive interior and exterior plastic parts, the image data of the real-time acquired automotive interior and exterior plastic parts is detected by the defect detection model of color defects and breakage defects to determine whether there are color defects and breakage defects in the real-time acquired automotive interior and exterior plastic parts image data. If the color defect and the damage defect pass the test, it means that there are no defects in the real-time image data of the plastic parts of the car's interior and exterior. Otherwise, there are color defects and damage defects. In one specific embodiment, the automotive interior and exterior plastic parts defect detection system is used to implement a method for detecting defects in automotive interior and exterior plastic parts. The system includes: an image acquisition module, an image processing module, an image analysis module, and a defect detection module. The image acquisition module is used to acquire image data of automotive interior and exterior plastic parts in real time. The image processing module is used to process the image data of the real-time acquired automotive interior and exterior plastic parts to obtain the processed image data; The image analysis module is used to perform quantitative analysis on the processed image data to obtain the quantitatively analyzed image data. The defect detection module is used to construct a defect detection model based on the quantitatively analyzed image data and the processed image data, and to detect defects in the interior and exterior plastic parts of the car in real time based on the defect detection model.
[0019] It should be noted that, The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, and all such modifications and additions should fall within the protection scope of the present invention.
Claims
1. A method and system for detecting defects in automotive interior and exterior plastic parts, characterized in that, Includes the following steps: S1. Collect multiple sets of image data of automotive interior and exterior plastic parts through image acquisition equipment, and process the collected image data through image processing to obtain processed image data; S2. Perform quantitative analysis on the processed image data using image analysis methods to obtain the quantitatively analyzed image data. S3. Construct a defect detection model based on the quantitatively analyzed and processed image data; S4. Real-time acquisition of image data of plastic parts inside and outside the car, and defect detection through the constructed defect detection model.
2. The method for detecting defects of an automotive interior and exterior plastic part according to claim 1, characterized in that, The process of acquiring multiple sets of image data of automotive interior and exterior plastic parts through an image acquisition device, and then processing the acquired image data to obtain processed image data includes the following steps: S11. Convert the collected image data of multiple sets of automotive interior and exterior plastic parts to grayscale to obtain grayscale images, and then use Gaussian filtering to reduce noise in the grayscale images to obtain noise-reduced images. S12. Enhance the denoised image using image enhancement methods to obtain the enhanced image; S13. Set the enhanced image to the processed image data.
3. The method for detecting defects of an automotive interior and exterior plastic part according to claim 2, characterized in that, The process of enhancing the denoised image using image enhancement methods to obtain the enhanced image includes the following steps: Linear image enhancement is performed on the acquired denoised image based on the brightness data in the denoised image; ; wherein, denotes the coordinates in the denoised image corresponding to the pixel point before contrast enhancement, denotes the coordinates in the denoised image after contrast enhancement corresponding to the pixel point, and Q is a contrast gain parameter.
4. The method for detecting defects of an automotive interior and exterior plastic part according to claim 1, characterized in that, The step of performing quantitative analysis on the processed image data using image analysis methods to obtain the quantitatively analyzed image data includes the following steps: S21. The processed image data is detected by pixel detection method to obtain the detected image data; Set a detection window and quantize the pixels to be detected in the processed image data based on the detection window; Set a 3×3 detection window, merge the eight pixels in the neighborhood of the pixel to be detected in the current image in pairs to obtain four neighboring pixels, and calculate the gray value of each of the four neighboring pixels. Set the corresponding anomaly detection threshold, and determine the location of the anomaly based on the gray values of the four neighboring pixels; The grayscale values, pixel values, and location coordinates of all anomalies are summarized to obtain the detected image data. S22. Perform clustering and quantization processing on the detected image data to obtain the quantized image data.
5. The method for detecting defects of an automotive interior and exterior plastic part according to claim 4, characterized in that, The process of clustering and quantizing the detected image data to obtain quantized image data includes the following steps: Based on the size of the detected image data, the detected image data is divided into K clusters, and a set of detected image data is randomly selected in each cluster as the data center; According to the distance formula, Calculate the distance of each set of detected image data Z to K data centers, and divide it into the category corresponding to the data center with the smallest distance, set 1 for each calculation, until the preliminary clustering of all detected image data is completed, and output the preliminary clustering result of all detected image data. wherein, denotes the i-th set of detected image data to a data center distance, denotes the K-th data center; The data centers for each category are updated based on the initial clustering results of the samples, while the new data centers are compared with the old data centers. Set a distance threshold. If the distance between the new data center and the old data center is less than the set distance threshold, it means that the location of the updated data center has not changed much and the convergence is stable. It is considered that the clustering has achieved the expected result and the algorithm terminates. Otherwise, it iteratively calculates the distance from each group of detected image data to K data centers based on the updated data centers until the data centers converge and stabilize, and outputs the clustered image data. The clustered image data is set to be the image data after quantization analysis.
6. The method for detecting defects of an automotive interior and exterior plastic part according to claim 1, characterized in that, The defect detection model constructed based on the quantized and processed image data includes the following steps: The defect types can be defined as: dimensional defects, color defects, and breakage defects; S31. Based on the image data after quantization analysis, a convolutional neural network is trained to construct a defect detection model for color defects and damage defects. S32. Based on the processed image data, size defect detection is performed on the processed image data by contour comparison. Set an image binarization threshold, and binarize the processed image data based on the set image binarization threshold to obtain binarized image data; Create a one-dimensional array to record the gray values of the eight neighborhoods surrounding each pixel in the binarized image data. If the gray values of the eight neighborhoods surrounding a pixel are the same as the gray value of the center point, then the pixel is set to be inside the contour and deleted. If the gray values of the eight neighboring areas of a pixel are different from the gray value of the center point, then the pixel is set to the edge of the outline and is preserved. Traverse and summarize each pixel in the binarized image data to obtain the outline of the processed image data; Collect standard contour data of automotive interior and exterior plastic parts, and compare the contour of the processed image data with the standard contour data of automotive interior and exterior plastic parts. At the same time, record the degree of contour overlap. When the two sets of contours overlap, it means that there is no dimensional defect detection in the processed image data; otherwise, there is dimensional defect detection. S33. Summarize the defect detection results of dimensional defects, color defects, and broken defects to obtain the defect detection model.
7. The method for detecting defects of an automotive interior and exterior plastic part according to claim 6, characterized in that, The process of training a convolutional neural network based on quantized image data to construct a defect detection model for color defects and broken defects includes the following steps: Set a pixel contrast threshold, and based on the set pixel contrast threshold, divide the quantized image data into color defect image data and damage defect image data; Image data after quantization analysis with a pixel contrast threshold greater than or equal to the threshold is classified as damaged or defective image data, while image data after quantization analysis with a pixel contrast threshold less than the threshold is classified as color defective image data. The color defect image data and the damage defect image data are evenly divided to obtain the training set and the validation set; The color defect image data and damage defect image data in the training set and the validation set are divided into image data blocks of the same size, and the divided image data blocks are input into the convolutional neural network. The convolutional neural network includes: convolutional layers, pooling layers, and fully connected layers, wherein the convolutional layers and pooling layers are stacked on top of each other; Set the initial weights, stride, and kernel size in the convolutional neural network; After receiving the input image data block, the convolutional neural network performs convolution calculations on the input image data block based on the set initial weights, convolution stride and convolution kernel size, and extracts the features of the input image data block through the convolution calculation; The features of the obtained image data blocks are input into the pooling layer. The pooling layer pools the features of the obtained image data blocks by means calculation. After pooling, the pooled features are input into the fully connected layer. The fully connected layer combines the features to obtain feature arrays of color defect image data and damage defect image data, and saves them. Select color defect image data and damage defect image data of the same type in the training set and validation set, and conduct similar comparisons among similar image data, and judge the training results according to the similarity comparison method; A similarity threshold is set. When the similarity value between selected image data of the same type is greater than or equal to the set similarity threshold, it means that the training has passed. At this time, the convolutional neural network under the corresponding weight is a defect detection model for color defects and damage defects. Otherwise, it means that the training has failed. The weights of the convolutional neural network are adjusted and iterative training is performed until the training passes.
8. The method for detecting defects of an automotive interior and exterior plastic part according to claim 1, characterized in that, The real-time acquisition of image data of automotive interior and exterior plastic parts, and the defect detection using the constructed defect detection model, includes the following steps: The image data of the automotive interior and exterior plastic parts, acquired in real time, will be input into the defect detection model. First, the contour comparison method is used to compare the real-time acquired image data of automotive interior and exterior plastic parts to determine whether there are dimensional defects. When there are no dimensional defects in the real-time image data of automotive interior and exterior plastic parts, the image data of the real-time acquired automotive interior and exterior plastic parts is detected by the defect detection model of color defects and breakage defects to determine whether there are color defects and breakage defects in the real-time acquired automotive interior and exterior plastic parts image data. If color defects and breakage defects pass the test, it means that there are no defects in the real-time image data of the automotive interior and exterior plastic parts; otherwise, color defects and breakage defects exist.
9. A system for implementing the defect detection method for automotive interior and exterior plastic parts as described in claim 1, characterized in that, include: Image acquisition module, image processing module, image analysis module, and defect detection module; The image acquisition module is used to acquire image data of automotive interior and exterior plastic parts in real time. The image processing module is used to process the image data of the real-time acquired automotive interior and exterior plastic parts to obtain the processed image data; The image analysis module is used to perform quantitative analysis on the processed image data to obtain the quantitatively analyzed image data. The defect detection module is used to construct a defect detection model based on the quantitatively analyzed image data and the processed image data, and to detect defects in the interior and exterior plastic parts of the car in real time based on the defect detection model.