Method, system, storage medium and computer for detecting a vehicle plastic part
By constructing a separation threshold and optimizing the convolutional neural network model, the problem of insufficient algorithm robustness in vehicle plastic part detection was solved, and real-time and efficient detection result generation was achieved.
Patent Information
- Application Number
- CN202511431141.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-10-09
AI Technical Summary
Existing technologies for inspecting plastic parts in vehicles suffer from insufficient algorithm robustness, inability to achieve real-time inspection and integration with production lines, and reliance on manual data, resulting in low inspection efficiency.
Feature separation is achieved by constructing a separation threshold, regression prediction is added by combining a convolutional neural network model, and the deep learning model is optimized by using fuzzy processing to generate detection results.
This improved the accuracy and efficiency of inspection, enabling real-time inspection of vehicle plastic parts and integration with the production line, thus reducing time costs.
Smart Images

Figure CN120912600B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a vehicle plastic part detection method and system, a storage medium and a computer. BACKGROUND
[0002] With the rapid development of science and technology and the improvement of people's living standards, vehicles have become an indispensable part of people's lives.
[0003] In the vehicle production process, the detection of vehicle plastic parts as one of the necessary processes, usually uses visual image acquisition, uses the abnormal database collected by manual acquisition to compare the collected images, and uses threshold segmentation algorithm to identify potential defects in the images. This method relies on manually collected data and template matching, and has poor fault tolerance for posture deviation and partial occlusion, resulting in insufficient algorithm robustness. Moreover, this method cannot achieve real-time detection of vehicle plastic parts and cannot be combined with the production line. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a vehicle plastic part detection method, system, storage medium and computer to at least solve the above technical problems.
[0005] The present application provides a vehicle plastic part detection method, comprising:
[0006] Real-time acquisition of a vehicle plastic part to be detected image, and construction of a corresponding separation threshold, feature separation of the to-be-detected image according to the separation threshold to obtain a corresponding feature image;
[0007] Construction of a convolutional neural network model, and addition of regression prediction in the convolutional neural network model to obtain a deep learning model;
[0008] Acquisition of a labeled image that has completed detection, and fuzzy processing of the labeled image, fuzzy degree calculation of the obtained fuzzy image and the labeled image, input of the obtained fuzzy degree to the deep learning model for optimization to obtain a deep learning optimization model;
[0009] Image processing of the feature image in the deep learning optimization model, and generation of a detection result of the to-be-detected image according to the image processing result.
[0010] Further, the step of real-time acquisition of a to-be-detected image, construction of a corresponding separation threshold, and feature separation of the to-be-detected image according to the separation threshold to obtain a corresponding feature image comprises:
[0011] An image ratio of a target image and a background image in a plurality of standard images is obtained based on a knowledge graph, and a corresponding background threshold is constructed according to the image ratio;
[0012] A foreground image and a background image in the to-be-detected image are separated according to the background threshold, and the number of pixel points and the corresponding average gray value of the foreground image and the background image are counted respectively;
[0013] An optimal separation threshold is calculated according to the number of pixel points and the corresponding average gray value of the foreground image and the background image, and the to-be-detected image is feature-separated by using the separation threshold to obtain a corresponding feature image.
[0014] Further, the calculation formula of the background threshold is:
[0015] ;
[0016] In the formula, , indicates the histogram distribution of the standard image, ; , indicates the size of the standard image; , indicates the image ratio of the target image and the background image;
[0017] The calculation formula of the separation threshold is:
[0018] ;
[0019] In the formula, , , respectively indicates the number of pixel points of the foreground image and the background image, , , respectively indicates the average gray value of the foreground image and the background image.
[0020] Further, the steps of constructing a convolutional neural network model and adding a regression prediction in the convolutional neural network model to obtain a deep learning model include:
[0021] The maximum pooling layer in the convolutional neural network model is replaced by a processing layer containing a region detection algorithm, wherein the input data of the convolutional neural network model includes source data and a region detection window generated by the source data;
[0022] A regression prediction is added to the output of the processing layer to construct a corresponding regression prediction layer to obtain a deep learning model.
[0023] Further, the steps of performing blur processing on the marked image and calculating the blur degree of the obtained blurred image and the marked image include:
[0024] The marked image is blurred to construct degradation information of the marked image, convolution processing is performed based on the degradation information, and the absolute values of elements of a result matrix are accumulated to obtain a first blur value;
[0025] Gray value calculation is performed on the degradation information, a corresponding second blur value is calculated according to the calculated gray value, and a corresponding blur degree is calculated according to the first blur value and the second blur value.
[0026] The application further provides a vehicle plastic part detection system, comprising:
[0027] A feature separation module is configured to acquire a to-be-detected image of a vehicle plastic part in real time, construct a corresponding separation threshold, and perform feature separation on the to-be-detected image according to the separation threshold to obtain a corresponding feature image.
[0028] A model construction module is configured to construct a convolutional neural network model and add regression prediction in the convolutional neural network model to obtain a deep learning model.
[0029] A model optimization module is configured to acquire a marked image after detection is completed, perform blurring on the marked image, perform blur degree calculation on the obtained blurred image and the marked image, input the obtained blur degree to the deep learning model for optimization to obtain a deep learning optimization model.
[0030] An image detection module is configured to input the feature image to the deep learning optimization model for image processing and generate a detection result of the to-be-detected image according to the image processing result.
[0031] Further, the feature separation module comprises:
[0032] A threshold construction unit is configured to acquire an image ratio of a target image and a background image in a plurality of standard images based on a knowledge graph and construct a corresponding background threshold according to the image ratio.
[0033] A data processing unit is configured to separate a foreground image and a background image in the to-be-detected image according to the background threshold and respectively count pixel point numbers and corresponding average gray values of the foreground image and the background image.
[0034] A feature separation unit is configured to calculate an optimal separation threshold according to the pixel point numbers and the corresponding average gray values of the foreground image and the background image and perform feature separation on the to-be-detected image by using the separation threshold to obtain a corresponding feature image.
[0035] Further, the model construction module comprises:
[0036] a structure replacement unit configured to replace a maximum pooling layer in the convolutional neural network model with a processing layer comprising a region detection algorithm, wherein input data of the convolutional neural network model comprises source data and a region detection window generated from the source data;
[0037] a regression prediction unit configured to add a regression prediction to an output of the processing layer to construct a corresponding regression prediction layer, thereby obtaining a deep learning model.
[0038] Further, the model optimization module comprises:
[0039] a blur processing unit configured to perform blur processing on the marked image to construct degradation information of the marked image, perform convolution processing based on the degradation information, and accumulate absolute values of elements of a result matrix to obtain a first blur value;
[0040] a blur degree calculation unit configured to calculate a gray value of the degradation information, calculate a corresponding second blur value based on the calculated gray value, and calculate a corresponding blur degree based on the first blur value and the second blur value.
[0041] The present application also provides a storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the vehicle plastic part detection method.
[0042] The present application also provides a computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the vehicle plastic part detection method when executing the computer program.
[0043] The vehicle plastic part detection method, system, storage medium, and computer of the present application separate features of a to-be-detected image by constructing a separation threshold, and obtain a deep learning model by adding a regression prediction to a constructed convolutional neural network model, thereby improving processing accuracy and efficiency of the model and saving time cost. The marked image after detection is subjected to blur processing, the blur degree of the marked image is calculated using a blurred image obtained by the blur processing, the two images are quickly distinguished using the calculated blur degree, the deep learning model is optimized using the blur degree, and the feature image is subjected to image processing using the constructed deep learning model to generate a corresponding detection result. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 a flowchart of the vehicle plastic part detection method in the first embodiment of the present application;
[0045] Figure 2 a structural block diagram of the vehicle plastic part detection system in the second embodiment of the present application;
[0046] Figure 3 Fig. 3 is a structural block diagram of a computer in a third embodiment of the present application.
[0047] The following detailed description will further describe the present application with reference to the above-mentioned drawings. DETAILED DESCRIPTION
[0048] For the purpose of understanding the present application, the present application will be described in further detail below with reference to the accompanying drawings. Several embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present application is more thorough and complete.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0050] Embodiment One
[0051] Referring to Fig. 1, a detection method for a vehicle plastic part in a first embodiment of the present application is shown, which specifically includes steps S101 to S104: Figure 1
[0052] S101, real-time acquisition of a to-be-detected image of a vehicle plastic part, and construction of a corresponding separation threshold, feature separation of the to-be-detected image according to the separation threshold to obtain a corresponding feature image;
[0053] Further, the step S101 specifically includes steps S1011-S1013:
[0054] S1011, acquisition of an image ratio of a target image and a background image in a plurality of standard images based on a knowledge graph, and construction of a corresponding background threshold according to the image ratio;
[0055] S1012, separation of a foreground image and a background image in the to-be-detected image according to the background threshold, and statistics of pixel point numbers and corresponding average gray values of the foreground image and the background image, respectively;
[0056] S1013, calculation of an optimal separation threshold according to the pixel point numbers and the corresponding average gray values of the foreground image and the background image, and feature separation of the to-be-detected image by using the separation threshold to obtain a corresponding feature image.
[0057] In specific implementation, image acquisition is performed on the vehicle plastic part by an image acquisition device installed on a production line, and an image ratio of a target image and a background image in a plurality of standard images is obtained based on a knowledge graph of the vehicle plastic part, wherein the standard image is image data in which the foreground and the background are segmented, the same type of standard image as the vehicle plastic part is used to obtain the corresponding image ratio, and the image ratio is used to construct a background threshold value for distinguishing the foreground and the background:
[0058] ;
[0059] In the formula, , indicates a histogram distribution of the standard image, ; , indicates a size of the standard image; , indicates an image ratio of the target image and the background image;
[0060] Specifically, the foreground image and the background image in the to-be-detected image are separated according to the background threshold value, and the pixel point number and the corresponding average gray value of the foreground image and the background image are counted respectively, and the optimal separation threshold value is constructed according to the pixel point number and the average gray value, wherein the calculation formula of the separation threshold value is:
[0061] ;
[0062] In the formula, , , and, respectively, indicate the pixel point number of the foreground image and the background image, , , and, respectively, indicate the average gray value of the foreground image and the background image.
[0063] In the calculation process, the gray value is traversed from 0 to 255, and the separation threshold value calculated each time is calculated, the gray value when the maximum value is selected as the optimal threshold value, and the optimal separation threshold value obtained is used to separate the features of the to-be-detected image to obtain the corresponding feature image. It can be understood that the above-mentioned method can increase the difference between the foreground and the background in the to-be-detected image, and the binarization method can have better robustness.
[0064] S102, construct a convolutional neural network model, and add a regression prediction in the convolutional neural network model to obtain a deep learning model;
[0065] Further, the step S102 specifically includes steps S1021-S1022:
[0066] S1021, replace the max pooling layer in the convolutional neural network model with a processing layer containing a region detection algorithm, wherein the input data of the convolutional neural network model includes source data and a region detection window generated by the source data;
[0067] S1022, add a regression prediction to the output of the processing layer to construct a corresponding regression prediction layer to obtain a deep learning model.
[0068] In a specific implementation, a preliminary convolutional neural network model is constructed based on a convolutional neural network (any one of CNN algorithm, RNN algorithm, GAN algorithm, and MLP algorithm), and the network structure used is any one of LeNet-5 convolutional neural network structure, AlexNet convolutional neural network structure, and VGGNet convolutional neural network structure. The max pooling layer in the convolutional neural network model is replaced with a processing layer containing a region detection algorithm, wherein the input data of the convolutional neural network model includes source data and a region detection window generated by the source data. A regression prediction is added to the output of the processing layer to construct a corresponding regression prediction layer to obtain a deep learning model.
[0069] It can be understood that by replacing the max pooling layer, the caching processing of the region detection window features can be avoided, and by adding a regression prediction to the output of the processing layer, the traditional hierarchical structure training can be converted into an end-to-end training mode.
[0070] Specifically, in the constructed deep learning model, the network output layer includes two, one is a target classification layer, and the other is a regression prediction layer. The target classification layer is used to output image classification results, and the regression prediction layer is used to output a probability vector of a region detection window generated by an image. wherein, The value is transmitted through the full connection layer of the neural network and calculated by the Softmax layer.
[0071] S103, obtaining a labeled image that has completed detection, and performing blur processing on the labeled image. The blur degree of the obtained blurred image and the labeled image is calculated, and the obtained blur degree is input into the deep learning model for optimization to obtain a deep learning optimization model.
[0072] Further, the step S103 specifically includes steps S1031-S1032:
[0073] S1031, performing blur processing on the labeled image to construct degradation information of the labeled image, performing convolution processing based on the degradation information, and accumulating the absolute values of the elements of the result matrix to obtain a first blur value;
[0074] S1032, perform grayscale value calculation on the degradation information, calculate the corresponding second blur value based on the calculated grayscale value, and calculate the corresponding blur degree based on the first blur value and the second blur value.
[0075] In practice, the marked images that have undergone detection are acquired, and the marked images are blurred to construct the degradation information of the marked images:
[0076] ;
[0077] In the formula, Indicates the fuzzy kernel. Indicates a labeled image. Noise representing the labeled image;
[0078] To construct corresponding blur levels using labeled images and degradation information to distinguish between the two types of images, specifically, a LoG convolution kernel is used to convolve the obtained degradation information, and the absolute values of the elements of the resulting matrix are summed to obtain the corresponding first blur value. Indicates the image in grayscale value at that location Indicates the size of the image. Indicates the first fuzzy value:
[0079] ;
[0080] In the formula, Represents the LoG convolution kernel;
[0081] Furthermore, grayscale values are calculated for the degraded information, and the corresponding second fuzzy value is calculated based on the calculated grayscale values. :
[0082] ;
[0083] Calculate the image in frequency coordinates Complex values at the location (including amplitude and phase information):
[0084] ;
[0085] In the formula, The imaginary unit, This represents the basis functions of a two-dimensional sine wave.
[0086] Calculate the corresponding weighted fuzzy value:
[0087] ;
[0088] ;
[0089] ;
[0090] wherein, denotes the phase angle, denotes the cosine component intensity, denotes the sine component intensity, denotes the power spectrum obtained by squaring the Fourier transform of the image, denotes the high frequency value obtained by calculating the Gaussian weight function, denotes the average phase of the local neighborhood .
[0091] According to the obtained first blur value, second blur value and weighted blur value, the corresponding blur degree is calculated:
[0092] ;
[0093] wherein, denotes the adaptive weight, denotes the confidence correction coefficient, denotes the variance correction coefficient, denotes the variance of the first blur value , the second blur value and the weighted blur value , denotes the maximum value of the first blur value , the second blur value and the weighted blur value , denotes the mean value of the first blur value , the second blur value and the weighted blur value .
[0094] Further, the obtained blur degree is input into the deep learning model for optimization, and the blur adaptive convolution and blur perception attention of the deep learning model are improved by using the blur degree, so as to obtain a deep learning optimization model.
[0095] S104, input the feature image into the deep learning optimization model for image processing, and generate a detection result of the to-be-detected image according to the image processing result.
[0096] In specific implementation, the obtained feature image is input into the deep learning optimization model for image processing, so as to process the image by using the feature algorithm in the deep learning optimization model, and generate a detection result of the to-be-detected image according to the image processing result.
[0097] In summary, the detection method for the vehicle plastic part in the above embodiments separates the features of the to-be-detected image by constructing a separation threshold, and increases regression prediction in the constructed convolutional neural network model to obtain a deep learning model, so that the processing accuracy and efficiency of the model are improved, thereby saving time cost; the marked image after completion of detection is subjected to fuzzy processing, the fuzzy degree of the marked image is calculated by using the fuzzy image obtained by the fuzzy processing, the two images are quickly distinguished by using the calculated fuzzy degree, the deep learning model is optimized by using the fuzzy degree, and the feature image is subjected to image processing by using the constructed deep learning model to generate a corresponding detection result.
[0098] Embodiment Two
[0099] Another aspect of the present application also provides a detection system for a vehicle plastic part, please refer to Figure 2 , which is a detection system for a vehicle plastic part in the second embodiment of the present application, the system comprises:
[0100] The feature separation module 11 is used for acquiring a to-be-detected image of a vehicle plastic part in real time, and constructing a corresponding separation threshold, and separating the features of the to-be-detected image according to the separation threshold to obtain a corresponding feature image.
[0101] Further, the feature separation module 11 comprises:
[0102] The threshold construction unit is used for acquiring the image ratio of the target image and the background image in a plurality of standard images based on the knowledge graph, and constructing a corresponding background threshold according to the image ratio.
[0103] The data processing unit is used for separating the foreground image and the background image in the to-be-detected image according to the background threshold, and respectively counting the pixel point number and the corresponding average gray value of the foreground image and the background image.
[0104] The feature separation unit is used for calculating the optimal separation threshold according to the pixel point number and the corresponding average gray value of the foreground image and the background image, and separating the features of the to-be-detected image by using the separation threshold to obtain a corresponding feature image.
[0105] The model construction module 12 is used for constructing a convolutional neural network model, and increasing regression prediction in the convolutional neural network model to obtain a deep learning model.
[0106] Further, the model construction module 12 comprises:
[0107] A structure replacing unit is configured to replace a max pooling layer in the convolutional neural network model with a processing layer containing a region detection algorithm, wherein input data of the convolutional neural network model comprises source data and a region detection window generated from the source data;
[0108] A regression prediction unit is configured to add a regression prediction to an output of the processing layer to construct a corresponding regression prediction layer, so as to obtain a deep learning model.
[0109] A model optimization module 13 is configured to obtain a labeled image after detection is completed, perform blur processing on the labeled image, perform blur degree calculation on a blurred image obtained and the labeled image, input the obtained blur degree to the deep learning model for optimization, and obtain a deep learning optimization model.
[0110] Further, the model optimization module 13 comprises:
[0111] A blur processing unit is configured to perform blur processing on the labeled image to construct degradation information of the labeled image, perform convolution processing based on the degradation information, and accumulate absolute values of elements of a result matrix to obtain a first blur value.
[0112] A blur degree calculation unit is configured to perform gray value calculation on the degradation information, calculate a corresponding second blur value according to the calculated gray value, and calculate a corresponding blur degree according to the first blur value and the second blur value.
[0113] An image detection module 14 is configured to input the feature image into the deep learning optimization model for image processing, and generate a detection result of the to-be-detected image according to the image processing result.
[0114] The functions or operation steps realized when the above modules and units are executed are substantially the same as those of the above method embodiments, and thus will not be described here again.
[0115] The vehicle plastic part detection system provided in the embodiments of the present application has the same implementation principle and technical effects as the above method embodiments, and for brevity of description, the parts not mentioned in the system embodiments can be referred to the corresponding contents in the above method embodiments.
[0116] Embodiment Three
[0117] The present application also provides a computer, please refer to Figure 3 , which is a computer in the third embodiment of the present application, comprising a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20, wherein the processor 20 implements the above vehicle plastic part detection method when executing the computer program 30.
[0118] The memory 10 includes at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 10 can be an internal storage unit of a computer, such as a hard disk of the computer, in some embodiments. The memory 10 can also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., in other embodiments. Further, the memory 10 can include both an internal storage unit of a computer and an external storage device. The memory 10 can be used to store application software installed in the computer and various data, and to temporarily store data that has been output or is to be output.
[0119] The processor 20 can be an Electronic Control Unit (ECU), a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, for running program codes or processing data stored in the memory 10, such as executing an access restriction program, in some embodiments.
[0120] It should be noted that, Figure 3 The illustrated structure does not constitute a limitation on the computer, which can include fewer or more components than shown, or combine certain components, or arrange the components differently, in other embodiments.
[0121] The embodiments of the present application also propose a storage medium having a computer program stored thereon, which, when executed by a processor, implements the detection method of the vehicle plastic part as described above.
[0122] Those skilled in the art can understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a list of executable instructions for implementing the logic function, which can be embodied in any computer readable medium for use by or in connection with an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute the instructions, or in conjunction with these instruction execution systems, apparatus or devices. For the purpose of the present specification, the "computer readable medium" can be any device that can contain, store, communicate, propagate or transport programs for use by or in connection with an instruction execution system, apparatus or device, or in conjunction with these instruction execution systems, apparatus or devices.
[0123] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that is then reproducible into a computer readable medium.
[0124] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or combinations thereof, can be used: a discrete logic circuit having logic gates for implementing logic functions upon data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), or the like.
[0125] The technical features of the above-described embodiments can be combined in any manner, and in order to make the description concise, not all possible combinations of the technical features in the above-described embodiments are described, however, as long as the combinations of the technical features do not contradict each other, they should be considered within the scope of the present disclosure.
[0126] The above-described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.
Claims
1. A method of inspecting a vehicle plastic part, characterized in that, The method comprises the following steps: real-time acquisition of a to-be-detected image of a vehicle plastic part, construction of a corresponding separation threshold, feature separation of the to-be-detected image according to the separation threshold, and obtaining of a corresponding feature image; construction of a convolutional neural network model, addition of a regression prediction in the convolutional neural network model, and obtaining of a deep learning model; acquisition of a labeled image after detection is completed, blurring processing of the labeled image, blur degree calculation of a blurred image obtained and the labeled image, input of the obtained blur degree into the deep learning model for optimization, and obtaining of a deep learning optimization model; input of the feature image into the deep learning optimization model for image processing, and generation of a detection result of the to-be-detected image according to an image processing result; wherein the step of real-time acquisition of a to-be-detected image of a vehicle plastic part, construction of a corresponding separation threshold, and feature separation of the to-be-detected image according to the separation threshold to obtain a corresponding feature image comprises the following steps: acquisition of an image ratio of a target image and a background image in a plurality of standard images based on a knowledge graph, and construction of a corresponding background threshold according to the image ratio; separation of a foreground image and a background image in the to-be-detected image according to the background threshold, and statistical obtaining of pixel point numbers and corresponding average gray values of the foreground image and the background image; calculation of an optimal separation threshold according to the pixel point numbers and the corresponding average gray values of the foreground image and the background image, and feature separation of the to-be-detected image by using the separation threshold to obtain a corresponding feature image, wherein a calculation formula of the background threshold is: ; wherein represents a histogram distribution of the standard image, ; represents a size of the standard image; represents an image ratio of the target image to the background image; a calculation formula of the separation threshold is: ; In the formula, , respectively represent the number of pixel points of the foreground image and the background image, , respectively represent the average gray value of the foreground image and the background image.
2. The method of claim 1, wherein the step of construction of a convolutional neural network model, addition of a regression prediction in the convolutional neural network model, and obtaining of a deep learning model comprises the following steps: replacement of a maximum pooling layer in the convolutional neural network model with a processing layer containing a region detection algorithm, wherein input data of the convolutional neural network model comprises source data and a region detection window generated by the source data; addition of a regression prediction to an output of the processing layer, construction of a corresponding regression prediction layer, and obtaining of a deep learning model.
3. The method of claim 1, wherein the step of blurring processing of the labeled image, and blur degree calculation of a blurred image obtained and the labeled image comprises the following steps: blurring processing of the labeled image to construct degradation information of the labeled image, convolution processing based on the degradation information, and accumulation of absolute values of elements of a result matrix to obtain a first blur value; gray value calculation of the degradation information, calculation of a corresponding second blur value according to the calculated gray value, and calculation of a corresponding blur degree according to the first blur value and the second blur value.
4. A system for detecting a vehicle plastic part, characterized in that, The method comprises the following steps: a feature separation module is configured to real-time acquisition of a to-be-detected image of a vehicle plastic part, construction of a corresponding separation threshold, and feature separation of the to-be-detected image according to the separation threshold to obtain a corresponding feature image; a model construction module is configured to construction of a convolutional neural network model, addition of a regression prediction in the convolutional neural network model, and obtaining of a deep learning model; The model optimization module is configured to obtain a labeled image after detection is completed, perform blur processing on the labeled image, perform blur degree calculation on the obtained blurred image and the labeled image, input the obtained blur degree to the deep learning model for optimization, and obtain a deep learning optimization model. The image detection module is configured to input the feature image into the deep learning optimization model for image processing, and generate a detection result of the to-be-detected image according to the image processing result. The feature separation module includes: The threshold construction unit is configured to obtain an image ratio of a target image and a background image in a plurality of standard images based on a knowledge graph, and construct a corresponding background threshold according to the image ratio. The data processing unit is configured to separate a foreground image and a background image in the to-be-detected image according to the background threshold, and respectively count pixel point numbers and corresponding average gray values of the foreground image and the background image. The feature separation unit is configured to calculate an optimal separation threshold according to the pixel point numbers and the corresponding average gray values of the foreground image and the background image, and perform feature separation on the to-be-detected image by using the separation threshold to obtain a corresponding feature image. ; wherein represents a histogram distribution of the standard image, ; represents a size of the standard image; represents an image ratio of the target image to the background image; The calculation formula of the separation threshold is: ; In the formula, , respectively represent the number of pixel points of the foreground image and the background image, , respectively represent the average gray value of the foreground image and the background image.
5. The system for detecting a vehicle plastic part of claim 4, wherein, The model construction module includes: The structure replacement unit is configured to replace a maximum pooling layer in the convolutional neural network model with a processing layer including a region detection algorithm, wherein input data of the convolutional neural network model includes source data and a region detection window generated by the source data. The regression prediction unit is configured to increase regression prediction at an output of the processing layer, construct a corresponding regression prediction layer, and obtain a deep learning model.
6. A storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the vehicle plastic part detection method of any one of claims 1 to 3.
7. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the vehicle plastic part detection method of any one of claims 1 to 3.
Citation Information
Patent Citations
Faster R-CNN article detection method based on transfer learning
CN111160120A