Motorcycle cylinder head production line quality detection method and system
By constructing and dynamically maintaining a normal visual feature model, and combining the evaluation methods of local feature density and normal density range, the problem of identifying unknown defects in motorcycle cylinder head quality inspection systems when production processes change has been solved, thus improving the accuracy and adaptability of the inspection.
Patent Information
- Application Number
- CN202511254449.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing motorcycle cylinder head quality inspection systems are struggling to identify new and unknown defects with variable shapes and uncertain characteristics after changes in production processes, leading to product quality risks and production efficiency issues.
We construct and dynamically maintain a normal feature model based on normal visual feature data. By comparing the test data with the normal feature model, we identify abnormal patterns, adapt to changes in the production environment, and introduce the concepts of local feature density and normal density range for fine evaluation.
It significantly improves the ability to identify new and unknown defects, reduces the false positive rate, enhances the accuracy and robustness of product quality inspection, and adapts to changes in the production environment.
Smart Images

Figure CN120806738B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of motorcycle production detection, in particular to a motorcycle cylinder head production line quality detection method and system. BACKGROUND
[0002] On an automated production line, product quality detection systems usually rely on pre-trained image recognition programs to identify known defects. However, when the production process changes, new unknown defects with variable shapes and uncertain features may appear, and existing systems often struggle to effectively identify them, leading to product quality risks and production efficiency problems.
[0003] Specifically, on an automated production line for motorcycle engine cylinder heads, quality control is a key link to ensure the performance of the final product. In existing technology, a quality detection system based on image processing is deployed at the end of the production line. This system analyzes the texture, edge, contour and other information in the image, compares it with the image features of a large number of qualified and known defective products stored in the database, and makes a "qualified" or "unqualified" judgment for each cylinder head. This system runs well in the early stage of production, with high accuracy in identifying known typical defects, effectively ensuring product quality.
[0004] However, when the factory upgrades the casting process of the cylinder head and introduces new high-pressure casting technology, under certain fluctuations in process parameters, new defects that have never been seen before may occur. Therefore, the original recognition program trained based on historical data cannot correctly classify these new image patterns as defects, resulting in defective cylinder heads being misjudged as "qualified products". Even if new defect samples are collected and the model is retrained, there are still new problems. Simply increasing the number of samples cannot fundamentally solve the problem, because it is impossible to exhaust all possible defect patterns.
[0005] Ultimately, this complex situation leads to a difficult technical dilemma: in an automated production line using pattern recognition for quality detection, the existing detection system highly depends on a fixed recognition model based on historical data and known defect types. When the production process changes or improves, it may introduce new unknown defects with variable shapes, uncertain features, and never seen in historical data. In this case, the original recognition system will misjudge these new defects as qualified products, leading to products with serious quality problems flowing into the market. If only new defect samples are collected and the model is retrained, the response will be delayed, and because the new defects have variable shapes, it is difficult to cover all aspects with limited samples, resulting in poor generalization of the system to new defects and high false negative rate.
[0006] For the above problems, the prior art needs to be improved. SUMMARY
[0007] The application discloses a motorcycle cylinder head production line quality detection method and system, aiming to solve the problem that when the production process changes, new unknown defects with variable forms and uncertain characteristics may occur, and the existing system cannot effectively identify them, causing product quality risks and production efficiency problems.
[0008] The technical solution of the application is as follows:
[0009] In a first aspect, the application discloses a motorcycle cylinder head production line quality detection method, comprising:
[0010] Obtain the to-be-detected visual feature data of the to-be-detected motorcycle cylinder head;
[0011] Construct a normal feature model representing the appearance of a normal product based on normal visual feature data of a normal motorcycle cylinder head, and maintain and update the normal feature model according to changes in the normal visual feature data during the production process;
[0012] Compare the to-be-detected visual feature data with a preset normal product feature group in the normal feature model to obtain a comparison result;
[0013] When the comparison result meets an abnormality determination condition, identify the abnormal mode corresponding to the to-be-detected visual feature data.
[0014] Through the technical solution, the application can effectively identify unknown defects that cannot be found by traditional methods by constructing and dynamically maintaining a normal feature model and comparing it with to-be-detected data, solving the problem of insufficient recognition ability when facing new unknown defects in the prior art, and significantly improving the accuracy and robustness of product quality detection.
[0015] Further, based on the motorcycle cylinder head production line quality detection method described above, a normal feature model representing the appearance of a normal product is constructed based on normal visual feature data of a normal motorcycle cylinder head, and the normal feature model is maintained and updated according to changes in the normal visual feature data during the production process, comprising:
[0016] Establish a corresponding normal product feature group set for each preset environment state;
[0017] Obtain the current environment state of the production line where the to-be-detected motorcycle cylinder head is located;
[0018] Select the corresponding normal product feature group set according to the current environment state;
[0019] The normal product feature group set is maintained based on normal visual feature data, and the normal product feature group set is updated according to changes in the normal visual feature data.
[0020] Through the technical solution, the present application establishes independent normal product feature group sets for different environment states, and dynamically selects and maintains according to the current environment state, effectively dealing with the influence of changes in factors such as light and temperature in the production environment on visual feature data, improving the adaptability of the model to environmental changes, and thus making the detection result more stable and reliable.
[0021] Further, the to-be-tested visual feature data is compared with the preset normal product feature group in the normal feature model to obtain a comparison result, including:
[0022] When the feature distance between the to-be-tested visual feature data and any normal product feature group in the normal feature model is within the preset distance interval, the normal density range of the normal product feature group corresponding to the to-be-tested visual feature data is obtained, and the local feature density of the to-be-tested visual feature data in the feature space is calculated.
[0023] The local feature density is compared with the normal density range to obtain a comparison result.
[0024] Through the technical solution, the present application introduces the concepts of local feature density and normal density range, and compares them, which can more finely evaluate the degree of "normalcy" of the to-be-tested data in the normal product feature group, effectively distinguishing potential defects that are not far from normal samples but have abnormal local density, and improving the detection sensitivity to subtle abnormalities.
[0025] Further, in the motorcycle cylinder head production line quality detection method, calculating the local feature density of the to-be-tested visual feature data in the feature space includes:
[0026] Determining the normal product feature group corresponding to the to-be-tested visual feature data;
[0027] Determining the local search radius according to the internal dispersion degree of the normal product feature group;
[0028] Within the range of the local search radius, the number of data points in the normal product feature group that have a feature distance not greater than the local search radius from the to-be-tested visual feature data is counted.
[0029] The number of data points is taken as the local feature density of the to-be-tested visual feature data in the feature space.
[0030] By the technical solution, the local search radius is dynamically adjusted according to the internal dispersion degree of the normal product feature group, so that the calculation of the local feature density is more consistent with the actual distribution characteristics of the group, avoiding the misjudgment caused by the fixed radius, and improving the accuracy of the local density calculation.
[0031] Further, the local feature density is compared with the normal density range to obtain a comparison result, including:
[0032] Obtain internal feature density distribution information of a normal product feature group corresponding to the to-be-tested visual feature data;
[0033] Determine a normal density range of the normal product feature group according to the internal feature density distribution information;
[0034] Compare the local feature density with the normal density range to obtain a comparison result.
[0035] By the technical solution, the internal feature density distribution information of the normal product feature group is obtained and analyzed, so that the normal density range can be more accurately defined, the abnormality determination is more scientific and objective, and the limitations of subjective threshold setting are avoided.
[0036] Further, the normal density range of the normal product feature group is determined according to the internal feature density distribution information, including:
[0037] Analyze the peak position and peak amplitude of the internal feature density distribution information to filter a target peak representing a main normal mode;
[0038] Analyze the valley position and valley amplitude of the internal feature density distribution information to filter a target valley representing a normal mode boundary;
[0039] Determine the normal density range of the normal product feature group based on a density interval between the target peak and the target valley.
[0040] By the technical solution, the peak and valley of the internal feature density distribution information are analyzed, so that the core area and the boundary of the normal mode can be accurately identified, a more representative normal density range is constructed, and the accuracy and robustness of the abnormality determination are effectively improved.
[0041] Further, the peak position and peak amplitude of the internal feature density distribution information are analyzed to filter a target peak representing a main normal mode, including:
[0042] Identify a plurality of local peaks in the internal feature density distribution information that satisfy an amplitude greater than a preset peak amplitude threshold;
[0043] For each local peak, a corresponding data point set is extracted;
[0044] calculate the number of data points and its dispersion degree of each data point set;
[0045] According to the comprehensive judgment of the number of data points and the dispersion degree, the target peak value representing the main normal mode is screened out.
[0046] Through the technical solution, the application can more accurately identify the peak values that truly represent the main normal mode by comprehensively considering the number of data points and the dispersion degree, avoid misjudgment caused by noise or secondary mode, and make the definition of normal mode more accurate.
[0047] Further, analyzing the valley position and valley amplitude of the internal feature density distribution information, and screening the target valley value representing the normal mode boundary includes:
[0048] Identify multiple local valleys in the internal feature density distribution information that satisfy the amplitude less than the preset valley amplitude threshold;
[0049] For each local valley, determine the density rising area on both sides;
[0050] Calculate the average density value of the density rising area on both sides;
[0051] Calculate the density difference between the density of the valley position and the average density value;
[0052] According to the comprehensive judgment of the average density value and the density difference, the target valley value representing the normal mode boundary is screened out.
[0053] Through the technical solution, the application can more accurately identify the valley value representing the normal mode boundary by comprehensively considering the valley amplitude, the average density value of the density rising area on both sides and the density difference, so as to more accurately define the boundary between normal and abnormal, and improve the accuracy of abnormal judgment.
[0054] Further, the internal feature density distribution information of the normal product feature group corresponding to the to-be-tested visual feature data is obtained, including:
[0055] Obtain the production line environment parameters when the to-be-tested visual feature data is collected, including illumination intensity, environmental temperature, camera sensor gain and production batch identifier;
[0056] Based on the production line environment parameters, the feature data in the normal product feature group is subjected to environmental correction processing, which includes weighting correction or normalization of the feature data based on the production line environment parameters, to reduce the influence of non-defect class environmental changes on the internal feature density distribution information;
[0057] After completing the environmental correction processing, the corrected feature data is subjected to kernel density estimation to obtain the internal feature density distribution information.
[0058] By the technical scheme, the application introduces the production line environment parameters and performs environment correction processing, effectively reduces the influence of non-defect type environment change on the feature data, makes the internal feature density distribution information more truly reflect the characteristics of the product itself, and thus improves the accuracy and stability of detection.
[0059] In a second aspect, the application also discloses a motorcycle cylinder head production line quality detection system, comprising:
[0060] a data acquisition module, configured to acquire to-be-detected visual feature data of a to-be-detected motorcycle cylinder head;
[0061] a model construction and maintenance module, configured to construct a normal feature model representing a normal product appearance based on normal visual feature data of a normal motorcycle cylinder head, and to maintain and update the normal feature model according to changes in the normal visual feature data during the production process;
[0062] a comparison module, configured to compare the to-be-detected visual feature data with a preset normal product feature group in the normal feature model, and to obtain a comparison result;
[0063] an abnormality determination module, configured to identify an abnormal mode corresponding to the to-be-detected visual feature data when the comparison result meets an abnormality determination condition.
[0064] By the technical scheme, the application realizes the systematic deployment of the motorcycle cylinder head production line quality detection method through the modular design, the modules work cooperatively, and the quality detection task can be efficiently and accurately completed, thereby providing reliable hardware and software support for actual production application.
[0065] Advantages
[0066] The motorcycle cylinder head production line quality detection method disclosed in the application comprises the following steps: acquiring visual feature data to be detected of a motorcycle cylinder head to be detected, and constructing a normal feature model representing the appearance of a normal product based on normal visual feature data of a normal motorcycle cylinder head. The model is maintained and updated according to the changes of the normal visual feature data in the production process. Then, the visual feature data to be detected is compared with a preset normal product feature group in the normal feature model to obtain a comparison result. When the comparison result meets an abnormality determination condition, an abnormal mode corresponding to the visual feature data to be detected is identified. The core of the method is that it does not rely on a known defect model trained in advance, but learns and maintains a feature model of a "normal" product to identify abnormalities. This enables the application to effectively solve the problem that a traditional system based on known defect mode recognition cannot effectively identify new unknown defects with variable shapes and uncertain features caused by changes in the production process. By dynamically updating the normal feature model, the application can adapt to slight changes in the production environment and process, avoid misjudging new unknown defects as qualified products, thereby significantly reducing product quality risks and production efficiency problems, and improving the robustness and accuracy of detection. BRIEF DESCRIPTION OF DRAWINGS
[0067] Figure 1 A flowchart of a motorcycle cylinder head production line quality detection method provided by the application is shown.
[0068] Figure 2 A program block diagram of a motorcycle cylinder head production line quality detection system provided by the application is shown.
[0069] In the figure: 1, data acquisition module; 2, model construction and maintenance module; 3, comparison module; 4, abnormality determination module. DETAILED DESCRIPTION
[0070] The technical solutions in the application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the application, but not all the embodiments. The components of the application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but only represents selected embodiments of the application. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the application.
[0071] It should be noted that similar reference numbers and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0072] With reference to Figure 1 The present application proposes a motorcycle cylinder head production line quality detection method, comprising:
[0073] S1000: acquiring visual feature data to be detected of a motorcycle cylinder head to be detected;
[0074] S2000: constructing a normal feature model representing the appearance of normal products based on normal visual feature data of normal motorcycle cylinder heads, and maintaining and updating the normal feature model according to changes in the normal visual feature data during the production process;
[0075] S3000: comparing the visual feature data to be detected with a preset normal product feature group in the normal feature model to obtain a comparison result;
[0076] S4000: identifying an abnormal mode corresponding to the visual feature data to be detected when the comparison result meets an abnormality determination condition.
[0077] Among them, "visual feature data" refers to the numerical information obtained after the surface image of the motorcycle cylinder head obtained by the image acquisition device (such as an industrial camera) is preprocessed and feature extracted. These data can represent the visual characteristics of the cylinder head such as texture, color, and geometric shape. "Normal feature model" is a dynamic model that can reflect the distribution of normal product appearance features. It is established by learning a large number of visual feature data of normal products, and can be self-adjusted and updated according to the changes of normal product features in the production process. "Normal product feature group" is a component of the normal feature model, representing the visual feature set of normal products under certain production conditions or in a certain batch. "Abnormality determination condition" is a logical rule or threshold used to determine whether the product to be detected is abnormal. When the difference between the visual feature data of the product to be detected and the normal feature model reaches or exceeds this condition, it is judged to be abnormal. This method is mainly applied to the automatic production line of motorcycle cylinder heads. In this environment, the production process of the cylinder head may be affected by various factors, resulting in slight fluctuations in product appearance, so an intelligent detection method that can adapt to such fluctuations is needed.
[0078] In the quality detection process of motorcycle cylinder head production line, the visual feature data of the motorcycle cylinder head to be detected needs to be obtained first. This can be achieved in various ways. For example, a high-resolution industrial camera can be used to take multiple-angle photos of the motorcycle cylinder head to be detected, obtaining its surface images. Subsequently, these image data are transmitted to an image processing unit, and through image preprocessing (such as denoising and enhancement) and feature extraction algorithms (such as SIFT, SURF, and deep learning feature extraction), the visual feature data to be detected are converted into numerical values. Another way is to use a three-dimensional scanner to scan the motorcycle cylinder head to be detected, directly obtaining its three-dimensional point cloud data, and then extracting geometric features from the point cloud data as the visual feature data to be detected.
[0079] Secondly, a normal feature model representing the appearance of normal products is constructed based on the normal visual feature data of motorcycle cylinder heads, and the normal feature model is maintained and updated during production according to the changes in normal visual feature data. When constructing the normal feature model, a large number of motorcycle cylinder head images from normal production batches can be pre-collected, and their visual feature data can be extracted as the initial training set. Using these data, clustering algorithms (such as K-means and DBSCAN) or manifold learning methods (such as Isomap and t-SNE) can be used to construct the normal feature model, grouping similar normal product features into different normal product feature groups. During production, new normal visual feature data of motorcycle cylinder heads can be continuously collected and compared with the existing normal feature model. If significant differences are found between the new normal data and the existing model, the model maintenance and update mechanism can be triggered. For example, incremental learning algorithms can be used to integrate new normal data into the existing model, or the model can be retrained periodically to ensure that the normal feature model can reflect the appearance changes of normal products in real time, such as normal fluctuations caused by production batches, environmental temperature, lighting conditions, etc.
[0080] Then, the visual feature data to be detected is compared with the pre-set normal product feature groups in the normal feature model to obtain a comparison result. In this step, the visual feature data to be detected can be input into the constructed normal feature model. The model calculates the similarity or distance between the visual feature data to be detected and each normal product feature group in the model. For example, the Euclidean distance between the visual feature data to be detected and the centroid of each normal product feature group can be calculated, or the local density in the feature space can be calculated. Through this comparison, a quantitative comparison result can be obtained, which can reflect the deviation of the product to be detected from the normal product features.
[0081] Finally, when the comparison result satisfies an abnormality determination condition, an abnormality pattern corresponding to the to-be-tested visual feature data is identified. The abnormality determination condition can be pre-set as a certain threshold value. For example, if the distance between the to-be-tested visual feature data and all normal product feature groups exceeds the pre-set distance threshold value, or the local density of the to-be-tested visual feature data in the feature space is lower than the pre-set density threshold value, it can be determined that the to-be-tested product is abnormal. Once it is determined to be abnormal, the system further analyzes the specific features of the to-be-tested visual feature data, and identifies the corresponding abnormality pattern in combination with the deviation mode of the to-be-tested visual feature data from the normal feature model. For example, if the deviation mainly reflects a texture abnormality in a certain specific area, it can be identified as "surface roughness"; if the deviation reflects a geometric shape abnormality of an edge, it can be identified as "edge deformation". This identification process can be assisted by a pre-set abnormality pattern library, or new abnormality patterns can be discovered through unsupervised learning methods for clustering analysis of abnormal data.
[0082] The motorcycle cylinder head production line quality detection method provided in the application is based on the principle of constructing a "normal feature model" that can dynamically adapt to changes in the production process, and defining and tracking the "normal" state of the product in real time based on the model, so as to effectively identify "abnormal" products that deviate significantly from the "normal" state, especially new unknown defects with variable morphology and uncertain characteristics. Specifically, the method first "obtains the to-be-detected visual feature data of the to-be-detected motorcycle cylinder head", which provides basic information for subsequent quality judgment. These data are digital representations of product appearance and are the starting point for comparison and analysis. Subsequently, "a normal feature model representing the appearance of normal products is constructed based on normal visual feature data of normal motorcycle cylinder heads, and the normal feature model is maintained and updated according to changes in the normal visual feature data during the production process", which is one of the core innovative points of the application. Traditional methods often rely on fixed defect models and are difficult to deal with unknown defects. However, this method continuously learns the visual feature data of normal products and constructs and dynamically maintains a "normal" boundary or distribution model. This means that even if the production process changes slightly, causing the appearance characteristics of normal products to drift, the model can be updated in time to ensure that its definition of "normal" is always accurate. This dynamic adaptability enables the system to distinguish between real defects and normal process fluctuations, avoiding false positives. Next, "the to-be-detected visual feature data is compared with the pre-set normal product feature group in the normal feature model to obtain a comparison result". This step is crucial for determining whether the product is abnormal. By comparing the features of the to-be-detected product with the dynamically updated normal model, the system can quantify the degree of deviation. This comparison is not just a simple match, but an evaluation of the product's position in the "normal" feature space. Finally, "when the comparison result meets the abnormal judgment condition, the abnormal mode corresponding to the to-be-detected visual feature data is identified". When the to-be-detected product deviates from the normal model by a pre-set abnormal threshold, the system marks it as abnormal. More importantly, this method not only determines whether it is abnormal, but also further "identifies" the abnormal mode. This means that the system can preliminarily classify the type of abnormality, providing valuable information for subsequent defect analysis and process improvement.
[0083] In another embodiment of the application, S2000 specifically includes:
[0084] S2100: a corresponding normal product feature group set is established for each pre-set environment state;
[0085] S2200: the current environment state of the production line where the motorcycle cylinder head to be detected is located is obtained;
[0086] S2300: a corresponding normal product feature group set is selected according to the current environment state;
[0087] S2400: maintain a normal product feature group set based on the normal visual feature data, and update the normal product feature group set according to changes in the normal visual feature data.
[0088] Specifically, a corresponding normal product feature group set is established for each preset environment state, which means that in the model construction stage, the system will define multiple environment states that may affect the visual features in advance, such as "strong light", "weak light", "normal temperature", "high temperature", "specific camera gain setting", etc. For each preset environment state, the system will collect a large amount of normal visual feature data of normal motorcycle cylinder heads produced under that specific environment, and build one or more feature groups representing the normal product appearance under that environment based on these data, forming a special normal product feature group set. Among them, obtaining the current environment state of the production line where the motorcycle cylinder head to be detected can be understood as obtaining the environmental parameters of the current production line in real time through sensors or other monitoring devices during actual production detection, such as the light intensity obtained by the light sensor, the environmental temperature obtained by the temperature sensor, the camera sensor gain obtained by the camera parameter reading module, etc. These parameters together constitute the current production line environment state. In actual application, the corresponding normal product feature group set is selected according to the current environment state, specifically, the system matches the real-time obtained current environment state with the preset environment state. For example, if the current production line environment is identified as "strong light" and "normal temperature", the system will automatically select the normal product feature group set established in advance for "strong light" and "normal temperature" environment as the reference for current detection. In addition, maintaining a normal product feature group set based on normal visual feature data and updating the normal product feature group set according to changes in the normal visual feature data means that after selecting the normal product feature group set under a specific environment, the system will continuously receive newly collected normal visual feature data of normal motorcycle cylinder heads under that environment. These new data will be used to dynamically maintain the normal product feature group set currently used, such as through incremental learning, clustering adjustment or model parameter optimization, etc., to ensure that the set can reflect the latest distribution and subtle changes of normal product features under the current environment in real time, thereby improving the adaptability and accuracy of the model.
[0089] The scheme of the present application effectively solves the problem of insufficient adaptability of a single normal feature model under a variable production environment by introducing the concept of an environment state and establishing independent normal product feature group set for different environment states. When the to-be-detected visual feature data of the to-be-detected motorcycle cylinder head is acquired, the system first identifies the current environment state in which it is located, and selects the most matched normal product feature group set for comparison accordingly. This dynamic model selection mechanism based on the environment state ensures that the to-be-detected data is always compared with normal data collected under similar environmental conditions, thereby avoiding misjudgment caused by environmental differences. At the same time, continuous maintenance and update of the selected normal product feature group set enable the model to adapt to long-term or short-term fluctuations in the production environment, further improving the robustness of detection.
[0090] In some preferred embodiments, the following is described by a specific example: assuming that a motorcycle cylinder head production line has two main light environment states, day and night, and two main temperature environment states, summer and winter. In the model construction stage, the system will establish normal product feature group sets corresponding to the four environment states of "day-summer", "day-winter", "night-summer" and "night-winter". In actual production detection, the system will acquire the current light intensity and environmental temperature in real time. For example, if it is currently daytime and the environmental temperature is high, the system will identify it as the "day-summer" environment state, and automatically select the normal product feature group set corresponding to "day-summer" as the comparison reference. Subsequently, the visual feature data of the newly collected normal motorcycle cylinder head will be used to maintain and update this "day-summer" feature group set. When a to-be-detected motorcycle cylinder head is detected, its to-be-detected visual feature data will be compared with the currently selected "day-summer" normal product feature group set, so as to more accurately judge whether it is abnormal. This mechanism of dynamically adapting to environmental changes enables the detection system to maintain high precision and high reliability under all-weather and all-season production conditions.
[0091] Specifically, in the motorcycle cylinder head production line quality detection method described above, S3000 comprises:
[0092] S3100: When the to-be-detected visual feature data is within the preset distance interval of the feature distance of any normal product feature group in the normal feature model, acquiring the normal density range of the normal product feature group corresponding to the to-be-detected visual feature data, and calculating the local feature density of the to-be-detected visual feature data in the feature space;
[0093] S3200: Comparing the local feature density with the normal density range to obtain a comparison result.
[0094] wherein the "feature distance" is a similarity measure between two feature data points in the feature space. For example, various distance metrics such as Euclidean distance, Mahalanobis distance, cosine similarity, etc. can be employed to calculate the distance between the visual feature data under test and each feature data point in the normal product feature group. The "preset distance interval" refers to a pre-defined distance range for determining whether the visual feature data under test is close enough to a certain normal product feature group to be considered as a potential member of the group. The interval can be determined based on historical data, expert experience or statistical analysis methods to ensure that the visual feature data under test related to the normal pattern can be effectively screened out.
[0095] The "normal density range" refers to the normal fluctuation interval of the feature data point density within a certain normal product feature group in the feature space. The range reflects the feature distribution characteristics of the normal product, which can be defined by the average, standard deviation or specific percentile of the feature density within the group. The "local feature density" refers to the data point density within a local neighborhood of the visual feature data under test in the feature space. The density value can reflect the typicality or abnormality of the data point under test in its own group. For example, the local feature density can be obtained by calculating the number of data points within a certain radius around the data point under test, or by kernel density estimation.
[0096] The scheme of the present application refines the traditional feature comparison method by introducing the concepts of feature distance, local feature density and normal density range. First, by calculating the feature distance between the visual feature data under test and the normal product feature group, it can be preliminarily determined whether the data under test belongs to a certain known normal product pattern. When the feature distance meets the preset condition, it indicates that the data under test has a certain similarity with a certain normal group, and further evaluation of its "typicality" in the feature space is needed.
[0097] Secondly, by obtaining the normal density range of the normal product feature group corresponding to the visual feature data under test, and calculating the local feature density of the visual feature data under test, it can more accurately evaluate whether the data under test deviates from the typical distribution of the normal product. The local feature density reflects the density of the data under test in its local neighborhood, while the normal density range provides the density benchmark of the normal product in this region. By comparing the local feature density with the normal density range, it can be determined whether the data under test is in the core region, edge region or completely deviates from the normal distribution of the normal product, thereby providing a more detailed basis for subsequent anomaly determination.
[0098] By the technical solution, the application can realize more refined comparison of the visual feature data in motorcycle cylinder head quality detection. Compared with the simple comparison based on feature distance, the comparison mode of local feature density and normal density range is introduced, so that the system can not only judge whether the to-be-detected product is similar to the known normal mode, but also further evaluate the "normal degree" of the to-be-detected product in the normal mode. This helps to distinguish data points whose local feature distribution is abnormal although they are not far from the normal mode, thereby effectively avoiding misjudgment, improving the accuracy and robustness of detection, and providing more reliable judgment basis, especially in the case of certain variability in the normal product or ambiguous boundary between the abnormal mode and the normal mode.
[0099] In another embodiment of the application, the sub-step S3100 of calculating the local feature density of the to-be-detected visual feature data in the feature space is further proposed, comprising:
[0100] S3121: determining the normal product feature group corresponding to the to-be-detected visual feature data;
[0101] S3122: determining the local search radius according to the internal dispersion degree of the normal product feature group;
[0102] S3123: within the range of the local search radius, counting the number of data points in the normal product feature group that have a feature distance not greater than the local search radius from the to-be-detected visual feature data;
[0103] S3124: taking the number of data points as the local feature density of the to-be-detected visual feature data in the feature space.
[0104] The determination of the normal product feature group corresponding to the to-be-detected visual feature data usually refers to finding the normal product feature group with the closest feature distance or satisfying a specific correlation condition from the to-be-detected visual feature data and the preset multiple normal product feature groups in the normal feature model after comparison. This step aims to classify the to-be-detected data into the most relevant normal product mode for subsequent targeted density analysis.
[0105] Further, the local search radius is determined according to the internal dispersion degree of the normal product feature group, which means that the search radius is not a fixed value, but is dynamically adjusted according to the tightness or sparseness of the distribution of the internal data of the specific normal product feature group. For example, if the data points of a normal product feature group are distributed more closely, the internal dispersion degree is lower, and a smaller local search radius can be determined to more accurately reflect the local density; on the contrary, if the data points are more dispersed, the internal dispersion degree is higher, and a larger local search radius can be determined to ensure that enough adjacent data points are covered, so as to obtain a more representative local density. The internal dispersion degree can be measured by calculating the variance, standard deviation or average feature distance of the data points in the group.
[0106] Within the range of the local search radius, the number of data points in the normal product feature group whose feature distance with the to-be-tested visual feature data is not greater than the local search radius is counted, that is, the to-be-tested visual feature data is taken as the center, the determined local search radius is taken as the limit, and all normal data points falling within the radius range are searched and counted in the normal product feature group. These data points are the "neighbors" of the to-be-tested data in the feature space, and the number of these data points directly reflects the density of the normal data points around the to-be-tested data. The calculation of the feature distance can use the Euclidean distance, Mahalanobis distance or other distance measurement methods suitable for visual feature data.
[0107] Finally, the number of data points is taken as the local feature density of the to-be-tested visual feature data in the feature space. This means that the more normal data points around the to-be-tested data, and the more these data points are concentrated in a smaller range, the higher the local feature density of the to-be-tested data, indicating that the to-be-tested data is closer to the core mode of the normal product; on the contrary, if there are fewer normal data points around or the normal data points are sparsely distributed, the local feature density is lower, which may indicate that the to-be-tested data deviates from the normal mode.
[0108] The scheme of the present application calculates the local feature density by dynamically determining the local search radius and counting the number of data points within the radius, which can more accurately quantify the local similarity or abnormality degree of the to-be-tested visual feature data in the feature space with the normal product feature group it belongs to. Specifically, by first determining the normal product feature group to which the to-be-tested data belongs, the contextual relevance of subsequent density calculation is ensured. Then, the local search radius is adaptively adjusted according to the internal dispersion degree of the normal product feature group, avoiding the errors that may be caused by a fixed radius: for dense areas, a small radius can capture local changes more finely; for sparse areas, a large radius can avoid the density estimation bias caused by insufficient samples. Thus, by counting the number of data points within the adaptive radius, the density of the normal samples around the to-be-tested data can be directly and effectively reflected, thereby providing a quantitative and robust indicator for subsequent anomaly determination. This density calculation method based on the number of data points in the local neighborhood can effectively capture the local characteristics of data distribution and has high sensitivity to abnormal points deviating from the normal mode.
[0109] Through the above technical solution, the present application can accurately calculate the local feature density of the to-be-tested visual feature data of the motorcycle cylinder head. Compared with the method of using a fixed search radius or simple global density calculation, the present application dynamically determines the local search radius according to the internal dispersion degree of the normal product feature group, so that the density calculation can better adapt to the inherent distribution characteristics of different normal product modes, improving the accuracy and robustness of local feature density estimation. Thus, in the subsequent anomaly determination, abnormal data that deviate from the normal product feature distribution in the local area can be more effectively identified, thereby improving the precision and reliability of motorcycle cylinder head production line quality detection and reducing the false positive rate and the false negative rate.
[0110] In another embodiment of the present application, it is further proposed that S3200 comprises:
[0111] S3210: Obtain the internal feature density distribution information of the normal product feature group corresponding to the to-be-tested visual feature data;
[0112] S3220: Determine the normal density range of the normal product feature group according to the internal feature density distribution information;
[0113] S3230: Compare the local feature density with the normal density range to obtain a comparison result.
[0114] The internal feature density distribution information reflects the distribution density of data points in the feature space within the normal product feature group. The normal density range is determined based on the obtained internal feature density distribution information, and one or more density intervals are delimited, which represent the typical density characteristics of the normal product. Comparing the local feature density with the normal density range determines whether the local feature density calculated from the to-be-tested visual feature data falls within the preset normal density interval, thereby determining whether it is a normal product.
[0115] The scheme of the present application can comprehensively understand the density characteristics of the normal samples in the group by first obtaining the internal feature density distribution information of the normal product feature group corresponding to the to-be-tested visual feature data. On this basis, the normal density range of the normal product feature group is determined according to the internal feature density distribution information, so that the definition of the normal range is more accurate and adaptive. Finally, comparing the local feature density of the to-be-tested visual feature data in the feature space with the accurately determined normal density range can more accurately determine whether the to-be-tested product deviates from the normal mode, thereby improving the accuracy of anomaly detection.
[0116] Through the above technical scheme, the present application can dynamically and accurately determine the normal density range based on the internal feature density distribution of the normal product feature group itself, avoiding the misjudgment that may be caused by using a fixed threshold or an empirical value. This method of adaptively determining the normal range based on data distribution makes the quality detection process more robust to product batch differences and environmental changes, effectively improving the accuracy and reliability of motorcycle cylinder cover production line quality detection.
[0117] In another embodiment of the present application, S3220 further includes:
[0118] S3221: analyzing the peak value position and peak value amplitude of the internal feature density distribution information, and screening a target peak value representing the main normal mode;
[0119] S3222: analyzing the valley value position and valley value amplitude of the internal feature density distribution information, and screening a target valley value representing the boundary of the normal mode;
[0120] S3223: determining the normal density range of the normal product feature group based on the density interval between the target peak value and the target valley value.
[0121] The internal feature density distribution information is usually obtained by performing kernel density estimation on the feature data in the normal product feature group corresponding to the normal visual feature data of the normal motorcycle cylinder head, which reflects the density distribution of the feature data in the feature space. The peak position and the peak amplitude refer to the position where the density value reaches a local maximum value and the corresponding density value on the density distribution curve. These peaks usually represent the main or typical appearance mode of the normal product. The target peaks representing the main normal mode are screened out to identify those normal modes that are dominant in quantity and have relatively concentrated feature distribution. The valley position and the valley amplitude refer to the position where the density value reaches a local minimum value and the corresponding density value on the density distribution curve. These valleys are usually located between different normal modes or at the boundary between the normal mode and the abnormal mode. The target valleys representing the boundary of the normal mode are screened out to accurately define the effective range of the normal product feature group and avoid misjudging normal fluctuations as abnormal. By identifying and utilizing these peaks and valleys, a density interval that can accurately reflect the feature distribution of the normal product, i.e., the normal density range, can be constructed.
[0122] The scheme of the present application can more accurately depict the actual distribution boundary of the normal product features in the feature space by performing fine analysis on the internal feature density distribution information, especially by identifying and utilizing the peaks and valleys thereof. Specifically, the peaks represent the core feature region of the normal product, and the valleys indicate the transition or boundary between these core regions. By comparing the local feature density of the to-be-tested visual feature data in the feature space with the normal density range determined based on the peaks and valleys, it can be effectively judged whether the to-be-tested product deviates from the typical feature distribution of the normal product. This judgment method based on density distribution characteristics enables the system to adapt to the subtle changes of the product in the normal production process while maintaining high sensitivity to real abnormal modes.
[0123] Through the above technical scheme, the limitations of simple threshold setting or fixed range judgment in traditional methods can be overcome, and the determination of the normal density range is more dynamic and accurate. This method can fully utilize the internal distribution law of the normal product feature data, effectively distinguish between normal fluctuations and actual defects, thereby significantly improving the accuracy and robustness of motorcycle cylinder head production line quality detection, reducing the false positive rate and the false negative rate, and further improving the overall production quality control level.
[0124] In another embodiment of the present application, S3221 further comprises:
[0125] S32211: identifying a plurality of local peaks in the internal feature density distribution information that satisfy the amplitude greater than the preset peak amplitude threshold;
[0126] S32212: extracting a corresponding data point set for each local peak;
[0127] S32213: Calculate the number of data points and its dispersion degree of each data point set;
[0128] S32214: According to the comprehensive judgment of the number of data points and dispersion degree, filter out the target peak value representing the main normal mode.
[0129] Among them, "identify multiple local peaks in internal feature density distribution information that meet the amplitude greater than the preset peak amplitude threshold" means that after kernel density estimation is performed on the normal visual feature data of the motorcycle cylinder head, the obtained internal feature density distribution information will present multiple high-density regions, which are represented as local peaks on the atlas. By setting a preset peak amplitude threshold, local peaks with small amplitudes that may be caused by noise or unimportant variations can be effectively filtered out, thereby focusing on significant peaks representing the main normal mode. "For each local peak, extract the corresponding data point set" means that the data points in the feature space region represented by each identified local peak are classified and collected. These data point sets represent the visual feature data of normal product samples gathered around a particular local peak. "Calculate the number of data points and its dispersion degree of each data point set" is to quantify the representativeness and stability of each local peak. The number of data points reflects the universality or sample size of the normal mode represented by the local peak, and the larger the number, the more common the mode. The dispersion degree reflects the tightness or variation range of the data points within the local peak, and the smaller the dispersion degree, the more stable and concentrated the mode.
[0130] "According to the comprehensive judgment of the number of data points and dispersion degree, filter out the target peak value representing the main normal mode" means making a decision based on the above two quantitative indicators. For example, local peaks with large number of data points and small dispersion degree can be preferentially selected as target peak values. This is because these peaks represent a large number of highly consistent normal product features, which can more accurately define the core appearance mode of normal products.
[0131] The scheme of the present application ensures that the identified target peak value can truly represent the main normal mode of the motorcycle cylinder head by fine screening of local peaks in the internal feature density distribution information. Traditional methods may only screen based on peak amplitude, which can easily misjudge some peaks with high amplitude but scattered internal data points or insufficient number as the main mode, resulting in inaccurate definition of the normal density range. The present application introduces two dimensions of data point number and dispersion degree to comprehensively evaluate each local peak, so that the selected target peak value is not only significant in density, but also representative in sample size and internal consistency. It is precisely due to this multi-dimensional and comprehensive judgment that the subsequent determination of the normal density range is more accurate and robust.
[0132] By the above technical solution, the target peak value representing the main normal mode in the motorcycle cylinder head production line can be more accurately and robustly identified. This helps to avoid misjudging atypical normal fluctuations or noise as the core normal mode, thereby improving the accuracy and stability of the normal feature model. As a result, in the subsequent comparison and abnormality determination link, the false positive rate and false negative rate can be significantly reduced, and the overall precision and reliability of the motorcycle cylinder head production line quality detection are improved.
[0133] Further, 3222 comprises:
[0134] 32221: identify a plurality of local valley values in the internal feature density distribution information that satisfy an amplitude less than a preset valley value amplitude threshold;
[0135] 32222: for each local valley value, determine the density rising region on both sides thereof;
[0136] 32223: calculate the average density value of the density rising region on both sides thereof;
[0137] 32224: calculate the density difference between the density of the valley position and the average density value;
[0138] 32225: according to the average density value and the density difference, comprehensively judge and filter out the target valley value representing the normal mode boundary.
[0139] Among them, identifying a plurality of local valley values in the internal feature density distribution information that satisfy an amplitude less than a preset valley value amplitude threshold means that after kernel density estimation is performed on the normal visual feature data of the motorcycle cylinder head, a preset valley value amplitude threshold is set to preliminarily filter out the regions with lower density values in the obtained internal feature density distribution information. These regions may represent the transition or boundary between different normal modes. The local valley value means that on the density curve, the density values on both sides of the point are higher than the density value of the point, and the amplitude (i.e. the density value) is lower than the preset valley value amplitude threshold, so as to exclude the slight fluctuations caused by data sparseness or noise.
[0140] Further, for each of the above local valley values, the density rising region on both sides thereof is determined, which means extending from the local valley value point to both sides thereof until the region where the density value starts to rise continuously. These regions reflect the density change trend from the valley bottom to the center region of the normal mode on both sides.
[0141] Therefore, calculating the average density value of the density rising region on both sides thereof is to quantify the overall density level on both sides of the local valley value, which helps to evaluate whether the valley value is truly between two significant normal modes.
[0142] Subsequently, a density difference between the density of the valley position and the average density value is calculated, which reflects the depth of the valley bottom, i.e. the density difference between the valley point and the normal mode area on both sides. A larger density difference usually means that the valley is more likely to be a real mode boundary.
[0143] Finally, according to the comprehensive judgment of the average density value and the density difference, the target valley value representing the normal mode boundary is screened out. This means that when judging whether a local valley value is an effective boundary, not only the density low point of the local valley value itself is considered, but also the density level on both sides of the local valley value and the depth of the valley bottom are considered. For example, a rule can be set that when the average density value is higher than a certain threshold and the density difference is greater than a certain threshold, the local valley value is confirmed as the target valley value, so as to ensure that the screened-out valley value can accurately divide different normal product feature groups and avoid misjudging noise or insignificant density drop as a mode boundary.
[0144] The scheme of the present application can more accurately identify the valley value in the internal feature density distribution information and screen out the target valley value representing the normal mode boundary through the above steps. The traditional method may only rely on simple valley value detection and is easily affected by noise or data fluctuations, leading to misjudgment of the mode boundary. By introducing analysis of the density rising area on both sides of the valley value and calculating the average density value and the density difference, the significance of the valley value can be comprehensively evaluated. For example, a real mode boundary usually has a large valley depth and relatively high density levels on both sides, which indicates that the valley value indeed separates two or more normal product feature groups with high density. This comprehensive judgment mechanism effectively improves the accuracy and robustness of valley value screening, ensuring that the determination of the normal density range is more reliable.
[0145] Through the above technical scheme, it can be effectively avoided that insignificant density drop or noise-induced fluctuations are misjudged as normal mode boundaries, thereby improving the accuracy of determining the normal density range of the normal product feature group. This makes the comparison of the to-be-tested visual feature data with the normal density range more accurate, reduces the false positive rate and the false negative rate, and improves the overall reliability and efficiency of motorcycle cylinder cover production line quality detection. Especially in the face of complex and variable production environment and subtle differences in product appearance, the method can more stably identify real abnormalities, providing a more solid foundation for production line quality control.
[0146] For this, the present application further proposes that the above S3210 comprises:
[0147] S3211: acquiring a production line environment parameter when the to-be-tested visual feature data is collected, the production line environment parameter comprising illumination intensity, environment temperature, camera sensor gain and production batch identifier;
[0148] S3212: Perform environment correction processing on the feature data within the normal product feature group based on the production line environment parameters. The environment correction processing includes weighting correction or normalization of the feature data based on the production line environment parameters, to reduce the influence of non-defect environment changes on the internal feature density distribution information.
[0149] S3213: After completing the environment correction processing, perform kernel density estimation on the corrected feature data to obtain the internal feature density distribution information.
[0150] Specifically, the production line environment parameters refer to external or internal conditions that affect the performance of visual features during the collection of visual feature data. These parameters can include but are not limited to illumination intensity, environmental temperature, camera sensor gain, and production batch identification. Illumination intensity can affect image brightness, contrast, and shadows, environmental temperature can cause minor changes in device performance or material properties, camera sensor gain directly affects image signal strength and noise level, and production batch identification helps to distinguish inherent minor differences that may exist in different batches of products. The acquisition of these parameters can be achieved by deploying corresponding sensors on the production line or reading data from the production management system, with the purpose of providing necessary basis for subsequent environment correction processing.
[0151] Among them, the environment correction processing aims to eliminate or reduce the influence of non-defect environment changes on visual feature data. This processing can be specifically implemented by weighting correction or normalization of the feature data within the normal product feature group. Weighted correction can give different weights to feature data according to the degree of change in environmental parameters, to weaken the deviation caused by environmental factors; normalization processing can map feature data under different environmental conditions to a unified scale or distribution, thereby eliminating environmental differences. For example, when the illumination intensity changes, the brightness or contrast of the image pixel value can be adjusted to compensate for this change. When the camera sensor gain changes, the image data can be scaled or offset accordingly to correct. In this way, the analyzed feature data can more truly reflect the inherent characteristics of the product, rather than the interference of environmental factors.
[0152] After completing the environment correction processing, perform kernel density estimation on the corrected feature data. Kernel density estimation is a non-parametric density estimation method used to estimate the probability density function of a random variable. By performing kernel density estimation on the corrected feature data, more accurate and representative internal feature density distribution information can be obtained, which can reflect the distribution law of normal products in different feature dimensions, providing a reliable basis for subsequent normal density range determination.
[0153] The scheme of the present application effectively solves the problem of interference of environmental changes on visual feature data in traditional methods by introducing line environment parameters and performing environmental correction processing. Specifically, first, line environment parameters synchronized with visual feature data collection are obtained, which can quantify external factors affecting visual performance. Subsequently, based on these environmental parameters, fine environmental correction processing is performed on the feature data in the original normal product feature group, such as using weighting correction or normalization techniques, to unify the feature data under different environmental conditions to a comparable benchmark. It is precisely because of this preprocessing that the feature data used in subsequent kernel density estimation can more purely reflect the inherent quality characteristics of the product rather than environmental noise. Thus, the obtained internal feature density distribution information can more accurately depict the real distribution pattern of normal products, avoiding misjudgment or missed judgment due to environmental fluctuations, thereby significantly improving the accuracy and robustness of quality detection.
[0154] Through the above technical scheme, the present application can effectively reduce the influence of non-defect type environmental changes on the visual feature data of the motorcycle cylinder head, so that the obtained internal feature density distribution information is more accurate and stable. This directly improves the representativeness of the normal product feature group and ensures the reliability of subsequent normal density range determination. Compared with detection methods that do not consider environmental factors, the present application can significantly reduce false positives caused by non-product defect factors such as lighting, temperature, camera settings, or batch differences, improving the accuracy and efficiency of quality detection, thereby providing a more reliable and intelligent solution for line quality control of motorcycle cylinder heads.
[0155] In some preferred embodiments, the following is described by a specific example:
[0156] Suppose in the production line of motorcycle cylinder heads, the lighting intensity and environmental temperature will change significantly when the visual detection system operates at different time periods or in different seasons. For example, the lighting is sufficient during the day, weak at night or on cloudy days; the environmental temperature is higher in summer and lower in winter. These environmental changes will make normal cylinder heads appear different brightness, contrast or texture details in images, thereby affecting the performance of their visual feature data.
[0157] To solve this problem, the detection method of the present application synchronously acquires the current lighting intensity and environmental temperature when collecting the visual feature data to be detected. For example, lighting sensors and temperature sensors can be installed near the detection station to achieve this. When the system detects that the lighting intensity is below a certain threshold, the collected image data can be subjected to weighting correction processing for brightness compensation; when the environmental temperature exceeds the normal range, some features that are more affected by temperature (such as metal reflection characteristics) can be subjected to normalization processing.
[0158] Specifically, assume that a certain feature dimension represents the average brightness of the image. When the light intensity is L1, the average brightness range of the normal product is [B1_min, B1_max]; when the light intensity is L2, the average brightness range of the normal product is [B2_min, B2_max]. Through the environmental correction process, the brightness value under the L2 condition can be adjusted by a correction coefficient K (for example, K = (B1_avg / B2_avg)) to map it to the brightness range under the L1 condition, thereby eliminating the influence of light differences. Among them, B1_min, B1_max: the average brightness fluctuation range of the normal product under the light intensity L1. B2_min, B2_max: the average brightness fluctuation range of the normal product under the light intensity L2. B1_avg: the average brightness mean value of the normal product under the light intensity L1 condition. B2_avg: the average brightness mean value of the normal product under the light intensity L2 condition.
[0159] After completing these environmental correction processes, kernel density estimation is performed on the corrected feature data set, thereby obtaining an internal feature density distribution information that is not disturbed by environmental changes and more truly reflects the appearance characteristics of the normal product. For example, through kernel density estimation, a smooth probability density curve can be obtained, and the peak and valley values of the curve can more accurately indicate the core area and boundary of the normal mode. Therefore, when the local feature density of the new cylinder head to be measured is calculated, it is compared with the normal density range obtained after environmental correction, which can more accurately determine whether the cylinder head is an abnormal product, avoiding false judgments caused by environmental factors.
[0160] Reference Figure 2 The specific embodiments of the present application also disclose a motorcycle cylinder head production line quality detection system, comprising:
[0161] A data acquisition module 1 is configured to acquire to-be-detected visual feature data of a to-be-detected motorcycle cylinder head.
[0162] A model construction and maintenance module 2 is configured to construct a normal feature model representing the appearance of a normal product based on normal visual feature data of a normal motorcycle cylinder head, and to maintain and update the normal feature model according to changes in the normal visual feature data during the production process.
[0163] A comparison module 3 is configured to compare the to-be-detected visual feature data with a preset normal product feature group in the normal feature model to obtain a comparison result.
[0164] An abnormality determination module 4 is configured to identify an abnormal mode corresponding to the to-be-detected visual feature data when the comparison result meets an abnormality determination condition.
[0165] The system aims to realize intelligent detection of motorcycle cylinder head production line quality in a modular manner, effectively solving the problem of insufficient recognition ability of traditional detection systems when facing new unknown defects. The data acquisition module collects product visual information, the model construction and maintenance module 2 dynamically learns and updates normal product features, the comparison module 3 compares real-time data with normal models, and finally the abnormality determination module 4 identifies abnormal products. This systematic design ensures the automation, intelligence and robustness of the detection process, significantly improving the accuracy and efficiency of production line quality detection.
[0166] The motorcycle cylinder head production line quality detection system proposed in this application is based on the cooperative work of various functional modules to achieve accurate judgment of product quality.
[0167] The data acquisition module 1 is used to acquire the visual feature data of the motorcycle cylinder head to be detected. The specific method of acquiring the visual feature data has been described in the above embodiments and will not be repeated here. It should be emphasized that the data acquisition module 1 can be composed of various hardware and software components. For example, it can be one or more industrial cameras combined with image acquisition cards for shooting surface images of the cylinder head; it can also be a three-dimensional scanner for acquiring three-dimensional point cloud data of the cylinder head. In addition, the data acquisition module 1 can also include an image preprocessing unit for denoising, enhancing, etc. of the original image data, and a feature extraction unit for converting image or point cloud data into numerical visual feature data. In actual application, the configuration of the data acquisition module 1 should be optimized according to the production line environment, detection accuracy requirements and the type of features to be detected.
[0168] The model construction and maintenance module 2 is used to construct a normal feature model representing the appearance of normal products based on normal visual feature data of normal motorcycle cylinder heads, and to maintain and update the normal feature model according to changes in normal visual feature data during production. The specific method of constructing and maintaining the normal feature model has been described in the above embodiments and will not be repeated here. It should be emphasized that this module can be a separate server or high-performance computing unit, which runs machine learning algorithms and database management systems internally. For example, a software program based on clustering algorithms (such as K-means, DBSCAN) can be used to construct an initial normal feature model, and the model can be maintained and updated through incremental learning or regular retraining mechanism. This module needs to have strong data processing and storage capabilities to process a large amount of normal visual feature data and be able to respond to changes in normal product features in real time during production, ensuring the timeliness and accuracy of the normal feature model.
[0169] The comparison module 3 is used to compare the to-be-tested visual feature data with the preset normal product feature group in the normal feature model to obtain a comparison result. The specific method of comparing the to-be-tested visual feature data with the normal feature group has been described in the above embodiments, and will not be repeated here. It should be emphasized that the comparison module 3 can be a separate processor or software service, and its function is to perform feature distance calculation or density evaluation operations. For example, the module can implement various distance measurement algorithms such as Euclidean distance, cosine similarity, or implement local feature density calculation algorithms. The comparison module 3 needs to interact with the model construction and maintenance module 2 to obtain the latest normal feature model information, and can quickly compare the to-be-tested visual feature data and output a quantitative comparison result, providing a basis for subsequent anomaly determination.
[0170] The anomaly determination module 4 is used to identify the anomaly mode corresponding to the to-be-tested visual feature data when the comparison result meets the anomaly determination condition. The specific method of anomaly determination has been described in the above embodiments, and will not be repeated here. It should be emphasized that the anomaly determination module 4 can be a separate decision unit or software program, which internally presets anomaly determination logic and threshold values. For example, the module can compare the distance value or density value output by the comparison module 3 with the preset anomaly threshold value to determine whether the to-be-tested product is abnormal. Once it is determined to be abnormal, the module can further call anomaly mode recognition algorithms, such as clustering analysis or classifier-based methods, to analyze the abnormal data, identify the specific anomaly mode, and send the anomaly information to the production line control system or operator interface for subsequent processing.
[0171] The above only describes the embodiments of the present application and does not limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method of quality detection of a motorcycle cylinder head production line, characterized in that, The method comprises the following steps: acquiring to-be-detected visual feature data of a to-be-detected motorcycle cylinder head; constructing a normal feature model representing a normal product appearance based on normal visual feature data of a normal motorcycle cylinder head, and maintaining and updating the normal feature model according to changes in the normal visual feature data during production; comparing the to-be-detected visual feature data with a preset normal product feature group in the normal feature model to obtain a comparison result; when the comparison result meets an abnormality judgment condition, identifying an abnormality mode corresponding to the to-be-detected visual feature data; the step of comparing the to-be-detected visual feature data with the preset normal product feature group in the normal feature model to obtain a comparison result comprises the following steps: when a feature distance between the to-be-detected visual feature data and any normal product feature group in the normal feature model is within a preset distance interval, acquiring a normal density range of the normal product feature group corresponding to the to-be-detected visual feature data, and calculating a local feature density of the to-be-detected visual feature data in a feature space; comparing the local feature density with the normal density range to obtain a comparison result; the step of calculating the local feature density of the to-be-detected visual feature data in the feature space comprises the following steps: determining a normal product feature group corresponding to the to-be-detected visual feature data; determining a local search radius according to an internal dispersion degree of the normal product feature group; within the range of the local search radius, counting a number of data points in the normal product feature group that have a feature distance not greater than the local search radius from the to-be-detected visual feature data; taking the number of data points as the local feature density of the to-be-detected visual feature data in the feature space; the step of comparing the local feature density with the normal density range to obtain a comparison result comprises the following steps: acquiring internal feature density distribution information of the normal product feature group corresponding to the to-be-detected visual feature data; determining a normal density range of the normal product feature group according to the internal feature density distribution information; comparing the local feature density with the normal density range to obtain a comparison result.
2. The motorcycle cylinder head line quality detection method of claim 1, wherein, the step of constructing a normal feature model representing a normal product appearance based on normal visual feature data of a normal motorcycle cylinder head, and maintaining and updating the normal feature model according to changes in the normal visual feature data during production comprises the following steps: establishing a corresponding normal product feature group set for each preset environment state; acquiring a current environment state of a production line where the to-be-detected motorcycle cylinder head is located; selecting a corresponding normal product feature group set according to the current environment state; maintaining the normal product feature group set based on the normal visual feature data, and updating the normal product feature group set according to changes in the normal visual feature data.
3. The motorcycle cylinder head production line quality detection method of claim 1, wherein, the step of determining a normal density range of the normal product feature group according to the internal feature density distribution information comprises the following steps: analyzing a peak position and a peak amplitude of the internal feature density distribution information, and screening a target peak representing a main normal mode; analyzing the peak position and the peak amplitude of the internal feature density distribution information, and screening a target peak value representing a main normal mode, comprises: identifying a plurality of local peak values in the internal feature density distribution information that satisfy an amplitude greater than a preset peak amplitude threshold value; 4. The motorcycle cylinder head line quality detection method of claim 3, wherein, for each of the local peak values, extracting a corresponding data point set; calculating the number of data points and the dispersion degree of each of the data point sets; comprehensively judging the number of data points and the dispersion degree to screen a target peak value representing a main normal mode. The analysis of the valley position and the valley amplitude of the internal feature density distribution information, and the screening of a target valley value representing the boundary of the normal mode, comprises: identifying a plurality of local valley values in the internal feature density distribution information that satisfy an amplitude less than a preset valley amplitude threshold value; 5. The motorcycle cylinder head production line quality detection method of claim 3, wherein, for each of the local valley values, determining the density rising region on both sides thereof; calculating the average density value of the density rising region on both sides thereof; calculating the density difference between the density of the valley position and the average density value; comprehensively judging the average density value and the density difference to screen a target valley value representing the boundary of the normal mode. The obtaining of the internal feature density distribution information of the normal product feature group corresponding to the to-be-tested visual feature data comprises: obtaining the production line environment parameters at the time of collecting the to-be-tested visual feature data, the production line environment parameters including illumination intensity, environmental temperature, camera sensor gain and production batch identifier; 6. The motorcycle cylinder head production line quality detection method of claim 1, wherein, based on the production line environment parameters, performing environment correction processing on the feature data in the normal product feature group, the environment correction processing including weighting correction or normalization of the feature data based on the production line environment parameters, reducing the influence of non-defect environment changes on the internal feature density distribution information; after completing the environment correction processing, performing kernel density estimation on the corrected feature data to obtain the internal feature density distribution information. comprises: a data acquisition module configured to acquire to-be-tested visual feature data of a motorcycle cylinder head to be tested; 7. A motorcycle cylinder head production line quality detection system characterized by, a model construction and maintenance module configured to construct a normal feature model representing a normal product appearance based on normal visual feature data of a normal motorcycle cylinder head, and to maintain and update the normal feature model according to changes in the normal visual feature data during production; a comparison module configured to compare the to-be-tested visual feature data with a preset normal product feature group in the normal feature model, and to obtain a comparison result; an abnormality determination module configured to identify an abnormal mode corresponding to the to-be-tested visual feature data when the comparison result satisfies an abnormality determination condition. The comparison module is further configured to: when the feature distance between the to-be-tested visual feature data and any normal product feature group in the normal feature model is within a preset distance interval, acquire a normal density range of the normal product feature group corresponding to the to-be-tested visual feature data, and calculate a local feature density of the to-be-tested visual feature data in a feature space; compare the local feature density with the normal density range, and obtain a comparison result; The calculation of the local feature density of the to-be-tested visual feature data in the feature space comprises: determining the normal product feature group corresponding to the to-be-tested visual feature data; determining a local search radius according to an internal dispersion degree of the normal product feature group; within the local search radius, counting a number of data points in the normal product feature group that have a feature distance not greater than the local search radius from the to-be-tested visual feature data; taking the number of data points as the local feature density of the to-be-tested visual feature data in the feature space; The comparison of the local feature density with the normal density range to obtain a comparison result comprises: acquiring internal feature density distribution information of the normal product feature group corresponding to the to-be-tested visual feature data; determining a normal density range of the normal product feature group according to the internal feature density distribution information; comparing the local feature density with the normal density range to obtain a comparison result.
Citation Information
Patent Citations
Appearance detection and defect judgment system and method for automobile engine cylinder cover based on machine vision, storage medium and computer program product
CN120009281A
Wood board surface defect detection method and system based on industrial vision
CN120471896A