Motorcycle cylinder cover production line quality detection method and system
By constructing and dynamically maintaining a normal feature model of motorcycle cylinder heads, the problem of identifying unknown defects caused by changes in production processes was solved, achieving efficient quality inspection, reducing the risk of misjudgment, and improving the accuracy and stability of inspection.
Patent Information
- Application Number
- CN202511254449.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-04
AI Technical Summary
The existing motorcycle cylinder head quality inspection system has difficulty identifying new unknown defects with diverse shapes and uncertain characteristics after changes in the production process, leading to product quality risks and production efficiency problems.
Construct and dynamically maintain a normal feature model based on normal visual feature data. By comparing the test data with the normal product feature groups in the model, identify abnormal patterns and adapt to changes in the production environment.
It improves the ability to identify new unknown defects, reduces product quality risks and production efficiency issues, and improves the accuracy and robustness of detection.
Smart Images

Figure CN120806738A_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 relies heavily 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 misclassify these new defects as qualified products, resulting in products with serious quality problems entering the market. If only new defect samples are collected and the model is retrained, the response will be delayed, and because the new defects themselves 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 rates.
[0006] In view of 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: In a first aspect, the application discloses a motorcycle cylinder head production line quality detection method, comprising: Obtaining the to-be-detected visual feature data of the to-be-detected motorcycle cylinder head; Building a normal feature model representing the appearance of a normal product 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 the production process; 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 the abnormality determination condition, identifying the abnormal mode corresponding to the to-be-detected visual feature data.
[0009] Through the technical solution, the application can effectively identify unknown defects that cannot be found by traditional methods by building 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.
[0010] 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 built 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: A corresponding normal product feature group set is established for each preset environment state; Obtaining the current environment state of the production line where the to-be-detected motorcycle cylinder head is located; Selecting the 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.
[0011] By the technical solution, the application establishes independent normal product feature group set for different environment states, and dynamically selects and maintains according to the current environment state, effectively deals with the influence of changes of factors such as light and temperature in the production environment on the visual feature data, improves the adaptability of the model to environmental changes, and thus makes the detection result more stable and reliable.
[0012] 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: 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. The local feature density is compared with the normal density range to obtain a comparison result.
[0013] By the technical solution, the application introduces the concepts of local feature density and normal density range, and compares them, which can more finely evaluate the "normal" degree of the to-be-tested data in the normal product feature group, effectively distinguish potential defects that are not far from the normal sample but have abnormal local density, and improve the detection sensitivity to subtle abnormalities.
[0014] 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: Determining the normal product feature group corresponding to the to-be-tested visual feature data; Determining the local search radius according to the internal dispersion degree of the normal product feature group; 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. The number of data points is taken as the local feature density of the to-be-tested visual feature data in the feature space.
[0015] By the technical solution, the application dynamically adjusts the local search radius 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 misjudgment caused by a fixed radius, and improving the accuracy of the local density calculation.
[0016] Further, the local feature density is compared with the normal density range to obtain a comparison result, including: Obtaining internal feature density distribution information of the normal product feature group corresponding to the to-be-tested visual feature data; determine a normal density range of the normal product feature group according to the internal feature density distribution information; compare the local feature density with the normal density range to obtain a comparison result.
[0017] By this technical solution, the internal feature density distribution information of the normal product feature group is acquired and analyzed, the density range of "normal" can be more accurately defined, the abnormality determination is more scientific and objective, and the limitations of subjective threshold setting are avoided.
[0018] Further, the determination of the normal density range of the normal product feature group according to the internal feature density distribution information comprises: analyze the peak position and peak amplitude of the internal feature density distribution information, and screen a target peak value representing the main normal mode; analyze the valley position and valley amplitude of the internal feature density distribution information, and screen a target valley value representing the boundary of the normal mode; determine 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.
[0019] By this technical solution, the peak and valley of the internal feature density distribution information are analyzed, the core area and 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.
[0020] Further, the analysis of the peak position and peak amplitude of the internal feature density distribution information, and the screening of the target peak value representing the main normal mode, comprises: identify a plurality of local peak values in the internal feature density distribution information that satisfy an amplitude greater than a preset peak value amplitude threshold; for each local peak value, extract a corresponding data point set; calculate the number of data points and the dispersion degree of each data point set; comprehensively judge according to the number of data points and the dispersion degree, and screen the target peak value representing the main normal mode.
[0021] By this technical solution, the target peak value is screened by comprehensively considering the number of data points and the dispersion degree, the peak value that truly represents the main normal mode can be more accurately identified, the misjudgment caused by noise or secondary mode is avoided, and the definition of the normal mode is more accurate.
[0022] Further, the analysis of the valley position and valley amplitude of the internal feature density distribution information, and the screening of the target valley value representing the boundary of the normal mode, comprises: 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; For each local valley, determine the density rising area on both sides thereof; Calculate the average density value of the density rising area on both sides thereof; Calculate the density difference between the density of the valley position and the average density value; 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.
[0023] Through the technical scheme, the valley value representing the normal mode boundary can be more accurately identified by comprehensively considering the valley value amplitude, the average density value of the density rising area on both sides thereof, and the density difference, so that the boundaries of normal and abnormal are more accurately delimited, and the accuracy of abnormal determination is improved.
[0024] 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: Obtain the production line environment parameters when the to-be-tested visual feature data is collected, the production line environment parameters including illumination intensity, environmental temperature, camera sensor gain and production batch identifier; Perform environment correction processing on the feature data in the normal product feature group based on the production line environment parameters, the environment correction processing including 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; After completing the environment correction processing, perform kernel density estimation on the corrected feature data to obtain the internal feature density distribution information.
[0025] Through the technical scheme, the influence of non-defect environment changes on the feature data is effectively reduced by introducing the production line environment parameters and performing environment correction processing, so that the internal feature density distribution information more truly reflects the characteristics of the product itself, thereby improving the accuracy and stability of detection.
[0026] In a second aspect, the application also discloses a motorcycle cylinder cover production line quality detection system, comprising: A data acquisition module is configured to acquire to-be-tested visual feature data of a to-be-tested motorcycle cylinder cover; A model construction and maintenance module is configured to construct a normal feature model representing a normal product appearance based on normal visual feature data of a normal motorcycle cylinder cover, and to maintain and update the normal feature model according to changes in the normal visual feature data during production; A comparison module is configured to compare the to-be-tested visual feature data with a preset normal product feature group in the normal feature model to obtain a comparison result; An abnormality determination module is configured to identify an abnormal mode corresponding to the to-be-tested visual feature data when the comparison result meets an abnormality determination condition.
[0027] Through the technical scheme, the motorcycle cylinder head production line quality detection method is systematically deployed through the modular design, and each module cooperates to efficiently and accurately complete the quality detection task, thereby providing reliable hardware and software support for actual production application.
[0028] Advantages 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 a normal product appearance based on normal visual feature data of a normal motorcycle cylinder head, wherein the model is maintained and updated according to changes in the normal visual feature data during 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 makes the application able to effectively solve the problem that a traditional system based on known defect mode recognition is difficult to effectively identify when a new unknown defect with variable morphology and uncertain characteristics appears due to 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 misjudgment of the new unknown defect as a qualified product, thereby significantly reducing the product quality risk and production efficiency problem, and improving the robustness and accuracy of detection. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 A flowchart of a motorcycle cylinder head production line quality detection method provided by the application is shown in the figure.
[0030] Figure 2 A program block diagram of a motorcycle cylinder head production line quality detection system provided by the application is shown in the figure.
[0031] In the figure: 1, data acquisition module; 2, model construction and maintenance module; 3, comparison module; 4, abnormality determination module. DETAILED DESCRIPTION
[0032] The technical solutions in the present application will be described clearly and completely in the present application in combination with the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0033] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to 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.
[0034] Referring to Figure 1 The present application proposes a motorcycle cylinder head production line quality detection method, comprising: S1000: acquiring to-be-detected visual feature data of a to-be-detected motorcycle cylinder head; S2000: 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 in the production process; S3000: 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; S4000: identifying an abnormal mode corresponding to the to-be-detected visual feature data when the comparison result meets an abnormality judgment condition.
[0035] Wherein, "visual feature data" refers to the numerical information obtained by pre-processing and feature extraction of the motorcycle cylinder head surface image acquired by the image acquisition device (such as industrial camera), which can represent the texture, color, geometric shape and other visual characteristics of the cylinder head. "Normal feature model" is a dynamic model that can reflect the distribution of normal product appearance characteristics. 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, which represents the visual feature set of normal products under certain production conditions or in a certain batch. "Abnormal judgment condition" is a logical rule or threshold used to judge whether the product to be tested is abnormal. When the difference between the visual feature data of the product to be tested and the normal feature model reaches or exceeds the condition, it is judged to be abnormal. This method is mainly applied to the automatic production line of motorcycle cylinder head. 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.
[0036] In the motorcycle cylinder head production line quality detection process, the first step is to obtain the visual feature data of the motorcycle cylinder head to be tested. This can be achieved in several ways. For example, a high-resolution industrial camera can be used to take multiple-angle photos of the motorcycle cylinder head to be tested to obtain its surface images. Subsequently, these image data will be transmitted to the image processing unit, and through image preprocessing (such as denoising, enhancement) and feature extraction algorithms (such as SIFT, SURF, deep learning feature extraction, etc.), the numerical visual feature data of the motorcycle cylinder head to be tested will be obtained. Another way is to use a three-dimensional scanner to scan the motorcycle cylinder head to be tested, directly obtain its three-dimensional point cloud data, and then extract geometric features from the point cloud data as the visual feature data of the motorcycle cylinder head to be tested.
[0037] Secondly, a normal feature model representing the appearance of normal products is constructed based on the normal visual feature data of normal motorcycle cylinder heads, and the normal feature model is maintained and updated during production according to the changes in the normal visual feature data. When constructing the normal feature model, a large number of motorcycle cylinder head images of normal production batches can be pre-collected, and their visual feature data can be extracted as an initial training set. Using these data, clustering algorithms (such as K-means, DBSCAN) or manifold learning methods (such as Isomap, t-SNE) can be used to construct the normal feature model, and similar normal product features are grouped into different normal product feature groups. During production, new normal motorcycle cylinder head visual feature data 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.
[0038] Next, the to-be-tested visual feature data is compared with the pre-set normal product feature groups in the normal feature model to obtain a comparison result. In this step, the to-be-tested visual feature data obtained can be input into the normal feature model that has been constructed. The model will calculate the similarity or distance between the to-be-tested visual feature data and each normal product feature group in the model. For example, the Euclidean distance between the to-be-tested visual feature data 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 degree of deviation of the to-be-tested product from the normal product features.
[0039] Finally, when the comparison result meets the abnormality determination condition, the abnormal 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 in the feature space is lower than the pre-set density threshold value, the to-be-tested product can be determined as abnormal. Once determined as abnormal, the system will further analyze the specific features of the to-be-tested visual feature data and identify the corresponding abnormal pattern in combination with its deviation from the normal feature model. For example, if the deviation mainly manifests as texture abnormalities in a certain area, it can be identified as "surface roughness"; if the deviation manifests as geometric shape abnormalities in an edge, it can be identified as "edge deformation". This identification process can be assisted by a pre-set abnormal pattern library, or new abnormal patterns can be discovered through unsupervised learning methods for clustering analysis of abnormal data.
[0040] The motorcycle cylinder head production line quality detection method proposed in the present application is based on the construction of a "normal feature model" that can dynamically adapt to changes in the production process, and based on this model, the "normal" state of the product is accurately defined and tracked in real time, so as to effectively identify "abnormal" products that deviate significantly from the "normal" state, especially those 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 the digital representation of the product appearance and the starting point for comparison and analysis. Subsequently, "a normal feature model representing the appearance of normal products is constructed based on the normal visual feature data of normal motorcycle cylinder heads, and the normal feature model is maintained and updated according to the changes in the normal visual feature data during the production process", which is one of the core innovative points of the present 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 will mark 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.
[0041] In another embodiment of the present application, S2000 specifically includes: S2100: a corresponding normal product feature group set is established for each pre-set environment state; S2200: the current environment state of the production line where the motorcycle cylinder head to be detected is located is obtained; S2300: the corresponding normal product feature group set is selected according to the current environment state; 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.
[0042] 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 feature 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 this specific environment, and build one or more feature groups representing the normal product appearance under this environment state 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 this 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 this 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.
[0043] 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 the to-be-detected visual feature data is located, and then selects the most matched normal product feature group set for comparison according to the current environment state. 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 environment conditions, thereby avoiding misjudgment caused by environment 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.
[0044] 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, namely day and night, and two main temperature environment states, namely 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 the "day-summer" environment state 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 the 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.
[0045] Specifically, in the motorcycle cylinder head production line quality detection method described above, S3000 includes: 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; S3200: Comparing the local feature density with the normal density range to obtain a comparison result.
[0046] Here, "feature distance" is a measure of similarity between two feature data points in feature space. For example, various distance metrics, such as Euclidean distance, Mahalanobis distance, and cosine similarity, can be used to calculate the distance between the visual feature data to be tested and each feature data point in a normal product feature group. A "preset distance interval" refers to a pre-set distance range used to determine whether the visual feature data to be tested is sufficiently close to a certain normal product feature group to be considered a potential member of that group. This interval can be determined based on historical data, expert experience, or statistical analysis methods to ensure that test data related to normal patterns can be effectively screened out.
[0047] "Normal density range" refers to the normal fluctuation range of the density of feature data points within a normal product feature group in the feature space. This range reflects the characteristic distribution characteristics of normal products and can be defined, for example, by the mean, standard deviation, or specific percentile of the feature density within the group. "Local feature density" refers to the density of data points within the local neighborhood of the visual feature data to be tested in the feature space. This density value can reflect the typicality or abnormality of the data point to be tested within the group to which it belongs. For example, the local feature density can be obtained by counting the number of data points within a certain radius around the data point to be tested, or by methods such as kernel density estimation.
[0048] This application's solution refines traditional feature comparison methods 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 being tested and a group of normal product features, a preliminary determination can be made as to whether the data being tested belongs to a known normal product pattern. When the feature distance meets a pre-determined condition, it indicates a certain similarity between the data being tested and a normal group, necessitating further evaluation of its "typicality" in the feature space.
[0049] Secondly, by obtaining the normal density range of the normal product feature group corresponding to the visual feature data to be tested and calculating the local feature density of the visual feature data itself, we can more accurately assess whether the test data deviates from the typical distribution of normal products. The local feature density reflects the density of the test data within its local neighborhood, while the normal density range provides a density benchmark for normal products in this area. By comparing the local feature density with the normal density range, we can determine whether the test data is in the core area of a normal product, at the edge, or completely deviates from the normal distribution, providing a more refined basis for subsequent anomaly determination.
[0050] By the technical solution, the application can realize more refined comparison of the visual feature data in motorcycle cylinder head quality detection. Compared with 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 the distance to the normal mode is not far, thereby effectively avoiding misjudgment and improving the accuracy and robustness of detection. Especially in the case that there is a certain variability in the normal product or the boundary between the abnormal mode and the normal mode is blurred, a more reliable judgment basis can be provided.
[0051] In another embodiment of the application, the following sub-steps of S3100 are further proposed: calculating the local feature density of the to-be-detected visual feature data in the feature space, comprising: S3121: determining the normal product feature group corresponding to the to-be-detected visual feature data; S3122: determining the local search radius according to the internal dispersion degree of the normal product feature group; 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; S3124: taking the number of data points as the local feature density of the to-be-detected visual feature data in the feature space.
[0052] 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 certain correlation condition after comparing the to-be-detected visual feature data with the plurality of normal product feature groups preset in the normal feature model. This step aims to classify the to-be-detected data into the most relevant normal product mode for subsequent targeted density analysis.
[0053] Further, the determination of the local search radius according to the internal dispersion degree of the normal product feature group means that the search radius is not a fixed value, but is dynamically adjusted according to the distribution tightness or sparseness of the data in the specific normal product feature group. For example, if the data points in a normal product feature group are distributed closely and the internal dispersion degree is low, a smaller local search radius can be determined to more accurately reflect the local density; on the contrary, if the data points are distributed more sparsely and the internal dispersion degree is high, 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.
[0054] In the range of the local search radius, the number of data points with feature distance not greater than the local search radius from the to-be-tested visual feature data in the normal product feature group is counted. That is, the to-be-tested visual feature data is taken as the center, and 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 thereof directly reflects the density of the normal data points around the to-be-tested data. The feature distance can be calculated by using the Euclidean distance, the Mahalanobis distance or other distance measurement methods suitable for visual feature data.
[0055] 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 concentrated these data points are in a smaller range, the higher the local feature density, 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.
[0056] 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. The working principle is that the local similarity or abnormality degree of the to-be-tested visual feature data in the feature space with the normal product feature group to which it belongs can be more accurately quantified. Specifically, by first determining the normal product feature group to which the to-be-tested data belongs, the contextual relevance of the subsequent density calculation is ensured. Subsequently, the local search radius is adaptively adjusted according to the internal dispersion degree of the normal product feature group, avoiding 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 index for subsequent anomaly determination. This density calculation method based on the number of local neighborhood data points can effectively capture the local characteristics of data distribution and has high sensitivity for identifying abnormal points deviating from the normal mode.
[0057] By the technical solution, the application can realize accurate calculation of local feature density of the to-be-tested visual feature data of the motorcycle cylinder head. Compared with the method of using fixed search radius or simple global density calculation, the scheme 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 internal distribution characteristics of different normal product modes, and the accuracy and robustness of the local feature density estimation are improved. Therefore, in the subsequent abnormality determination, the abnormal data deviating from the normal product feature distribution in the local area can be more effectively identified, thereby improving the accuracy and reliability of the motorcycle cylinder head production line quality detection, and reducing the false rejection rate and the missed detection rate.
[0058] In another embodiment of the application, it is further proposed that S3200 comprises: S3210: Obtain internal feature density distribution information of a normal product feature group corresponding to the to-be-tested visual feature data; S3220: Determine a normal density range of the normal product feature group according to the internal feature density distribution information; S3230: Compare the local feature density with the normal density range to obtain a comparison result.
[0059] The internal feature density distribution information reflects the distribution density of the data points in the feature space in 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 is to determine whether the local feature density calculated by the to-be-tested visual feature data falls within the preset normal density interval, so as to determine whether it is a normal product.
[0060] The scheme of the 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 abnormal detection.
[0061] By the technical solution, the normal density range can be dynamically and accurately determined based on the internal feature density distribution of the normal product feature group, and misjudgment caused by using a fixed threshold or an empirical value can be avoided. The 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, and effectively improves the accuracy and reliability of motorcycle cylinder head production line quality detection.
[0062] In another embodiment of the application, it is further proposed that S3220 comprises: S3221: analyzing the peak position and peak amplitude of the internal feature density distribution information, and screening target peaks representing the main normal mode; S3222: analyzing the valley position and valley amplitude of the internal feature density distribution information, and screening target valleys representing the boundary of the normal mode; S3223: determining the normal density range of the normal product feature group based on the density interval between the target peaks and the target valleys.
[0063] 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 distribution density of the feature data in the feature space. The peak position and 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 the normal modes that are dominant in number and have relatively concentrated feature distribution. The valley position and 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 normal modes and abnormal modes. 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.
[0064] The scheme of the present application can more accurately depict the actual distribution boundary of normal product features in the feature space by fine analysis of internal feature density distribution information, especially identifying and utilizing its peak and valley. Specifically, the peak represents the core feature area of the normal product, while the valley indicates the transition or boundary between these core areas. 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 these peak and valley, it can be effectively judged whether the to-be-tested product deviates from the typical feature distribution of the normal product. This density distribution feature-based judgment method enables the system to adapt to the subtle changes of the product in the normal production process, while maintaining high sensitivity to real abnormal patterns.
[0065] Through the above technical scheme, the limitations of simple threshold setting or fixed range judgment in traditional methods can be overcome, making the determination of the normal density range more dynamic and accurate. This method can fully utilize the internal distribution law of normal product feature data, effectively distinguish between normal fluctuations and actual defects, thereby significantly improving the accuracy and robustness of motorcycle cylinder cover production line quality detection, reducing the false positive rate and false negative rate, and further improving the overall production quality control level.
[0066] In another embodiment of the present application, it is further proposed that S3221 comprises: S32211: identifying a plurality of local peaks in the internal feature density distribution information that satisfy an amplitude greater than a preset peak amplitude threshold; S32212: extracting a corresponding data point set for each local peak; S32213: calculating the number of data points and the degree of dispersion of each data point set; S32214: according to the comprehensive judgment of the number of data points and the degree of dispersion, screening out the target peak representing the main normal mode.
[0067] The "identifying multiple local peaks in the internal feature density distribution information that satisfy an amplitude greater than a preset peak amplitude threshold" refers to 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 graph. 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, so as to focus on significant peaks representing main normal modes. The "extracting a corresponding data point set for each local peak" refers to classifying and collecting data points in the feature space region represented by each identified local peak. These data point sets represent the visual feature data of normal product samples gathered near a specific local peak. The "calculating the number of data points and the 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 more the number, the more universal the mode usually means. 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 usually means.
[0068] The "selecting target peaks representing main normal modes according to the comprehensive judgment of the number of data points and the dispersion degree" refers to making decisions by combining the two quantitative indicators. For example, local peaks with large number of data points and small dispersion degree can be preferentially selected as target peaks. 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.
[0069] The scheme of the present application ensures that the identified target peaks 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. The traditional method may only screen according to the peak amplitude, which is easy to misjudge some peaks with high amplitude but scattered internal data points or insufficient number as main modes, 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 peaks are not only significant in density, but also representative in sample size and internal consistency. It is this multi-dimensional and comprehensive judgment that makes the subsequent determination of the normal density range more accurate and robust.
[0070] By the 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 misjudgment of atypical normal fluctuations or noises as the core normal mode, thereby improving the accuracy and stability of the normal feature model. Thus, in the subsequent comparison and abnormality judgment 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.
[0071] Further, 3222 comprises: 32221: 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; 32222: determining a density rising region on both sides of each local valley value; 32223: calculating an average density value of the density rising region on both sides; 32224: calculating a density difference between the density of the valley position and the average density value; 32225: according to the average density value and the density difference, screening out a target valley value representing the normal mode boundary.
[0072] In the internal feature density distribution information obtained after kernel density estimation of the normal visual feature data of the motorcycle cylinder head, a preset valley value amplitude threshold is set to preliminarily screen out regions with low density values, which may represent the transition or boundary between different normal modes. The local valley value means that 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 small fluctuations caused by data sparseness or noise.
[0073] 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 until the density value starts to rise continuously. These regions reflect the density change trend from the valley bottom to the normal mode center region on both sides.
[0074] Thus, the average density value of the density rising region on both sides is calculated 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.
[0075] Subsequently, the 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 value point and the normal mode region on both sides. A larger density difference usually means that the valley value is more likely to be a real mode boundary.
[0076] Finally, according to 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 levels 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 valley value can accurately divide different normal product feature groups and avoid misjudging noise or insignificant density drop as a mode boundary.
[0077] 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 regions 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 value 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.
[0078] Through the above technical scheme, it can effectively avoid misjudging insignificant density drop or noise-induced fluctuations as a normal mode boundary, thereby improving the accuracy of determining the normal density range of the normal product feature group. This makes the subsequent 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, this method can more stably identify real abnormalities and provide a more solid foundation for production line quality control.
[0079] In this regard, the present application further proposes that the above S3210 comprises: S3211: Obtain the production line environment parameters during acquisition of the to-be-tested visual feature data, the production line environment parameters including illumination intensity, environment temperature, camera sensor gain, and production batch identifier; S3212: Perform environment correction processing on the feature data in the normal product feature group based on the production line environment parameters, the environment correction processing including weighted 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; S3213: After completing the environment correction processing, perform kernel density estimation on the corrected feature data to obtain the internal feature density distribution information.
[0080] Specifically, the line environment parameters refer to external or internal conditions that affect the performance of visual features during the data collection process. These parameters can include but are not limited to illumination intensity, ambient temperature, camera sensor gain, and production batch identification. Illumination intensity can affect the brightness, contrast, and shadows of images, ambient temperature can cause slight changes in device performance or material properties, camera sensor gain directly affects the signal strength and noise level of images, and production batch identification helps to distinguish inherent minor differences that may exist between different batches of products. The acquisition of these parameters can be achieved by deploying corresponding sensors in the production line or reading data from the production management system, with the purpose of providing necessary basis for subsequent environmental correction processing.
[0081] Among them, the environmental correction processing aims to eliminate or reduce the influence of non-defect class environmental changes on visual feature data. This processing can be specifically implemented by weighted correction or normalization of 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 image pixel values 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.
[0082] After completing the environmental correction processing, kernel density estimation is performed 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.
[0083] 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.
[0084] 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.
[0085] In some preferred embodiments, the following is described by a specific example: 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.
[0086] 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.
[0087] 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.
[0088] After completing these environmental correction processes, kernel density estimation is performed on the corrected feature data set to obtain 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 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 tested 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.
[0089] Reference Figure 2 The specific embodiments of the present application also disclose a motorcycle cylinder head production line quality detection system, comprising: a data acquisition module 1 configured to acquire visual feature data to be tested of a motorcycle cylinder head to be detected; a model construction and maintenance module 2 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; a comparison module 3 configured to compare the visual feature data to be tested with a preset normal product feature group in the normal feature model to obtain a comparison result; an abnormality determination module 4 configured to identify an abnormal mode corresponding to the visual feature data to be tested when the comparison result meets an abnormality determination condition.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] The anomaly determination module 4 is used to identify the abnormal 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 an abnormal mode recognition algorithm, such as a clustering analysis or classifier-based method, to analyze the abnormal data, identify the specific abnormal mode, and send the abnormal information to the production line control system or operator interface for subsequent processing.
[0096] 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 quality inspection method for a motorcycle cylinder head production line, characterized in that: include: Acquire visual feature data of a motorcycle cylinder head to be inspected; 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 the production process; Comparing the visual feature data to be measured with a normal product feature group preset in the normal feature model to obtain a comparison result; When the comparison result satisfies an abnormality determination condition, an abnormal pattern corresponding to the visual feature data to be measured is identified.
2. The motorcycle cylinder head production line quality inspection method according to claim 1, characterized in that: The normal feature model representing the normal product appearance is constructed based on the normal visual feature data of the 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, including: Establish a corresponding normal product feature group set for each preset environmental state; Obtaining the current environmental status of the production line where the motorcycle cylinder head to be inspected is located; Selecting a corresponding normal product feature group set according to the current environmental state; The normal product feature group set is maintained based on the normal visual feature data, and the normal product feature group set is updated according to changes in the normal visual feature data.
3. The motorcycle cylinder head production line quality inspection method according to claim 1, characterized in that: The step of comparing the visual feature data to be measured with a normal product feature group preset in the normal feature model to obtain a comparison result includes: When the feature distance between the visual feature data to be measured and any normal product feature group in the normal feature model is within a preset distance interval, obtaining the normal density range of the normal product feature group corresponding to the visual feature data to be measured, and calculating the local feature density of the visual feature data to be measured in the feature space; The local characteristic density is compared with the normal density range to obtain a comparison result.
4. The motorcycle cylinder head production line quality inspection method according to claim 3, characterized in that: The calculating of the local feature density of the visual feature data to be measured in the feature space includes: Determining a normal product feature group corresponding to the visual feature data to be measured; Determining a local search radius according to the internal discreteness of the normal product feature group; Within the scope of the local search radius, counting the number of data points in the normal product feature group whose feature distance from the visual feature data to be measured is not greater than the local search radius; The number of data points is used as the local feature density of the visual feature data to be measured in the feature space.
5. The motorcycle cylinder head production line quality inspection method according to claim 3, characterized in that: The comparing the local feature density with the normal density range to obtain a comparison result includes: Obtaining internal feature density distribution information of a normal product feature group corresponding to the visual feature data to be measured; Determining a normal density range of the normal product feature group according to the internal feature density distribution information; The local characteristic density is compared with the normal density range to obtain a comparison result.
6. The motorcycle cylinder head production line quality inspection method according to claim 5, characterized in that: The determining the normal density range of the normal product feature group according to the internal feature density distribution information includes: Analyzing the peak position and peak amplitude of the internal characteristic density distribution information to screen target peaks representing the main normal modes; Analyzing the valley position and valley amplitude of the internal feature density distribution information, and screening target valleys representing normal mode boundaries; Based on the density interval between the target peak value and the target valley value, a normal density range of the normal product feature group is determined.
7. The motorcycle cylinder head production line quality inspection method according to claim 6, characterized in that: Analyzing the peak position and peak amplitude of the internal characteristic density distribution information and screening the target peak representing the main normal mode includes: Identifying a plurality of local peaks in the internal feature density distribution information whose amplitudes are greater than a preset peak amplitude threshold; For each of the local peaks, extract a corresponding data point set; Calculating the number of data points and the degree of dispersion of each data point set; Based on a comprehensive judgment of the number of data points and the degree of dispersion, a target peak representing a main normal mode is screened out.
8. The motorcycle cylinder head production line quality inspection method according to claim 6, characterized in that: The analyzing the valley position and valley amplitude of the internal feature density distribution information and screening the target valley representing the normal mode boundary includes: Identifying a plurality of local valley values in the internal feature density distribution information, each of which has an amplitude less than a preset valley amplitude threshold; For each local valley value, determining density rising areas on both sides thereof; Calculate the average density value of the density rising areas on both sides; Calculating a density difference between the density at the valley position and the average density value; Based on the comprehensive judgment of the average density value and the density difference, a target valley value representing the normal mode boundary is screened out.
9. The motorcycle cylinder head production line quality inspection method according to claim 5, characterized in that: The obtaining of internal feature density distribution information of a normal product feature group corresponding to the visual feature data to be measured includes: Obtaining production line environmental parameters when collecting the visual feature data to be measured, wherein the production line environmental parameters include light intensity, ambient temperature, camera sensor gain, and production batch identification; Performing environmental correction processing on the feature data within the normal product feature group based on the production line environmental parameters, wherein the environmental correction processing includes weighted correction or normalization of the feature data based on the production line environmental parameters to reduce the impact of non-defective environmental changes on internal feature density distribution information; After the environmental correction process is completed, kernel density estimation is performed on the corrected feature data to obtain the internal feature density distribution information.
10. A motorcycle cylinder head production line quality inspection system, characterized in that: include: A data acquisition module, used for acquiring visual feature data to be tested of the cylinder head of the motorcycle to be tested; A model building and maintenance module, configured to build 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; A comparison module, configured to compare the visual feature data to be measured with a normal product feature group preset in the normal feature model to obtain a comparison result; The abnormality determination module is used to identify the abnormal pattern corresponding to the visual feature data to be tested when the comparison result meets the abnormality determination condition.
Citation Information
Patent Citations
Mobile phone appearance detection system and method based on visual identification
CN119672449A
Appearance detection and defect judgment system and method for automobile engine cylinder cover based on machine vision, storage medium and computer program product
CN120009281A
Visual identification method and system for non-defective products, medium and program product
CN120107760A
Industrial equipment anomaly detection method and system based on machine vision
CN120339254A
Wood board surface defect detection method and system based on industrial vision
CN120471896A