An image standardization acquisition method, device and equipment
By acquiring training data on key gear elements and using a classifier to output unified light source parameters, the problem of optical environment differences in gear detection was solved, achieving uniformity and accuracy in AI detection, reducing R&D costs, and improving market compatibility.
Patent Information
- Application Number
- CN202511080241.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-04
AI Technical Summary
In gear appearance inspection, the optical environment changes due to the differences in the size and shape of different gears, requiring manual adjustment of the light source, which affects the uniformity and accuracy of the detection effect of AI algorithms.
By acquiring training data on key elements of sample gears, a classifier is used to train and select target classifiers, outputting uniform shooting light source parameters, and controlling the optical acquisition components to perform standardized image acquisition, ensuring the consistency of the optical environment for gears of the same type.
It improves the uniformity and accuracy of AI algorithm detection results, reduces equipment R&D costs, and enhances market compatibility and detection efficiency.
Smart Images

Figure CN120580397B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of detection, in particular to an image standardization acquisition method, device and equipment. BACKGROUND
[0002] Gear as the main transmission components, if there are quality problems, for example, black skin, missing processing, scratches, cracks and concave-convex, etc., in the movement will appear jitter, abnormal sound, and even break, seriously affect the mechanical properties, service life and operation safety. At present, the detection scheme based on computer vision technology is usually used in gear appearance detection, and the principle is to take pictures of the gear surface through a high-resolution camera, and then send the image to the upper computer. The upper computer is arranged with traditional machine vision algorithm or AI algorithm to infer the image to realize the detection of gear surface appearance defects.
[0003] However, when the image is collected, the gears are very different in size and shape due to different delivery scenes. The optical environment changes due to the differences in size and shape. Therefore, when a new detection gear is encountered each time, the light source needs to be adjusted manually, which causes the shooting optical environment of each part to be inconsistent, thereby affecting the uniformity and accuracy of the detection effect of the AI algorithm. SUMMARY
[0004] The present application provides an image standardization acquisition method to realize standardization acquisition of images.
[0005] According to a first aspect of the present application, an image standardization acquisition method is provided, comprising: acquiring key element training data of a sample gear, wherein the key element training data includes sample gear parameters, sample gear shooting light source parameters and sample gear image parameters;
[0006] The key element training data is input into different types of classifiers for training, and a target classifier is selected from the trained classifiers;
[0007] The measurement parameters of the gear to be detected are input into the target classifier, and the shooting light source parameters output by the target classifier are acquired;
[0008] The optical acquisition component is controlled to perform standardization image acquisition on the gear to be detected based on the shooting light source parameters.
[0009] Optionally, the key element training data of the sample gear is acquired, comprising:
[0010] The historical experimental process accumulation data of the sample gear is acquired, and the key element data is extracted by data correlation analysis using a specified algorithm;
[0011] The key element data is divided into the key element training data and the key element test data according to a proportion.
[0012] Optionally, the key element training data is input into different types of classifiers for training, and a target classifier is selected from the trained classifiers, including:
[0013] The key element training data is input into different types of classifiers, so that each classifier is trained based on the input key element training data, wherein the classifiers include a logistic regression classifier, a random forest classifier, a naive Bayes classifier, and a K-nearest neighbor classifier.
[0014] The key element test data is input into each trained classifier, and each classifier is scored according to a specified evaluation index based on an output result of each classifier.
[0015] The scoring results of each classifier are obtained, and the classifier with the highest score is selected as the target classifier.
[0016] Optionally, a measurement parameter of the gear to be detected is input into the target classifier, and a shooting light source parameter output by the target classifier is obtained, including:
[0017] The measurement parameter of the gear to be detected is input into the target classifier, wherein the measurement parameter includes a tilt angle, a tooth height, a tooth width, and a diameter.
[0018] The target classifier determines a gear type based on the measurement parameter, and outputs the shooting light source parameter matched with the gear type.
[0019] Optionally, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected based on the shooting light source parameter, including:
[0020] The shooting light source parameter is configured to the optical acquisition assembly, and the optical acquisition assembly is moved to a target position by a mechanical arm.
[0021] The optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected at the target position.
[0022] Optionally, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected at the target position, including:
[0023] A rotating clamping mechanism is controlled to rotate the gear to be detected to determine different placement angles of the gear to be detected.
[0024] The optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected at different placement angles at the target position.
[0025] Optionally, the control optical acquisition component further comprises:
[0026] detecting defects in the standardized image of the gear to be detected;
[0027] generating a defect detection report according to the defect detection result, and visualizing the defect detection report.
[0028] According to another aspect of the present application, an image standardization acquisition device is provided, comprising: a key element training data acquisition module configured to acquire key element training data of a sample gear, wherein the key element training data comprises sample gear parameters, sample gear shooting light source parameters and sample gear image parameters;
[0029] a target classifier screening module configured to input the key element training data into different types of classifiers for training, and screen a target classifier from the trained classifiers;
[0030] a shooting light source parameter acquisition module configured to input measurement parameters of a gear to be detected into the target classifier, and acquire shooting light source parameters output by the target classifier;
[0031] a standardized image acquisition module configured to control an optical acquisition component to perform standardized image acquisition on the gear to be detected based on the shooting light source parameters.
[0032] According to another aspect of the present application, an electronic device is provided, comprising:
[0033] at least one processor; and
[0034] a memory in communication connection with the at least one processor; wherein
[0035] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method according to any one of the embodiments of the present application.
[0036] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the method according to any one of the embodiments of the present application when executed.
[0037] The technical scheme of the embodiment of the present application trains the target classifier for different types of gears, and outputs unified shooting light source parameters for the same type of gear through the target classifier, so as to ensure the unified standardization of the optical environment of the same type of gear during image acquisition, thereby improving the uniformity and accuracy of the AI algorithm detection effect.
[0038] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1 is a flow chart of an image standardization acquisition method according to the first embodiment of the present application;
[0041] Figure 2 is a structural schematic diagram of an optical acquisition assembly according to the first embodiment of the present application;
[0042] Figure 3 is a structural schematic diagram of a detection device according to the first embodiment of the present application;
[0043] Figure 4 is a flow chart of an image standardization acquisition method according to the second embodiment of the present application;
[0044] Figure 5 is a structural schematic diagram of an image annotation acquisition device according to the third embodiment of the present application;
[0045] Figure 6 is a structural schematic diagram of an electronic device according to the fourth embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to better understand the present application by those skilled in the art, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0047] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and above-described accompanying drawings are intended to distinguish similar objects and not necessarily for describing a particular sequential or chronological order. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the application described herein can be implemented in orders other than those illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus including a list of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products, or apparatuses.
[0048] Embodiment one
[0049] Figure 1 A flowchart of an image standardization acquisition method is provided for the first embodiment of the present application. The present embodiment can be applied to the image standardization acquisition of a gear. The method can be executed by an image standardization acquisition device, which can be implemented in the form of hardware and / or software. As shown in the figure, the method comprises the following steps. Figure 1
[0050] In step S101, key element training data of a sample gear is acquired.
[0051] Optionally, the key element training data of the sample gear is acquired by acquiring historical experimental process accumulation data of the sample gear and performing data association analysis on the historical experimental process accumulation data using a specified algorithm to extract key element data; and dividing the extracted key element data according to a proportion to obtain key element training data and key element test data.
[0052] Specifically, in the present embodiment, historical experimental process accumulation data of the sample gear is extracted based on past project experience, and then the historical experimental process accumulation data is preprocessed, such as cleaning and complementing, and then a specified algorithm, such as an apriori operator and an Eclat operator, is used to perform association analysis on the data to extract key element data. Table 1 below shows an example of the extracted key element data:
[0053] Table 1
[0054]
[0055] The sample gear parameters included in the extracted key element data are the sample gear parameters such as the inclination angle, tooth height, tooth width, and diameter, the sample gear shooting light source parameters such as the light source angle and light source brightness, and the sample gear image parameters such as the image gray value, image contrast, and defect gray value. In this embodiment, the corresponding standard interval range is set in advance for the image gray value, image contrast, and defect gray value, so that the parameters of the gear image obtained according to the meaning of True in the last three columns of Table 1 are within the corresponding standard interval range, and the meaning of False is that the parameters of the gear image obtained are not within the corresponding standard interval range. For example, the standard interval range set in advance for the image gray value is [50 220], the standard interval range set in advance for the image contrast is [0.2 0.7], and the standard interval range set in advance for the defect gray value is [150 200]. Of course, this embodiment is only an example and does not limit the standard interval range corresponding to each parameter. The user can set it in advance according to the requirement of detection accuracy. When the image gray value of the gear image photographed for the combined gear-1 is 65, the output result of the corresponding image gray value is True. Of course, this embodiment is only an example of image gray value. The determination method of the output result of the image contrast and the defect gray value is basically the same, and this embodiment will not be repeated. Of course, this embodiment is only an example and does not limit the specific type of key element data. Moreover, the sample gear image parameters are determined by the AI model and the machine vision algorithm together, thereby abandoning the traditional manual naked eye judgment, achieving the objectivity, scientificity and rationality of the determination method.
[0056] It is worth mentioning that the key element data obtained in this embodiment is divided, for example, when 1000 pieces of data information shown in Table 1 above are determined, 80% of the data is used as key element training data, that is, 800 pieces, and 20% of the data is used as key element test data, that is, 200 pieces. Of course, this embodiment is only an example and does not limit the specific rules of data division.
[0057] In step S102, the key element training data is input into different types of classifiers for training, and a target classifier is selected from the trained classifiers.
[0058] Optionally, the key element training data is input into different types of classifiers for training, and a target classifier is selected from the trained classifiers, including: inputting the key element training data into different types of classifiers to enable each classifier to be trained based on the input key element training data, wherein the classifiers include a logistic regression classifier, a random forest classifier, a naive Bayes classifier, and a K-nearest neighbor classifier; inputting the key element test data into each trained classifier, and scoring according to the output results of each classifier according to a specified evaluation index; obtaining the scoring results of each classifier, and selecting the classifier with the highest score as the target classifier.
[0059] Specifically, in the embodiment, the 800 pieces of key element training data obtained above are input into different types of classifiers for training, such as a logistic regression classifier, a random forest classifier, a naive Bayes classifier, and a K-nearest neighbor classifier. The regularization term type of the logistic regression classifier is selected as L2, the dual formula is selected as false, and the maximum number of iterations is selected as 80. The data purity index of the random forest classifier is selected as gini, the maximum depth is selected as 30, the pruning coefficient is selected as 2, and the maximum number of leaf nodes is selected as 18. The mode of the naive Bayes classifier is selected as MultinomialNB. The nearest neighbor algorithm of the K-nearest neighbor classifier is selected as auto, the leaf node size is selected as 30, the distance metric parameter is selected as 5, and the weight function is selected as uniform. Of course, the embodiment is only an example and does not limit the types of classifiers and the specific working parameters of each classifier.
[0060] Each classifier is trained based on the input key element training data, and after training, the key element test data is input into each classifier, and the output results of each classifier are scored according to a specified evaluation index, such as a confusion matrix or a model evaluation index. The embodiment does not limit the specific type of the specified evaluation index. After obtaining the scoring results of each classifier, for example, the logistic regression classifier scores -10, the random forest classifier scores -9, the naive Bayes classifier scores -8, and the K-nearest neighbor classifier scores -7, the classifier with the highest score, i.e., the logistic regression classifier, is selected as the target classifier. Of course, the embodiment is only an example and does not limit the specific type of the target classifier.
[0061] In step S103, the measurement parameters of the gear to be detected are input into the target classifier, and the shooting light source parameters output by the target classifier are obtained.
[0062] Optionally, the measurement parameters of the gear to be detected are input into the target classifier, and the shooting light source parameters output by the target classifier are obtained, including: inputting the measurement parameters of the gear to be detected into the target classifier, wherein the measurement parameters include the tilt angle, the tooth height, the tooth width and the diameter; determining the gear type based on the measurement parameters by the target classifier, and outputting the shooting light source parameters matched with the gear type.
[0063] In the training process, the gears are mainly classified into several categories through continuous parameter adjustment and test verification, and the corresponding optical environment is designed according to the classifier classification, so that when a new detection task is required, only the corresponding gear parameters such as the tilt angle, the tooth height, the tooth width and the diameter need to be extracted, and the type is identified through the classifier, and the shooting light source parameters matched with the gear type are output according to the identified type, and the same shooting light source parameters are output for gears of the same type, thereby ensuring the consistency of the optical environment of gears of the same type.
[0064] For example, the tilt angle of gear 1 is 45 degrees, the tooth height is 6 mm, the tooth width is 3.5 mm, and the diameter is 155 mm, the tilt angle of gear 2 is 33 degrees, the tooth height is 5 mm, the tooth width is 3 mm, and the diameter is 134 mm. Although the parameters of the two parts are different, the classifier identifies that the types of the two parts are the same, and the same shooting light source parameters are output for the above two parts.
[0065] Specifically, the classifier in the embodiment classifies different gears into one category, thereby outputting the same shooting light source parameters, and the advantage is that it is not necessary to design shooting parameters for each gear separately, which improves the efficiency, and a new gear can be automatically matched with the existing environment parameters through classification. However, the problem is that classification errors may lead to unreasonable parameter sharing, resulting in unreasonable matching shooting light source parameters. In order to solve this problem, the output verification method is adopted in the application, that is, in the training stage of the classifier, when the 200 test data are used to evaluate the score to score the classifier, a method of input feature optimization is added, that is, the parameters of different dimensions are standardized to eliminate the dimensional difference and avoid the model being dominated by features with large numerical range, and only the parameter values are standardized, without artificially screening high-discrimination parameters for feature processing, without artificially transforming or combining original parameters to generate new features that can better reflect the difference. Only the parameter values are processed in data to eliminate the dimensional difference, thereby avoiding the influence of human factors on the model output.
[0066] Optionally, before inputting the key element training data into different types of classifiers, the method further comprises: obtaining the type of each key element in the key element training data, and determining the data normalization method matched with each key element, wherein the key element of continuous parameter is matched with the standard score normalization method, and the key element of non-continuous parameter is matched with the quantile normalization method; and processing each key element in the key element training data according to the matched normalization method to obtain the normalized key element training data.
[0067] Optionally, processing each key element in the key element training data according to the matched normalization method to obtain the normalized key element training data comprises: when the key element is determined to be a continuous parameter, calculating the difference between the key element and the median of the key element, taking the ratio of the difference and the interquartile range of the key element as the normalized key element training data, wherein the continuous parameter at least includes light source brightness; and when the key element is determined to be a non-continuous parameter, calculating the ranking of the key element in the training data, calculating the ratio of the ranking and the total amount of training samples plus 1, and taking the inverse function calculation result of the standard normal distribution of the ratio as the normalized key element training data, wherein the non-continuous parameter at least includes tooth height, tooth width and diameter.
[0068] In the embodiment, a mixed use strategy is adopted, Z-score standardization, i.e. standard score normalization, is adopted for continuous parameters such as light source brightness, quantile normalization is adopted for tooth height, tooth width or diameter, and sine / cosine transformation is adopted instead of normalization for angle. The following formula (1) shows an example of Z-score standardization:
[0069] (1)
[0070] wherein Median represents the median, X represents the original feature value, i.e. the single data point without normalization, IQR represents the interquartile range, and X new represents the new feature value after normalization.
[0071] The following formula (2) shows an example of quantile normalization:
[0072] (2)
[0073] wherein X represents the original feature value, i.e. the single data point without normalization, rank(X) represents the ranking of the current data X in the data set, i.e. the position sequence number after ascending arrangement, N represents the total number of samples in the data set, rank(X) represents the quantile, and Φ -1 represents the inverse function of the standard normal distribution.
[0074] In addition, the sine can be specifically represented as and the cosine can be specifically represented as of course, the embodiment is only an example, and the specific normalization method adopted by different types of data is not limited. It needs to be specially pointed out that in the preprocessing stage, before the model training, the statistics of all training data are calculated in advance, for example, mean / standard deviation, minimum / maximum value, etc., and the sine / cosine conversion does not need to store additional statistics. In the inference stage, the statistics calculated in the training stage are used to convert each new sample, and if the inference stage encounters a feature value beyond the training set range, the Min-Max normalization needs to be forced to be truncated to the [0, 1] interval to preserve the data.
[0075] In step S104, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected based on the shooting light source parameters.
[0076] Optionally, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected based on the shooting light source parameters, including: configuring the shooting light source parameters to the optical acquisition assembly, and moving the optical acquisition assembly to the target position through the mechanical arm; controlling the optical acquisition assembly to perform standardized image acquisition on the gear to be detected at the target position.
[0077] Optionally, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected at the target position, including: controlling the rotating clamping mechanism to rotate the gear to be detected to determine different placement angles of the gear to be detected; and controlling the optical acquisition assembly to perform standardized image acquisition on the gear to be detected at different placement angles at the target position.
[0078] In the embodiment, the shooting light source parameters output by the classifier are configured to the optical acquisition assembly, as shown in Figure 2 The structure of the optical acquisition assembly is shown in the figure, which includes a face array camera, a line array camera and three light sources. The shooting light source parameters are specifically configured to the three light sources. The optical acquisition assembly is specifically installed in the detection device through the mechanical arm, as shown in Figure 3 The structure of the detection device is shown in the figure, which mainly includes the optical acquisition assembly, the mechanical arm connected to the optical acquisition assembly, the rotating clamping mechanism for fixing the gear, and the upper computer for receiving and processing images, etc. Of course, the embodiment is only an example, and the specific structure of the detection device is not limited.
[0079] Specifically, when the detection equipment collects and detects the gear, the gear is first loaded manually, and then the rotating clamping mechanism is used to press the gear, and the rotating clamping mechanism is controlled to rotate the gear to be detected to different placement angles, and after the placement position is determined, the optical collection assembly is moved to the target position by the mechanical arm, and the gear with the determined placement position is photographed at the target position. The placement angle in this embodiment can be an axial surface, a tooth surface and an end surface, so that the gear can be photographed from different angles to obtain a multi-angle image of the gear, thereby ensuring the accuracy of subsequent defect detection. Because the specific optical environment is designed, the same type of gear can be standardized, thereby achieving compatibility of the same type of gear in the optical environment and AI algorithm, and combining the jig and the mechanical arm, the mechanical structure is compatible. When a new market demand arises, the corresponding gear parameters are extracted and input into the classifier, and the corresponding group and AI model can be obtained, thereby solving the compatibility problem of gears in the market, greatly improving the equipment development efficiency and reducing the development cost.
[0080] In the embodiment, the target classifier is obtained by targeted training for different types of gears, and the target classifier outputs unified shooting light source parameters for the same type of gear, thereby ensuring the unified standardization of the optical environment of the same type of gear during image collection, thereby improving the uniformity and accuracy of the AI algorithm detection effect.
[0081] Embodiment two
[0082] Figure 4 The flowchart of the image standardization collection method provided in the embodiment two, based on the above-mentioned embodiment, after the optical collection assembly collects the standardized image of the gear to be detected based on the shooting light source parameters, the method further includes: performing defect detection on the standardized image of the gear to be detected, generating a defect detection report according to the defect detection result, and visually displaying the defect detection report. As shown in Figure 4 The method comprises the following steps:
[0083] In step S201, key element training data of a sample gear is obtained.
[0084] Optionally, the key element training data of the sample gear is obtained by: obtaining historical experimental process accumulation data of the sample gear, and using a specified algorithm to perform data correlation analysis to extract key element data; and dividing the extracted key element data according to a proportion to obtain key element training data and key element test data.
[0085] In step S202, the key element training data is input into different types of classifiers for training, and a target classifier is selected from the trained classifiers.
[0086] Optionally, the key element training data is input into different types of classifiers for training, and a target classifier is selected from the trained classifiers, including: inputting the key element training data into different types of classifiers to enable each classifier to be trained based on the input key element training data, wherein the classifiers include a logistic regression classifier, a random forest classifier, a naive Bayes classifier, and a K-nearest neighbor classifier; inputting the key element test data into each trained classifier, and scoring according to the output results of each classifier according to a specified evaluation index; obtaining the scoring results of each classifier, and selecting the classifier with the highest scoring result as the target classifier.
[0087] Step S203, inputting the measurement parameters of the gear to be detected into the target classifier, and obtaining the shooting light source parameters output by the target classifier.
[0088] Optionally, the measurement parameters of the gear to be detected are input into the target classifier, and the shooting light source parameters output by the target classifier are obtained, including: inputting the measurement parameters of the gear to be detected into the target classifier, wherein the measurement parameters include an inclination angle, a tooth height, a tooth width, and a diameter; determining the gear type based on the measurement parameters by the target classifier, and outputting the shooting light source parameters matched with the gear type.
[0089] Step S204, controlling the optical acquisition assembly to perform standardized image acquisition on the gear to be detected based on the shooting light source parameters.
[0090] Optionally, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected based on the shooting light source parameters, including: configuring the shooting light source parameters to the optical acquisition assembly, and moving the optical acquisition assembly to a target position by a mechanical arm; controlling the optical acquisition assembly to perform standardized image acquisition on the gear to be detected at the target position.
[0091] Optionally, the optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected at the target position, including: controlling the rotating clamping mechanism to rotate the gear to be detected to determine different placement angles of the gear to be detected; and controlling the optical acquisition assembly to perform standardized image acquisition on the gear to be detected at different placement angles at the target position.
[0092] Step S205, performing defect detection on the standardized image of the gear to be detected, generating a defect detection report according to the defect detection result, and visually displaying the defect detection report.
[0093] The standardized image of the gear to be detected is detected for defect detection in the embodiment. Specifically, the standardized image is inferred by an algorithm to identify defects such as black skin, missing processing, scratches, cracks, and concave-convex in the image. Since the same type of parts in the embodiment use the same light source, the uniformity of the captured image is ensured. Since the specific method of defect detection on the image is not the focus of the application, the embodiment will not be described again.
[0094] It should be noted that the defect detection report is generated according to the defect detection result after the image is detected for defects in the embodiment. The defect detection report mainly includes the time of defect detection, the result of defect detection, and the defect rate when multiple gears are detected at the same time. Of course, the embodiment is only an example and does not limit the specific content contained in the defect detection report. The defect detection report is visually displayed on the human-computer interaction interface in the embodiment, so that the user can intuitively and quickly obtain the defect detection result of the gear. When the value of the defect rate in the defect detection report exceeds the specified value, it indicates that the overall quality of the gears produced in the current batch is poor. At this time, an alarm prompt is generated and displayed in the form of voice or image. Thus, the gear manufacturer can terminate the current batch of gear production in emergency according to the alarm prompt, and check the problems in the production process to ensure that the quality of the produced gears meets the standards.
[0095] In the embodiment, the target classifier is obtained by targeted training for different types of gears, and the target classifier outputs unified shooting light source parameters for the same type of gears, thereby ensuring the unified standardization of the optical environment of the same type of gears during image acquisition, and improving the uniformity and accuracy of the AI algorithm detection effect.
[0096] Embodiment three
[0097] Figure 5 The structure diagram of the image standardization acquisition device provided by the embodiment three of the application is shown in the figure. Figure 5 As shown in the figure, the device comprises a key element training data acquisition module 310, a target classifier screening module 320, a shooting light source parameter acquisition module 330, and a standardized image acquisition module 340.
[0098] The key element training data acquisition module 310 is used to acquire the key element training data of the sample gear, wherein the key element training data comprises sample gear parameters, sample gear shooting light source parameters, and sample gear image parameters.
[0099] The target classifier screening module 320 is configured to input the key element training data into different types of classifiers for training, and screen a target classifier from the trained classifiers.
[0100] The shooting light source parameter acquisition module 330 is configured to input the measurement parameter of the gear to be detected into the target classifier, and acquire a shooting light source parameter output by the target classifier.
[0101] The standardized image acquisition module 340 is configured to control the optical acquisition assembly to perform standardized image acquisition on the gear to be detected based on the shooting light source parameter.
[0102] Optionally, the key element training data acquisition module is configured to acquire historical experimental process accumulation data of a sample gear, and perform data correlation analysis on the data to extract key element data by using a specified algorithm.
[0103] The extracted key element data is divided in proportion to acquire key element training data and key element test data.
[0104] Optionally, the target classifier screening module is configured to input the key element training data into different types of classifiers, so that the classifiers are synchronously trained based on the input key element training data, wherein the classifiers include a logistic regression classifier, a random forest classifier, a naive Bayes classifier, and a K-nearest neighbor classifier.
[0105] The key element test data is input into the trained classifiers, and scores are given to the classifiers according to output results of the classifiers and specified evaluation indexes.
[0106] The scoring results of the classifiers are acquired, and a classifier with the highest score is taken as the target classifier.
[0107] Optionally, the shooting light source parameter acquisition module is configured to input a measurement parameter of the gear to be detected into the target classifier, wherein the measurement parameter includes an inclination angle, a tooth height, a tooth width, and a diameter.
[0108] The gear type is determined based on the measurement parameter by using the target classifier, and a shooting light source parameter matched with the gear type is output.
[0109] Optionally, the standardized image acquisition module is configured to configure the shooting light source parameter to the optical acquisition assembly, and move the optical acquisition assembly to a target position by using a mechanical arm.
[0110] The optical acquisition assembly is controlled to perform standardized image acquisition on the gear to be detected at the target position.
[0111] Optionally, the standardized image acquisition module is further configured to control the rotating clamping mechanism to rotate the gear to be detected to determine different placement angles of the gear to be detected.
[0112] The optical acquisition assembly is controlled to perform standard image acquisition on the gear to be detected at different angles of placement at the target position.
[0113] Optionally, the device further comprises a defect detection module configured to detect defects in the standard image of the gear to be detected.
[0114] A defect detection report is generated according to the defect detection result, and the defect detection report is visually displayed.
[0115] The image standardization acquisition device provided by the embodiments of the present application can perform the image standardization acquisition method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0116] Embodiment four
[0117] Figure 6 A structural schematic diagram of an electronic device 10 that can be used to implement the embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, and the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which are communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0118] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a loudspeaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0119] In the context of the present application, a computer readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. Computer readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium can be a machine readable signal medium. More specific examples of a machine readable storage medium will include one or more lines of a program of instructions in a transitory signal form, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0120] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the spirit and scope of the present application. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application are achieved, which are not limited herein.
[0121] The specific embodiments discussed above do not constrain the scope of the present application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and alternatives can be made to the specific embodiments without departing from the spirit and principles of the present application. Any such modifications, equivalents, and alternatives should be considered within the scope of the present application.
Claims
1. An image standardization acquisition method, characterized in that, include: Acquire training data for key elements of the sample gear, wherein the training data for key elements includes sample gear parameters, sample gear shooting light source parameters, and sample gear image parameters; The training data of the key elements are input into different types of classifiers for training, and the target classifier is selected from the trained classifiers. The measurement parameters of the gear to be detected are input into the target classifier, and the shooting light source parameters output by the target classifier are obtained. The optical acquisition component is controlled to perform standardized image acquisition of the gear to be detected based on the shooting light source parameters; Before inputting the key element training data into different types of classifiers, the method further includes: obtaining the type of each key element in the key element training data, and determining the data normalization method matched with each key element, wherein the key elements with continuous parameters are matched with the standard score normalization method, and the key elements with non-continuous parameters are matched with the quantile normalization method. Each of the key elements in the training data of each key element is processed according to the matching normalization method to obtain the normalized key element training data. The step of processing each key element in the training data of each key element according to a matching normalization method to obtain the normalized key element training data includes: when the key element is determined to be a continuous parameter, calculating the difference between the key element and the median of the key element, and using the ratio of the difference to the interquartile range of the key element as the normalized key element training data, wherein the continuous parameter includes at least the light source brightness. When the key element is determined to be a discontinuous parameter, the ranking of the key element in the training data is calculated, and the ratio of the ranking to the total number of training samples plus 1 is calculated. The result of the inverse function of the standard normal distribution of the ratio is used as the training data of the key element after normalization. The discontinuous parameter includes at least tooth height, tooth width and diameter.
2. The method according to claim 1, characterized in that, The key element training data for obtaining the sample gears includes: Acquire historical experimental data of the sample gears and use a specified algorithm to perform data correlation analysis to extract key element data; The extracted key element data is divided proportionally to obtain key element training data and key element test data.
3. The method according to claim 2, characterized in that, The step of inputting the training data of the key elements into different types of classifiers for training, and selecting the target classifier from the trained classifiers, includes: The training data of the key elements is input into different types of classifiers so that each classifier can be trained synchronously based on the input training data of the key elements. The classifiers include logistic regression classifier, random forest classifier, Naive Bayes classifier, and K-nearest neighbor classifier. The test data of the key elements are input into each classifier after training, and the output results of each classifier are scored according to the specified evaluation index. Obtain the score results of each classifier, and select the classifier with the highest score as the target classifier.
4. The method according to claim 1, characterized in that, The step of inputting the measurement parameters of the gear to be detected into the target classifier and obtaining the shooting light source parameters output by the target classifier includes: The measurement parameters of the gear to be tested are input into the target classifier, wherein the measurement parameters include at least the tilt angle, tooth height, tooth width, diameter, surface material and roughness; The target classifier determines the gear type based on the measurement parameters and outputs the shooting light source parameters that match the gear type.
5. The method according to claim 1, characterized in that, The control optical acquisition component performs standardized image acquisition of the gear to be detected based on the shooting light source parameters, including: The shooting light source parameters are configured to the optical acquisition component, and the optical acquisition component is moved to the target position by a robotic arm; The optical acquisition component is controlled to acquire a standardized image of the gear to be inspected at the target location.
6. The method according to claim 5, characterized in that, The control of the optical acquisition component to perform standardized image acquisition of the gear to be detected at the target location includes: The rotary clamping mechanism is controlled to rotate the gear to be tested to determine different placement angles of the gear to be tested; The optical acquisition component is controlled to acquire standardized images of the gear to be tested at different placement angles at the target position.
7. An image standardization acquisition device, characterized in that, include: The key element training data acquisition module is used to acquire key element training data of the sample gear, wherein the key element training data includes sample gear parameters, sample gear shooting light source parameters, and sample gear image parameters. The target classifier filtering module is used to input the key element training data into different types of classifiers for training, and to filter out the target classifier from the trained classifiers. The imaging light source parameter acquisition module is used to input the measurement parameters of the gear to be detected into the target classifier and acquire the imaging light source parameters output by the target classifier. A standardized image acquisition module is used to control the optical acquisition component to perform standardized image acquisition on the gear to be detected based on the shooting light source parameters; The device further includes a data normalization processing module, used to obtain the type of each key element in the key element training data, and determine the data normalization method matched with each key element, wherein the key elements with continuous parameters are matched with the standard score normalization method, and the key elements with non-continuous parameters are matched with the quantile normalization method. Each of the key elements in the training data of each key element is processed according to the matching normalization method to obtain the normalized key element training data. The data normalization processing module is further configured to, when the key element is determined to be a continuous parameter, calculate the difference between the key element and the median of the key element, and use the ratio of the difference to the interquartile range of the key element as the training data of the key element after normalization processing, wherein the continuous parameter includes at least the light source brightness. When the key element is determined to be a discontinuous parameter, the ranking of the key element in the training data is calculated, and the ratio of the ranking to the total number of training samples plus 1 is calculated. The result of the inverse function of the standard normal distribution of the ratio is used as the training data of the key element after normalization. The discontinuous parameter includes at least tooth height, tooth width and diameter.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that is executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
AI-based visual detection light source control method, system, equipment and medium
CN117615484A
Method and system for constructing sarcopenia prediction model without physique measurement
CN119833132A