Modeling method, model and detection method of jewelry automatic detection model

By preprocessing and optimizing the jewelry image data, optimized images are generated for modeling, which solves the problem that the automatic jewelry detection model is affected by the environment and equipment, and improves the accuracy and reliability of detection.

CN118379723BActive Publication Date: 2024-09-10HEBEI GEO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410804913.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-10
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

The analysis results of the jewelry automatic detection model are affected by the environment and equipment, affecting the accuracy and reliability of the detection.

Method used

By collecting and preprocessing image data of various types of jewelry, extracting image detection impact representation values, matching optimization parameters and adjusting images, generating optimized images for modeling, and improving the adaptability and accuracy of the detection model.

Benefits of technology

It improves the accuracy and reliability of jewelry detection, reduces the error rate and false detection rate, and enhances the applicability and practicality of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379723B
    Figure CN118379723B
Patent Text Reader

Abstract

The present invention discloses a modeling method, a model and a detection method of a jewelry automatic detection model, and relates to the technical field of automatic detection models. First, the image data of each type of jewelry in the collected data set is analyzed to obtain the image detection influence characterization value of each type of jewelry, which is helpful to more accurately describe the image features of different types of jewelry, and then more accurately distinguish different types of jewelry, and then the image optimization parameters of each type of jewelry are obtained according to the image detection influence characterization value matching of each type of jewelry, and the optimized images of each type of jewelry are processed. The optimized images of each type of jewelry can accurately reflect the characteristics of the jewelry image, which is helpful to improve the practicality of the jewelry automatic detection model, improve the accuracy of the jewelry automatic detection model in identifying jewelry features, and enable the jewelry automatic detection model to more accurately detect and identify various types of jewelry and perform modeling to obtain a jewelry model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic detection models, and in particular to a modeling method, a model and a detection method of a jewelry automatic detection model. Background Art

[0002] Since the jewelry industry attaches great importance to the control of jewelry quality and authenticity identification, traditional jewelry testing usually requires experienced professionals and expensive equipment, which is costly and easily affected by subjective factors. With the development of science and technology, the introduction of jewelry automatic detection models can reduce the cost of jewelry testing, improve the accuracy and efficiency of jewelry testing, reduce technical barriers, and improve the development level of the jewelry industry.

[0003] Prior art, such as the invention patent application with announcement number: CN115112598B, discloses a modeling method, model and detection method of a jade automatic detection model, wherein the method includes: obtaining a jade sample set for reflection and a jade sample set for transmission; obtaining an infrared reflection spectrum data set corresponding to the reflection jade sample set, and obtaining an infrared transmission spectrum data set corresponding to the transmission jade sample set; obtaining a specified peak position in each infrared reflection spectrum data, and taking the corresponding specified peak position of the infrared reflection spectrum data in the first interval as a basis, obtaining a peak position interval set corresponding to all the specified peak positions, and using the peak position interval set to obtain a first judgment basis; taking the infrared transmission data set as a basis, obtaining a peak position related threshold value of the infrared transmission spectrum in the second set interval, and obtaining a second judgment basis based on the peak position related threshold value; saving the first judgment basis and the second judgment basis to obtain a jade automatic detection model.

[0004] The prior art, such as the invention patent application with the publication number of CN111398208A, discloses a method for rapid identification of traditional craft jadeite using near-infrared technology, the method comprising the following steps: 1) selecting samples; 2) collecting a certain number of traditional craft jadeite samples with definite sources, modern A-grade jadeite samples, B-grade jadeite samples, B+C-grade jadeite samples, and C-grade jadeite samples and classifying them; 3) collecting near-infrared spectra of jadeite samples of known quality, pre-processing the near-infrared spectra, and using a Fourier near-infrared spectrometer to scan the near-infrared spectra of all jadeite; 4) establishing a principal component-Mahalanobis distance judgment model, and using the established judgment model to classify and test unknown samples to be tested. In short, using near-infrared technology, applying mathematics, computer science, and statistics, establishing a judgment model, and using chemical pattern recognition methods, clustering and discriminant analysis is performed on a small amount of organic mixtures introduced by the old process into "traditional craft jadeite", making it an important discriminant indicator for identifying "traditional craft jadeite".

[0005] In combination with the above scheme, it is found that currently in the field of automatic jewelry detection model technology, usually only the infrared spectrum of jewelry is analyzed. Since the infrared spectrum of jewelry will be affected by the environment and equipment, it may affect the analysis results of the automatic jewelry detection model and affect the accuracy and reliability of the automatic jewelry detection model. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention provides a modeling method, a model and a detection method for a jewelry automatic detection model, which can effectively solve the problems involved in the above-mentioned background technology.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a modeling method for a jewelry automatic detection model, including collecting image data of various types of jewelry in a data set, annotating and preprocessing the image data of each type of jewelry.

[0008] The preprocessed image data of each type of jewelry is analyzed to obtain the image detection influence characterization values ​​of each type of jewelry. The image optimization parameters of each type of jewelry are obtained according to the image detection influence characterization values ​​of each type of jewelry, and the images of each type of jewelry are adjusted to obtain the optimized images of each type of jewelry.

[0009] The optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling to obtain models of various types of jewelry.

[0010] Furthermore, the preprocessed image data of each type of jewelry is analyzed, and the specific analysis process is: the preprocessed image data of each type of jewelry includes images of each type of jewelry, standard images of each type of jewelry, and image sizes of each type of jewelry.

[0011] Grayscale processing is performed on the images of various types of jewelry to obtain grayscale images of various types of jewelry, the maximum brightness and minimum brightness of various types of jewelry are extracted from the grayscale images of various types of jewelry, and the pixel standard deviation of the image of each type of jewelry is counted as the contrast value of the image of each type of jewelry, and the first characterization value of the image detection impact of each type of jewelry is obtained after processing.

[0012] The grayscale images of each type of jewelry are divided into regions, the variance of the pixel values ​​of each region in the grayscale images of each type of jewelry is extracted, and the saturation value of each region in the image of each type of jewelry is counted, and the second representation value of the image detection impact of each type of jewelry is obtained after processing.

[0013] The standard images of each type of jewelry are extracted and compared with the grayscale images of each type of jewelry. The rotation offset of the images of each type of jewelry is analyzed, and the size of the images of each type of jewelry is extracted. Then, the third characterization value affecting the image detection of each type of jewelry is analyzed.

[0014] According to the first characterization value affected by image detection of each type of jewelry, the second characterization value affected by image detection of each type of jewelry, and the third characterization value affected by image detection of each type of jewelry, a comprehensive analysis is performed to obtain the image detection impact characterization value of each type of jewelry.

[0015] Furthermore, the image detection impact characterization value of each type of jewelry is a numerical quantification result obtained by analyzing the image data of each type of jewelry, and is used to quantify the impact of different factors on the image detection of each type of jewelry.

[0016] Furthermore, the image optimization parameters of each type of jewelry are obtained by matching the image detection influence characterization values ​​of each type of jewelry. The specific matching process is: according to the image detection influence characterization values ​​of each type of jewelry, the image optimization parameters corresponding to the set image detection influence characterization value intervals of each type of jewelry are compared to obtain the image optimization parameters of each type of jewelry.

[0017] Furthermore, the image of each type of jewelry is adjusted to obtain an optimized image of each type of jewelry. The specific analysis process is: adjusting the image brightness and contrast data of each type of jewelry according to the image optimization parameters of each type of jewelry, multiplying the RGB value of each pixel in the image of each type of jewelry by a constant to increase or decrease the image brightness value of each type of jewelry, and linearly transforming the brightness of each pixel in the image of each type of jewelry to increase or decrease the contrast, so as to obtain the optimized image of each type of jewelry.

[0018] Furthermore, the optimized images of each type of jewelry are imported into the jewelry automatic detection model for modeling to obtain the models of each type of jewelry. The specific analysis process is: the optimized image data of each type of jewelry is preprocessed. The specific process is firstly adjusting the size of the optimized images of each type of jewelry, and then converting the optimized images of each type of jewelry into grayscale images, and then performing data enhancement on the grayscale images, and importing the preprocessed optimized images of each type of jewelry into the jewelry automatic detection model to obtain the models of each type of jewelry.

[0019] Furthermore, the image detection of each type of jewelry affects the characterization value, and the specific analysis conditions are:

[0020] ; In the formula, represents the image detection impact characterization value of the i-th type of jewelry, Indicates that the image detection of the i-th type of jewelry affects the first characterization value, Indicates the weight factor corresponding to the first characterization value affected by the set image detection, Indicates that the image detection of the i-th type of jewelry affects the second representation value, Indicates the weight factor corresponding to the second characterization value affected by the set image detection, Indicates that the image detection of the i-th type of jewelry affects the third characterization value, represents the weight factor corresponding to the third characterization value affected by the set image detection, i represents the serial number of each type of jewelry, , Indicates the total number of jewelry types.

[0021] Furthermore, the image detection of each type of jewelry affects the first characterization value, and the specific analysis conditions are:

[0022] ; In the formula, Indicates that the image detection of the i-th type of jewelry affects the first characterization value, represents the maximum brightness value of the image of the i-th type of jewelry, Indicates the weight factor corresponding to the maximum difference in brightness value of the set image. represents the minimum brightness value of the image of the i-th type of jewelry, represents the contrast value of the image of the i-th type of jewelry, Indicates the weight factor corresponding to the set contrast value of the image.

[0023] A second aspect of the present invention provides a jewelry automatic detection model, characterized in that the jewelry automatic detection model is obtained by any of the above methods.

[0024] The third aspect of the present invention provides a detection method for a jewelry automatic detection model, which is characterized by comprising: collecting image data of each type of jewelry in a data set, analyzing to obtain image optimization parameters of each type of jewelry, and adjusting the image of each type of jewelry to obtain optimized images of each type of jewelry.

[0025] The optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling to obtain models of various types of jewelry.

[0026] The present invention has the following beneficial effects:

[0027] (1) The present invention provides a modeling method, model and detection method of a jewelry automatic detection model. First, the pre-processed image data of each type of jewelry is analyzed to obtain the image detection influence characterization value of each type of jewelry, which helps to improve the adaptability of the jewelry automatic detection model to various conditions and improve the accuracy of jewelry detection. Then, the optimized images of each type of jewelry are analyzed and then modeled according to the optimized images of each type of jewelry. The jewelry automatic detection model can be adjusted in time, which helps to reduce the error rate of the jewelry automatic detection model during the detection process.

[0028] (2) The present invention obtains the image detection influence characterization value of each type of jewelry by analysis, which helps to describe the image features of different types of jewelry more accurately. Considering the features of images of different types of jewelry helps to distinguish different types of jewelry more accurately. Detailed analysis of the features of jewelry images can reduce the false detection rate and improve the accuracy of the jewelry automatic detection model.

[0029] (3) The present invention obtains optimized images of various types of jewelry through analysis and optimizes and adjusts the images of various types of jewelry, thereby improving the quality of jewelry images. The optimized images of various types of jewelry can accurately reflect the characteristics of jewelry images, thereby improving the practicality of the jewelry automatic detection model. The optimized images of various types of jewelry are usually easier to process, which helps to improve the accuracy of jewelry recognition by the jewelry automatic detection model.

[0030] (4) The present invention obtains models of various types of jewelry through analysis and uses optimized images of various types of jewelry for modeling, which can improve the model's recognition accuracy of jewelry features. The optimized images of various types of jewelry can better show the detailed features of jewelry, allowing the jewelry automatic detection model to more accurately detect and identify jewelry, thereby improving the reliability and practicality of the jewelry automatic detection model. At the same time, it helps the jewelry automatic detection model to better adapt to different types of jewelry and enhance the applicability of the jewelry automatic detection model.

[0031] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a schematic diagram of the modeling method flow of the present invention.

[0033] Figure 2 It is a schematic diagram of the detection method of the present invention.

[0034] Figure 3 Example images that affect the second characterization value for image detection of jewelry. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] See also Figure 1As shown, an embodiment of the present invention provides a technical solution: a modeling method for a jewelry automatic detection model, including collecting image data of various types of jewelry in a data set, labeling and preprocessing the image data of various types of jewelry.

[0037] It should be noted that the image data of each type of jewelry is labeled and preprocessed. The specific process is to first use an image annotation tool to annotate the jewelry image, mark the jewelry type to which each image belongs, and then adjust the image size of each type to a uniform size, and then enhance the image contrast, color and other data to obtain the preprocessed image data of each type of jewelry.

[0038] The preprocessed image data of each type of jewelry is analyzed to obtain the image detection influence characterization values ​​of each type of jewelry. The image optimization parameters of each type of jewelry are obtained according to the image detection influence characterization values ​​of each type of jewelry, and the images of each type of jewelry are adjusted to obtain the optimized images of each type of jewelry.

[0039] The optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling to obtain models of various types of jewelry.

[0040] Specifically, the preprocessed image data of each type of jewelry is analyzed, and the specific analysis process is: the preprocessed image data of each type of jewelry includes images of each type of jewelry, standard images of each type of jewelry, and image sizes of each type of jewelry.

[0041] Grayscale processing is performed on the images of various types of jewelry to obtain grayscale images of various types of jewelry, the maximum brightness and minimum brightness of various types of jewelry are extracted from the grayscale images of various types of jewelry, and the pixel standard deviation of the image of each type of jewelry is counted as the contrast value of the image of each type of jewelry, and the first characterization value of the image detection impact of each type of jewelry is obtained after processing.

[0042] The grayscale images of each type of jewelry are divided into regions, the variance of the pixel values ​​of each region in the grayscale images of each type of jewelry is extracted, and the saturation value of each region in the image of each type of jewelry is counted, and the second representation value of the image detection impact of each type of jewelry is obtained after processing.

[0043] It should be noted that the second characterization value of image detection of each type of jewelry represents the quantitative results for analyzing the image color and texture characteristics of each type of jewelry obtained by performing data analysis and processing on the variance of the pixel values ​​of each area in the grayscale image of each type of jewelry and the saturation value of each area in the image of each type of jewelry, and serves as the analysis basis for the characterization value of image detection of each type of jewelry. It can be obtained by the following analysis method, and the specific analysis conditions are as follows:

[0044] ;

[0045] In the formula, Indicates that the image detection of the i-th type of jewelry affects the second representation value, represents the variance of the pixel values ​​of the jth region in the grayscale image of the i-th type of jewelry, represents the variance of the set reference pixel value, Indicates the influence factor corresponding to the variance of the set pixel value, represents the saturation value of the jth region in the image of the i-th type of jewelry, Indicates the set reference saturation value. Indicates the impact factor corresponding to the set saturation value, i represents the number of each type of jewelry,

[0046] , represents the total number of types, j represents the number of each area, , represents the total number of regions, Represents a natural constant.

[0047] It should be noted that if Figure 3 As shown, Figure 3 This is an example image of the impact of jewelry image detection on the second characterization value, where the x-axis represents the saturation value of each area of ​​the jewelry image, and the y-axis represents the impact of jewelry image detection on the second characterization value. The figure defines three different sets of example parameters, corresponding to different situations of the three curves, represented by solid lines, dotted lines and dashed lines respectively, and the corresponding curve labels are a, b, and c. When the variance of the pixel values ​​of each area of ​​the jewelry image is 0.22, the functional relationship between the second characterization value of the jewelry image detection and the saturation value of each area of ​​the jewelry image is shown in curve a. When the variance of the pixel values ​​of each area of ​​the jewelry image is 0.21, the jewelry The functional relationship between the second characterization value of image detection and the saturation value of each image area of ​​the jewelry is shown as curve b. When the variance of the pixel values ​​of each image area of ​​the jewelry is 0.20, the functional relationship between the second characterization value of image detection of the jewelry and the saturation value of each image area of ​​the jewelry is shown as curve c. The second characterization value of image detection of the jewelry increases with the increase of the saturation value of each image area of ​​the jewelry, and when the saturation value of each image area of ​​the jewelry increases, the second characterization value of image detection of the jewelry increases accordingly, and the influence of the saturation value of each image area of ​​the jewelry on the characterization value of image detection of the jewelry becomes greater.

[0048] In an embodiment, the distribution of different colors in the image may also be displayed through a color histogram, and then the second characterization value of the image detection impact of each type of jewelry may be obtained through analysis.

[0049] It should be noted that analyzing the impact of image detection of various types of jewelry on the second representation value helps provide more abundant image information for the jewelry automatic detection model and enhances the jewelry automatic detection model's ability to recognize different types of jewelry.

[0050] It should be noted that the variance of the pixel values ​​of each area in the grayscale image of each type of jewelry represents the degree of change of the pixel values ​​of each area. Image processing technology is used to extract pixel values ​​and calculate the variance of pixel values. For example, assuming that the three pixel values ​​of a certain area in the grayscale image of a certain type of jewelry are 20, 30, and 40 respectively, then the average pixel value of the area in the grayscale image of this type of jewelry is (20+30+40)÷3=30, and the variance of the pixel values ​​of the area in the grayscale image of this type of jewelry is [(30-20) 2 +(30-30) 2 +(40-30) 2 ]÷3=66.67.

[0051] It should be noted that the variance of the reference pixel value is usually obtained by statistical analysis of historical data. The specific steps are to statistically analyze the variance of the reference pixel values ​​of each area in the grayscale image of the historical jewelry, and calculate the average value of these data to obtain the variance of the reference pixel value. For example, assuming that the average value of the variance of the reference pixel value of a certain area in the grayscale image of a certain type of jewelry in the historical data is 68, according to the statistical results, it can be obtained that the variance of the reference pixel value of the area in the grayscale image of the type of jewelry is 68.

[0052] It should be noted that the saturation value of each area of ​​the image of each type of jewelry represents the purity and vividness of the color in the image. The saturation value is calculated using the image database. For example, assuming that the saturation values ​​of the four pixel values ​​in a certain area of ​​the image of a certain type of jewelry are 20, 22, 26, and 28 respectively, then the saturation value of the area in the image of this type of jewelry is (20+22+26+28)÷4=24.

[0053] It should be noted that the reference saturation value is usually obtained by statistical analysis of historical data. The specific steps are to count the reference saturation values ​​of each area in the image of historical jewelry, and calculate the average value of these data to obtain the reference saturation value. For example, assuming that the average value of the reference saturation value of a certain area in the image of a certain type of jewelry in the historical data is 30, according to the statistical results, it can be obtained that the reference saturation value of the area in the image of the type of jewelry is 30.

[0054] It should be noted that the influence factors corresponding to the variance of pixel values ​​and the influence factors corresponding to the saturation values ​​are obtained through historical data analysis. Specifically, after statistical analysis, it is found that the variance of the pixel values ​​in a certain area in the grayscale image of a certain type of jewelry is 50, and the saturation value of the area is 30. When the variance of the pixel values ​​in the grayscale image of the type of jewelry reaches 70, it may cause the details in the jewelry image to be lost or blurred, which will affect the clarity of the jewelry image. In addition, when the saturation value of the area reaches 60, it may cause color distortion in the jewelry image, and the texture features in the jewelry image cannot be clearly displayed. Therefore, when the variance of the pixel values ​​in the area exceeds 50, the influence factor corresponding to the variance of the pixel values ​​in the area can be set to 0.7, when the variance of the pixel values ​​in the area reaches 70, the influence factor corresponding to the variance of the pixel values ​​in the area is set to a maximum value of 1.4, when the saturation value of the area exceeds 30, the influence factor corresponding to the saturation value of the area can be set to 0.5, and when the saturation value of the area reaches 60, the influence factor corresponding to the saturation value of the area is set to a maximum value of 1.5.

[0055] It should be explained that in this embodiment, the variance of pixel values ​​in each area of ​​the grayscale image of each type of jewelry and the saturation value of each area of ​​the image of each type of jewelry are analyzed, which can improve the performance and effect of the jewelry automatic detection model. In the analysis method of this embodiment, a larger variance of pixel values ​​helps the jewelry automatic detection model to better identify the position and boundaries of the jewelry, and a higher saturation value helps the jewelry automatic detection model to better locate the type of jewelry and identify areas related to the jewelry.

[0056] In this implementation, analyzing the variance of pixel values ​​in each area of ​​the grayscale images of each type of jewelry helps the jewelry automatic detection model to better understand the characteristics of the jewelry images. Analyzing the saturation values ​​of each area of ​​the images of each type of jewelry helps the jewelry automatic detection model to better adapt to image changes under different environmental conditions, thereby improving the detection efficiency of the jewelry automatic detection model. Analyzing the second representation value that affects image detection of each type of jewelry can more effectively identify flaws or defects in the jewelry, thereby improving the accuracy and sensitivity of anomaly detection.

[0057] The standard images of each type of jewelry are extracted and compared with the grayscale images of each type of jewelry. The rotation offset of the images of each type of jewelry is analyzed, and the size of the images of each type of jewelry is extracted. Then, the third characterization value affecting the image detection of each type of jewelry is analyzed.

[0058] It should be noted that the third characterization value of the image detection of each type of jewelry represents the quantitative result for analyzing the stability of image features obtained by performing data analysis and processing on the rotation offset of the image of each type of jewelry and the size of the image of each type of jewelry, and serves as the analysis basis for the characterization value of the image detection of each type of jewelry. It can be obtained by the following analysis method, and the specific analysis conditions are as follows:

[0059] ;

[0060] In the formula, Indicates that the image detection of the i-th type of jewelry affects the third characterization value, represents the rotation offset of the image of the i-th type of jewelry, Indicates the set reference rotation offset. Indicates the influence factor corresponding to the set rotation offset. represents the size of the image of the i-th type of jewelry, Indicates the reference size set. It indicates the influence factor corresponding to the set size, i indicates the number of each type of jewelry, , Indicates the total number of jewelry types.

[0061] It should be noted that Table 1 shows the third characterization value of image detection corresponding to different rotation offsets and sizes of images of the same type of jewelry.

[0062] Table 1 The third characterization value affected by image detection for the same type of jewelry images with different rotation offsets and sizes

[0063] Rotation offset (°) Size (Pixel) Image detection affects the third characterization value 2 12 0.953 3 20 1.125 5 35 1.675 8 65 2.342

[0064] It should be noted that in Table 1, as the rotation offset and size of the jewelry image increase, the value of the third characterization value affected by image detection also increases, and the rotation offset and size of the jewelry image also have a greater impact on the jewelry automatic detection model. The third characterization value of the image detection of the jewelry image in Table 1 combines the rotation offset and size of the jewelry image for analysis, lists four different rotation offset and size values ​​of the same type of jewelry image, and derives the third characterization value of the image detection of the jewelry image through the formula. The values ​​of the third characterization values ​​of the image detection of these jewelry images provide the degree of influence of jewelry detection under different conditions, which helps the jewelry automatic detection model to make timely adjustments. The third characterization value of the image detection of each type of jewelry comprehensively considers the rotation offset and size of the jewelry image, provides data support for the optimization of jewelry images, and thus improves the detection accuracy of the jewelry automatic detection model.

[0065] In an embodiment, the third characterization value of the image detection impact of each type of jewelry may also be obtained by analyzing local features of the jewelry image.

[0066] It should be noted that analyzing the impact of image detection of various types of jewelry on the third characterization value can help optimize the modeling method of the jewelry automatic detection model. It can also enable the jewelry automatic detection model to adapt to jewelry images of different angles and sizes, thereby improving the detection accuracy of the jewelry automatic detection model in actual scenarios.

[0067] It should be noted that the rotation offset of the image of each type of jewelry refers to the rotation offset of the image of each type of jewelry relative to the standard image of each type of jewelry. The rotation offset of the image is measured using edge detection technology. For example, assuming that the edge detection technology measures that the rotation offset of the image of a certain type of jewelry relative to the standard image of this type of jewelry is 10°, then the rotation offset of the image of this type of jewelry is 10°.

[0068] It should be noted that the reference rotation offset of images of various types of jewelry is usually obtained by statistical analysis of historical data. The specific steps are to statistically analyze the reference rotation offset of images of various types of jewelry in history, and calculate the average value of these data to obtain the reference rotation offset. By way of example, assuming that the average value of the reference rotation offset of images of a certain type of jewelry in historical data is 20°, according to the statistical results, it can be obtained that the reference rotation offset of images of this type of jewelry is 20°.

[0069] It should be noted that the size of the image of each type of jewelry is described by width and height (number of pixels), which is measured by image processing software. For example, assuming that the size of the image of a certain type of jewelry measured by the function in the image processing software is 1500 pixels in width and 2000 pixels in height, then the size of the image of this type of jewelry is 1500 pixels in width and 2000 pixels in height.

[0070] It should be noted that the sizes of the images of various types of jewelry are measured by image processing software. The specific measurement process is to import the image file into the image processing software, select the line segment measurement tool, and measure the sizes of the images of various types of jewelry.

[0071] It should be noted that the reference size of images of various types of jewelry is usually obtained by statistical analysis of historical data. The specific steps are to count the reference sizes of images of various types of jewelry in history, and calculate the average value of these data to obtain the reference size. By way of example, assuming that the average size of images of a certain type of jewelry in historical data is 2000 pixels in width and 2000 pixels in height, according to the statistical results, the reference size of images of this type of jewelry can be obtained as 2000 pixels in width and 2000 pixels in height.

[0072] Through historical data analysis, we get the influencing factors corresponding to the rotation offset and size of each type of jewelry image. Specifically, after statistical analysis, we get that the rotation offset of a certain type of jewelry image is 10°, and the size of the jewelry image is 1500 pixels wide and 2000 pixels high. When the rotation offset of the jewelry image reaches 30°, some jewelry image details may be hidden, making it difficult for the jewelry automatic detection model to accurately identify the type of jewelry. In addition, when the size of the jewelry image reaches 4000 pixels wide and 4000 pixels high, more storage space will be required, which may increase the server storage cost and affect the jewelry automatic detection. The measurement model is used, therefore, when the rotation offset of the image of this type of jewelry exceeds 10°, the impact factor corresponding to the rotation offset of the image of this type of jewelry can be set to 0.3, when the rotation offset of the image of this type of jewelry reaches 30°, the impact factor corresponding to the rotation offset of the image of this type of jewelry is set to a maximum value of 1.0, when the size of the jewelry image exceeds 1500 pixels in width and 2000 pixels in height, the impact factor corresponding to the size of the jewelry image can be set to 0.9, when the size of the jewelry image reaches 4000 pixels in width and 4000 pixels in height, the impact factor corresponding to the size of the jewelry image is set to a maximum value of 1.8.

[0073] It should be explained that the analysis of the rotation offset and size of the jewelry image in this embodiment is helpful to optimize the training of the jewelry automatic detection model and improve the performance of the jewelry automatic detection model under different conditions. The analysis method of this embodiment, the larger rotation offset and larger size of the jewelry image indicate that the image has changed significantly, which helps to adjust the adaptability of the jewelry automatic detection model.

[0074] In this implementation, analyzing the rotational offset of images of various types of jewelry helps optimize the feature selection process, allowing the jewelry automatic detection model to focus more on learning key features, thereby improving the accuracy and efficiency of the jewelry automatic detection model. Analyzing the size of images of various types of jewelry helps to appropriately preprocess the image data and better optimize the size of jewelry images. Analyzing the third characterization value that affects image detection of various types of jewelry helps to improve the stability of the jewelry automatic detection model in practical applications.

[0075] According to the first characterization value affected by image detection of each type of jewelry, the second characterization value affected by image detection of each type of jewelry, and the third characterization value affected by image detection of each type of jewelry, a comprehensive analysis is performed to obtain the image detection impact characterization value of each type of jewelry.

[0076] In this implementation, analyzing and obtaining the image detection impact characterization values ​​of various types of jewelry helps to improve the adaptability of the jewelry automatic detection model to various conditions and improve the detection accuracy.

[0077] Specifically, the image detection impact characterization value of each type of jewelry is a numerical quantification result obtained by analyzing the image data of each type of jewelry, and is used to quantify the degree of influence of different factors on the image detection of each type of jewelry.

[0078] Specifically, the image optimization parameters of each type of jewelry are obtained according to the matching of the image detection influence characterization values ​​of each type of jewelry. The specific matching process is: according to the image detection influence characterization values ​​of each type of jewelry, the image optimization parameters corresponding to the set image detection influence characterization value intervals of each type of jewelry are compared to obtain the image optimization parameters of each type of jewelry.

[0079] In this implementation, matching the image optimization parameters of each type of jewelry helps to improve the performance of the jewelry automatic detection model, so that the jewelry automatic detection model can more accurately identify different types of jewelry, thereby improving the practicality and reliability of the jewelry automatic detection model.

[0080] Specifically, the images of various types of jewelry are adjusted to obtain optimized images of various types of jewelry. The specific analysis process is: the image brightness and contrast data of various types of jewelry are adjusted according to the image optimization parameters of various types of jewelry, the RGB value of each pixel in the image of each type of jewelry is multiplied by a constant to increase or decrease the image brightness value of each type of jewelry, and the brightness of each pixel in the image of each type of jewelry is linearly transformed to increase or decrease the contrast, so as to obtain optimized images of various types of jewelry.

[0081] In this implementation, optimizing images of various types of jewelry can help the jewelry automatic detection model better understand the characteristics of jewelry, thereby improving the generalization ability of the jewelry automatic detection model. Optimizing the image by adjusting the parameters of the image helps reduce the error rate of the jewelry automatic detection model during the detection process.

[0082] Specifically, the optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling to obtain the models of various types of jewelry. The specific analysis process is: the optimized image data of various types of jewelry are preprocessed. The specific process is: first, the size of the optimized images of various types of jewelry is adjusted, and then the optimized images of various types of jewelry are converted into grayscale images, and then the grayscale images are data enhanced. The preprocessed optimized images of various types of jewelry are imported into the jewelry automatic detection model to obtain the models of various types of jewelry.

[0083] Specifically, the image detection impact characterization values ​​of various types of jewelry can be obtained not only by pattern recognition and analysis using historical data, but also by the following calculation method. The specific analysis conditions are:

[0084] ;

[0085] In the formula, represents the image detection impact characterization value of the i-th type of jewelry, Indicates that the image detection of the i-th type of jewelry affects the first characterization value, Indicates the weight factor corresponding to the first characterization value affected by the set image detection, Indicates that the image detection of the i-th type of jewelry affects the second representation value, Indicates the weight factor corresponding to the second characterization value affected by the set image detection, Indicates that the image detection of the i-th type of jewelry affects the third characterization value, represents the weight factor corresponding to the third characterization value affected by the set image detection, i represents the serial number of each type of jewelry, , Indicates the total number of jewelry types.

[0086] It should be noted that the weight factor corresponding to the first characterization value affected by image detection, the weight factor corresponding to the second characterization value affected by image detection, and the weight factor corresponding to the third characterization value affected by image detection obtained through historical data analysis are all random numbers between 0 and 1. The bias of the first characterization value affected by image detection of each type of jewelry, the bias of the second characterization value affected by image detection of each type of jewelry, and the bias of the third characterization value affected by image detection of each type of jewelry are determined by multiple factors such as image brightness, saturation value, and rotation offset. These factors work together to affect the final value of the bias. The bias involved in this embodiment is all in the range of 0 to 1.

[0087] It should be noted that analyzing the image detection impact characterization values ​​of various types of jewelry can help extract more accurate image representations, enabling the jewelry automatic detection model to better distinguish different types of jewelry and improve the accuracy and stability of the jewelry automatic detection model.

[0088] It should be explained that in this embodiment, analyzing the image detection impact of the first characterization value, the image detection impact of the second characterization value and the image detection impact of the third characterization value for each type of jewelry can improve the performance of the jewelry automatic detection model. The analysis method of this embodiment, the larger the image detection impact of the first characterization value, the larger the image detection impact of the second characterization value and the larger the image detection impact of the third characterization value of jewelry indicate that the image is more diverse, which helps to help the jewelry automatic detection model to more accurately identify the jewelry type.

[0089] In this implementation, the image detection influence characterization values ​​of various types of jewelry are analyzed to help the jewelry automatic detection model to process images of different scenes more robustly, enable the jewelry automatic detection model to better adapt to the influence of factors such as background changes in the image, and improve the performance and efficiency of the jewelry automatic detection model.

[0090] Specifically, the first characterization value of the impact of image detection of various types of jewelry can be obtained not only by pattern recognition and analysis using historical data, but also by the following calculation method. The specific analysis conditions are:

[0091] ;

[0092] In the formula, Indicates that the image detection of the i-th type of jewelry affects the first characterization value, represents the maximum brightness value of the image of the i-th type of jewelry, Indicates the weight factor corresponding to the maximum difference in brightness value of the set image. represents the minimum brightness value of the image of the i-th type of jewelry, represents the contrast value of the image of the i-th type of jewelry, Indicates the weight factor corresponding to the set contrast value of the image.

[0093] It should be noted that the weight factor corresponding to the maximum difference in brightness values ​​of the images of the various types of jewelry and the weight factor corresponding to the contrast are both random numbers between 0 and 1. The offset of the brightness value of the images of the various types of jewelry and the offset of the contrast of the images of the various types of jewelry are determined by many factors such as lighting and image background. These factors work together to affect the final value of the offset. The offsets involved in this embodiment are all in the range of 0 to 1.

[0094] It should be noted that analyzing the impact of image detection of various types of jewelry on the first characterization value can help the jewelry automatic detection model better cope with the influence of factors such as lighting changes and brightness differences, improve the stability of the jewelry automatic detection model, and provide data support for optimizing images of various types of jewelry.

[0095] It should be noted that the maximum brightness value of each type of jewelry image refers to the brightness value of the brightest pixel in the image. The maximum brightness value of each type of jewelry image is calculated by a programming language. For example, each pixel in the grayscale image is traversed by a programming language, and the maximum brightness value is recorded. If the maximum brightness value of a certain type of jewelry image is 50 after calculation, then the maximum brightness value of the image of this type of jewelry is 50. Similarly, the minimum brightness value of each type of jewelry image refers to the brightness value of the darkest pixel in the image. For example, if the minimum brightness value of a certain type of jewelry image is 3 after calculation, then the minimum brightness value of the image of this type of jewelry is 3.

[0096] It should be noted that the contrast value of images of various types of jewelry represents the degree of brightness variation in different areas of the image. The image contrast is evaluated using a software tool using the image histogram. The histogram displays the number of pixels or percentage of pixels at each grayscale level in the image, and calculates the standard deviation of the pixel values ​​in the histogram, which is used as the image contrast value.

[0097] In this implementation, the first characterization value of the image detection impact of each type of jewelry is analyzed, so as to optimize the modeling method of the jewelry automatic detection model, improve the adaptability of the jewelry automatic detection model to different scenarios, and improve the detection accuracy of the jewelry automatic detection model.

[0098] A second aspect of the present invention provides a jewelry automatic detection model, including: the jewelry automatic detection model is obtained by any of the above methods.

[0099] The third aspect of the present invention provides a detection method for a jewelry automatic detection model, comprising: collecting image data of each type of jewelry in a data set, analyzing to obtain image optimization parameters of each type of jewelry, and adjusting the image of each type of jewelry to obtain optimized images of each type of jewelry.

[0100] The optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling to obtain models of various types of jewelry.

[0101] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0102] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A modeling method for automatic jewelry detection model, characterized in that: include: Collect image data of various types of jewelry in the data set, annotate and preprocess the image data of various types of jewelry; Analyze the preprocessed image data of each type of jewelry to obtain image detection influence characterization values ​​of each type of jewelry, match the image detection influence characterization values ​​of each type of jewelry to obtain image optimization parameters of each type of jewelry, and adjust the images of each type of jewelry to obtain optimized images of each type of jewelry; Import optimized images of various types of jewelry into the jewelry automatic detection model for modeling, and obtain models of various types of jewelry; The pre-processed image data of each type of jewelry is analyzed, and the specific analysis process is as follows: The preprocessed image data of each type of jewelry includes images of each type of jewelry, standard images of each type of jewelry, and image sizes of each type of jewelry; Grayscale processing is performed on the images of various types of jewelry to obtain grayscale images of various types of jewelry, the maximum brightness and minimum brightness of various types of jewelry are extracted from the grayscale images of various types of jewelry, and the pixel standard deviation of the images of various types of jewelry is counted as the contrast value of the images of various types of jewelry, and the first characterization value of the image detection influence of various types of jewelry is obtained after processing; Divide the grayscale images of each type of jewelry into regions, extract the variance of the pixel values ​​of each region in the grayscale images of each type of jewelry, and count the saturation values ​​of each region in the images of each type of jewelry, and obtain the second representation value of the image detection influence of each type of jewelry after processing; Extract standard images of various types of jewelry, compare them with grayscale images of various types of jewelry, analyze and obtain the rotation offset of the images of various types of jewelry, extract the size of the images of various types of jewelry, and then analyze and obtain the third characterization value of the image detection influence of various types of jewelry; According to the first characterization value of image detection influence of each type of jewelry, the second characterization value of image detection influence of each type of jewelry, and the third characterization value of image detection influence of each type of jewelry, a comprehensive analysis is performed to obtain the image detection influence characterization value of each type of jewelry; The image detection impact characterization value of each type of jewelry is a numerical quantification result obtained by analyzing the image data of each type of jewelry, and is used to quantify the influence of different factors on the image detection of each type of jewelry; The image optimization parameters of each type of jewelry are obtained by matching the image detection influence characterization values ​​of each type of jewelry. The specific matching process is: According to the image detection influence characterization value of each type of jewelry, the image optimization parameters corresponding to each set image detection influence characterization value interval of each type of jewelry are compared to obtain the image optimization parameters of each type of jewelry; The image detection of each type of jewelry affects the first characterization value, and the specific analysis conditions are: ; In the formula, Indicates that the image detection of the i-th type of jewelry affects the first characterization value, represents the maximum brightness value of the image of the i-th type of jewelry, Indicates the weight factor corresponding to the maximum difference in brightness value of the set image. represents the minimum brightness value of the image of the i-th type of jewelry, represents the contrast value of the image of the i-th type of jewelry, Indicates the weight factor corresponding to the set contrast value of the image; The image detection of each type of jewelry affects the second characterization value, and the specific analysis conditions are as follows: ; In the formula, Indicates that the image detection of the i-th type of jewelry affects the second representation value, represents the variance of the pixel values ​​of the jth region in the grayscale image of the i-th type of jewelry, represents the variance of the set reference pixel value, Indicates the influence factor corresponding to the variance of the set pixel value, represents the saturation value of the jth region in the image of the i-th type of jewelry, Indicates the set reference saturation value. Indicates the impact factor corresponding to the set saturation value, i represents the number of each type of jewelry, , represents the total number of types, j represents the number of each area, , represents the total number of regions, represents a natural constant; The image detection of each type of jewelry affects the third characterization value, and the specific analysis conditions are as follows: ; In the formula, Indicates that the image detection of the i-th type of jewelry affects the third characterization value, represents the rotation offset of the image of the i-th type of jewelry, Indicates the reference rotation offset set. Indicates the influence factor corresponding to the set rotation offset. represents the size of the image of the i-th type of jewelry, Indicates the reference size set. It indicates the influence factor corresponding to the set size, i indicates the number of each type of jewelry, , Indicates the total number of jewelry types.

2. The modeling method of a jewelry automatic detection model according to claim 1, characterized in that: The images of various types of jewelry are adjusted to obtain optimized images of various types of jewelry. The specific analysis process is as follows: The image brightness and contrast data of each type of jewelry are adjusted according to the image optimization parameters of each type of jewelry. The RGB value of each pixel in the image of each type of jewelry is multiplied by a constant to increase or decrease the image brightness value of each type of jewelry. The brightness of each pixel in the image of each type of jewelry is linearly transformed to increase or decrease the contrast, thereby obtaining the optimized image of each type of jewelry.

3. The modeling method of a jewelry automatic detection model according to claim 1, characterized in that: The optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling, and the models of various types of jewelry are obtained. The specific analysis process is as follows: The optimized image data of each type of jewelry is preprocessed. The specific process is as follows: first, the size of the optimized image of each type of jewelry is adjusted, and then the optimized image of each type of jewelry is converted into a grayscale image, and then the grayscale image is data enhanced. The preprocessed optimized image of each type of jewelry is imported into the jewelry automatic detection model to obtain the model of each type of jewelry.

4. The modeling method of a jewelry automatic detection model according to claim 1, characterized in that: The image detection of each type of jewelry affects the characterization value, and the specific analysis conditions are: ; In the formula, represents the image detection impact characterization value of the i-th type of jewelry, Indicates that the image detection of the i-th type of jewelry affects the first characterization value, Indicates the weight factor corresponding to the first characterization value affected by the set image detection, Indicates that the image detection of the i-th type of jewelry affects the second representation value, Indicates the weight factor corresponding to the second characterization value affected by the set image detection, Indicates that the image detection of the i-th type of jewelry affects the third characterization value, represents the weight factor corresponding to the third characterization value affected by the set image detection, i represents the serial number of each type of jewelry, , Indicates the total number of jewelry types.

5. A jewelry automatic detection model device, characterized by: The jewelry automatic detection model device includes a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the jewelry automatic detection model device is triggered to execute any one of the methods described in claims 1 to 4.

6. A method for detecting a jewelry automatic detection model, characterized in that: The detection method of the jewelry automatic detection model is implemented by the model device described in claim 5, comprising: Collect image data of various types of jewelry in the data set, analyze and obtain image optimization parameters of various types of jewelry, and adjust the images of various types of jewelry to obtain optimized images of various types of jewelry; The optimized images of various types of jewelry are imported into the jewelry automatic detection model for modeling to obtain models of various types of jewelry.