Jewelry detection modeling method and system and storage medium
By constructing the KD tree index structure of jewelry features and the gradient descent algorithm to optimize material parameters, the problem of inaccurate jewelry light propagation simulation in the existing technology is solved, efficient jewelry detection and modeling is achieved, and the authenticity of the rendered image and the reliability of the detection results are improved.
Patent Information
- Application Number
- CN202510328445.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art is difficult to accurately and efficiently simulate the propagation process of complex light within jewelry, resulting in insufficient consistency between the rendered image of jewelry detection results and the real visual consistency.
The SIFT algorithm is used to extract jewelry feature parameters, build KD tree hierarchical index structure and standardized feature vectors, and search similar images. Combined with the geometric shape fusion algorithm to generate a three-dimensional jewelry model. The material parameters and ray tracing recursive layers are optimized through the gradient descent algorithm, and the light propagation path is dynamically adjusted to simulate optical characteristics.
It realizes accurate simulation of light propagation inside jewelry, improves the authenticity of rendered images and the reliability of detection results, and improves modeling efficiency.
Smart Images

Figure CN120259539A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of jewelry detection, and particularly to a modeling method, system and storage medium for jewelry detection. Background Art
[0002] At present, with the growth of the jewelry industry's demand for digital design and detection, how to quickly construct a high-precision three-dimensional jewelry model and achieve a true restoration of the optical properties of materials has become a technical difficulty. Especially when dealing with complex optical effects such as the specular reflection of precious metals and the light scattering inside gemstones, traditional methods face challenges of low modeling efficiency and insufficient rendering authenticity.
[0003] In an existing technology, jewelry detection modeling usually adopts multi-view image acquisition and feature matching technology, and combines a simplified lighting model based on empirical parameters for three-dimensional reconstruction and surface rendering. For example, after the preliminary model construction is achieved through SIFT feature point matching, a ray tracing algorithm with a fixed recursive layer number is used to simulate the surface reflection effect, and the material parameters are adjusted manually to approximate the true visual effect. However, the optical properties of jewelry materials are highly complex. Especially inside gemstones such as diamonds, there are multiple refraction and dispersion phenomena, and the surface of precious metals involves a mixed effect of specular reflection and diffuse reflection at the microstructural level. The simplified lighting model in the existing technology is difficult to accurately describe such physical processes, and the ray tracing with a fixed recursive layer number is difficult to balance the rendering accuracy and calculation efficiency, resulting in difficulty in accurately and efficiently simulating the propagation process of complex light inside jewelry, and the visual consistency between the rendered image and the real jewelry is insufficient, directly affecting the reliability of the detection results.
[0004] There is a problem in the existing technology that it is difficult to accurately and efficiently simulate the propagation process of complex light inside jewelry. Summary of the Invention
[0005] The present invention provides a modeling method, system and storage medium for jewelry detection to accurately and efficiently simulate the propagation process of complex light inside jewelry.
[0006] In a first aspect, to solve the above technical problems, the present invention provides a modeling method for jewelry detection, including: Obtaining a target jewelry image; Extracting jewelry feature parameters from the target jewelry image by using the SIFT algorithm, and using the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a standardized jewelry feature vector; Performing similar image retrieval on the KD-tree hierarchical index structure and the standardized jewelry feature vector to obtain similar images; According to the similar images, performing similar jewelry feature extraction, and performing modeling through a geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model; According to the three-dimensional jewelry model, the gradient descent algorithm is used to optimize the material parameters and the number of recursive layers of ray tracing to generate a high-fidelity jewelry image; According to the high-fidelity jewelry image, visual attribute parameters and style classification information are extracted, and multi-dimensional comparison is performed with the target jewelry image to obtain the overall jewelry similarity; The overall jewelry similarity is compared with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, the current high-fidelity jewelry image is determined as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, the local details of the three-dimensional jewelry model are iteratively adjusted and re-optimized for rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained.
[0007] In an alternative embodiment, the obtaining of the target jewelry image includes: Obtain an initial jewelry image dataset; According to the jewelry image dataset, adjust the image brightness distribution to obtain a preliminary jewelry image dataset with balanced brightness; According to the preliminary jewelry image dataset, perform image denoising and enhance the edge details of the image to obtain the target jewelry image.
[0008] In an alternative embodiment, the extraction of jewelry feature parameters from the target jewelry image using the SIFT algorithm and the use of the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a normalized jewelry feature vector includes: According to the target jewelry image, use a preset SIFT algorithm to extract 128-dimensional feature descriptors for each reference image, and obtain jewelry feature parameters including gradient histograms, brightness contrast, and texture feature values; According to the jewelry feature parameters, use the split space method to recursively divide the feature vector space, and determine the node division dimension with the median splitting strategy to generate KD-tree hierarchical nodes; According to the KD-tree hierarchical nodes, determine the splitting threshold for each KD-tree hierarchical node based on the branch judgment method, calculate and store the backtracking path optimization parameters, and construct a hierarchical KD-tree index structure; According to the target jewelry image, the jewelry feature parameters, the KD-tree index structure, and the backtracking path optimization parameters, perform spatial coordinate normalization processing to generate a normalized jewelry feature vector adapted to the KD-tree index.
[0009] In an alternative embodiment, the retrieval of similar images from the KD-tree hierarchical index structure and the normalized jewelry feature vector to obtain similar images includes: According to the KD-tree hierarchical index structure and the standardized jewelry feature vectors, the RANSAC algorithm is used to estimate the affine transformation matrix for the matched feature points in the KD-tree hierarchical index structure, eliminate the coordinate offset caused by the perspective difference, and obtain the affine transformation matrix; According to the affine transformation matrix and the standardized jewelry feature vectors, perform feature pose correction to generate a set of standardized feature descriptors after perspective alignment; According to the set of standardized feature descriptors and the KD-tree hierarchical index structure, perform dynamic backtracking search, optimize the backtracking path using the branch judgment method, and perform screening in combination with a preset Euclidean distance threshold to obtain the nearest neighbor feature vectors; According to the nearest neighbor feature vectors and the set of standardized feature descriptors, perform spatial distribution consistency verification, eliminate abnormal matching points deviating from the affine transformation model, and generate a list of candidate similar images; According to the list of candidate similar images, based on geometric constraint conditions, analyze the feature matching density, calculate the confidence of feature matching for each image, and perform screening in combination with a preset confidence threshold of feature matching to obtain similar images.
[0010] In an alternative embodiment, the extracting of similar jewelry features from the similar images, and modeling through the geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model includes: According to the similar images, analyze the geometric shape features of the jewelry, use the Canny edge detection algorithm to extract the jewelry contour, calculate the area, perimeter and aspect ratio parameters of the contour, and obtain the geometric feature vectors; Use the historical geometric feature vectors as input and the historical style classification labels as output to construct and train a style classification model. When the number of training times is greater than or equal to the preset number of training times, it is determined that the training is completed, and a trained style classification model is obtained; Input the geometric feature vectors into the trained style classification model to obtain the style classification labels; According to the style classification labels and the similar images, perform main stone type and metal material analysis, and construct three-dimensional model screening conditions including style classification, main stone type and metal material; According to the similar images and the three-dimensional model screening conditions, match candidate models in a preset three-dimensional jewelry model library, and perform spatial alignment of the geometric features of the candidate models and the target jewelry through the iterative closest point algorithm to obtain the geometric matching degree; According to the geometric matching degree, use the Poisson reconstruction algorithm to fuse local geometric shape values, and optimize the surface curvature through the Laplacian smoothing algorithm to generate a preliminary three-dimensional jewelry model with continuous transition; Based on the preliminary three-dimensional jewelry model, perform a grid topology consistency check, repair the holes and non-manifold structures of the model, and obtain a continuous and smooth three-dimensional jewelry model.
[0011] In an alternative embodiment, based on the three-dimensional jewelry model, use the gradient descent algorithm to optimize the material parameters and the number of ray tracing recursions, and generate a high-fidelity jewelry image, including: Based on the three-dimensional jewelry model, perform a preliminary analysis based on the BRDF model to determine the optical material parameters of the jewelry surface, including the diffuse reflection coefficient, specular reflection coefficient, and roughness; Based on the optical material parameters of the jewelry surface and the three-dimensional jewelry model, render the three-dimensional jewelry model from multiple angles through the ray tracing algorithm, extract the gradient histogram, brightness contrast, and texture features as the visual attribute benchmarks, and generate an optimized jewelry image; Based on the optimized jewelry image and the visual attribute benchmarks, construct an optimization objective function that includes visual attribute differences and physical constraints, use the adaptive step size gradient descent algorithm to perform ray tracing recursive analysis, and iteratively adjust the optical material parameters of the jewelry surface to obtain the optimized optical material parameters of the jewelry surface and the parameter-adjusted jewelry image; Based on the optimized optical material parameters of the jewelry surface and the parameter-adjusted jewelry image, perform image rendering verification. When the visual similarity between the rendered image and the target jewelry is greater than the preset visual similarity threshold, determine that the current rendered image is a high-fidelity jewelry image; when the visual similarity between the rendered image and the target jewelry is less than the preset visual similarity threshold, perform ray tracing recursive analysis and optimization until the visual similarity is greater than the visual similarity threshold, and determine that the current rendered image is a high-fidelity jewelry image.
[0012] In an alternative embodiment, extract the visual attribute parameters and style classification information from the high-fidelity jewelry image, and perform multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity, including: Based on the high-fidelity jewelry image, perform multi-scale feature alignment, and analyze and correct the scale, rotation, and perspective differences between the high-fidelity jewelry image and the target jewelry image based on the affine transformation matrix to obtain a modeled-actual image pair after spatial alignment; Based on the modeled-actual image pair, extract the gradient histogram, brightness contrast, and texture feature values of the aligned high-fidelity jewelry image, and perform item-by-item difference quantification with the corresponding visual attribute parameters of the target jewelry image to obtain a visual attribute difference vector; According to the modeling-actual image pair, and in combination with the trained style classification model, predict the style labels of the high-fidelity jewelry image and the target jewelry image respectively, and construct a classification consistency vector in combination with the main stone type and metal material label; Perform weighted fusion according to the visual attribute difference vector and the classification consistency vector, and dynamically adjust the visual attribute weight and classification weight based on the material type to obtain the overall jewelry similarity.
[0013] In an optional implementation manner, comparing the overall jewelry similarity with a preset similarity threshold, when the overall jewelry similarity is greater than the similarity threshold, determining the current high-fidelity jewelry image as the final jewelry model, and when the overall jewelry similarity is less than the similarity threshold, iteratively adjusting the local details of the three-dimensional jewelry model and re-optimizing the rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained, includes: Compare the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, locate the local area with significant visual attribute differences in the high-fidelity jewelry image, and generate a geometric shape deviation map and a material parameter deviation vector; According to the geometric shape deviation map, perform reverse optimization on the local geometric features of the three-dimensional jewelry model, adjust the vertex coordinate distribution through the Poisson reconstruction algorithm, and repair the surface discontinuous area in combination with the Laplacian smoothing algorithm to obtain a corrected three-dimensional jewelry model; According to the material parameter deviation vector, calculate the number of recursive layers of ray tracing, and dynamically correct the BRDF model to obtain corrected BRDF parameters; According to the corrected three-dimensional jewelry model and the corrected BRDF parameters, perform iterative rendering optimization to generate a corrected high-fidelity jewelry image; Extract visual attribute parameters from the corrected high-fidelity jewelry image for overall similarity calculation to obtain a corrected overall jewelry similarity; Compare the corrected overall jewelry similarity with a preset similarity threshold. When the corrected overall jewelry similarity is greater than the similarity threshold, determine the current corrected high-fidelity jewelry image as the final jewelry model. When the corrected overall jewelry similarity is less than the similarity threshold, continue to iteratively adjust the local details of the three-dimensional jewelry model and re-optimize the rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained.
[0014] In a second aspect, the present invention provides a modeling system for jewelry detection, including: A data acquisition module for acquiring target jewelry images; A feature extraction module, which is used to obtain a target jewelry image, extract jewelry feature parameters from the target jewelry image by using the SIFT algorithm, and use the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a standardized jewelry feature vector; A similarity retrieval module, which is used to perform similar image retrieval on the KD-tree hierarchical index structure and the standardized jewelry feature vector to obtain similar images; A fusion modeling module, which is used to extract similar jewelry features according to the similar images, and perform modeling through a geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model; An optical rendering module, which is used to optimize the material parameters and the number of ray tracing recursion layers according to the three-dimensional jewelry model by using the gradient descent algorithm to generate a high-fidelity jewelry image; A similarity comparison module, which is used to extract visual attribute parameters and style classification information according to the high-fidelity jewelry image, and perform multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity; A result output module, which is used to compare the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, the current high-fidelity jewelry image is determined as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, the local details of the three-dimensional jewelry model are iteratively adjusted and re-optimized for rendering until the overall jewelry similarity greater than the similarity threshold is obtained.
[0015] In a third aspect, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the modeling method for jewelry detection described in any one of the above is implemented.
[0016] In a fourth aspect, the present invention also provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the modeling method for jewelry detection described in any one of the above.
[0017] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention constructs a multi-dimensional KD-tree index structure through the geometric and texture features of the target jewelry image, dynamically selects the splitting dimension and recursively divides the space by using the variance maximization criterion, and combines the standardized feature vector to achieve fast nearest neighbor search. This structure reduces the retrieval time complexity from O(N) to O(logN), and at the same time avoids local optima through a multi-level backtracking mechanism, improving the efficiency and accuracy of similar image retrieval.
[0018] (2) The present invention introduces geometric constraints and virtual view generation techniques, and combines a dynamic backtracking strategy to correct the cumulative matching error. This method effectively improves the matching robustness of jewelry with complex structures, enhances the alignment accuracy of the multi-view model through reprojection optimization, and provides highly consistent feature correspondences for 3D reconstruction.
[0019] (3) The present invention adopts an implicit surface representation method to fuse multi-view geometric information, combines physical optical property modeling techniques, and synchronously updates geometric shapes and material parameters through a gradient optimization algorithm. This solution realizes high-fidelity modeling of the surface reflection characteristics of jewelry and the internal refraction phenomenon of gemstones, and significantly improves the characterization ability of material optical properties.
[0020] (4) The present invention designs a recursive depth dynamic control mechanism, adaptively adjusts the light propagation path according to the scattering characteristics of the material, and combines a light path optimization strategy to balance the calculation efficiency and rendering accuracy. This technology accurately simulates the complex reflection process of light on the surface of precious metals and the multiple scattering effects inside gemstones, breaking through the rendering limit of the traditional fixed number of recursive layers.
[0021] (5) The present invention establishes a joint evaluation function of geometry-material-optics, and continuously optimizes the model details through a residual correction mechanism. This process effectively improves the physical consistency of optical characteristics such as surface gloss and dispersion effect, and ensures that the final model strictly follows the optical propagation laws of precious metals and gemstones. Description of the Drawings
[0022] Figure 1 is a schematic flowchart of a modeling method for jewelry detection provided by the first embodiment of the present invention; Figure 2 is a schematic structural diagram of a modeling system for jewelry detection provided by the second embodiment of the present invention. Detailed Embodiments
[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0024] Refer to Figure 1 , the first embodiment of the present invention provides a modeling method for jewelry detection, including the following steps: S11, obtaining a target jewelry image; S12, extracting jewelry feature parameters from the target jewelry image by using the SIFT algorithm, and using the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a standardized jewelry feature vector; S13. Perform similar image retrieval on the hierarchical KD-tree index structure and the standardized jewelry feature vectors to obtain similar images. S14. Extract similar jewelry features based on the similar images, and perform modeling through the geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model. S15. According to the three-dimensional jewelry model, use the gradient descent algorithm to optimize the material parameters and the number of recursive layers of ray tracing to generate a high-fidelity jewelry image. S16. Extract visual attribute parameters and style classification information from the high-fidelity jewelry image, and perform multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity. S17. Compare the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, iteratively adjust the local details of the three-dimensional jewelry model and re-optimize the rendering until the overall jewelry similarity greater than the similarity threshold is obtained for the final jewelry model.
[0025] In step S11, it is necessary to obtain the target jewelry image.
[0026] In one implementation, obtaining the target jewelry image includes: Obtain an initial jewelry image dataset; according to the jewelry image dataset, adjust the image brightness distribution to obtain a preliminary jewelry image dataset with balanced brightness; according to the preliminary jewelry image dataset, perform image denoising and enhance the edge details of the image to obtain the target jewelry image.
[0027] It should be noted that the jewelry image dataset refers to a collection of jewelry images covering different styles, materials, and angles collected through channels such as jewelers, auction houses, and professional photographic equipment, and is a standardized image library formed after denoising and standardization preprocessing. The adjustment of the image brightness distribution to obtain a preliminary jewelry image dataset with balanced brightness remaps the pixel values of the too-dark or too-bright areas in the original jewelry images through the histogram equalization algorithm, expands the image dynamic range, and enhances the visibility of details. For example, compresses the highlight area of the platinum ring setting to avoid overexposure, and at the same time enhances the brightness level of the side diamond inlay structure in the shadow, so that the images collected under different lighting conditions have a consistent brightness distribution benchmark. The target jewelry image is an image after denoising and edge detail enhancement, with balanced brightness, noise suppression, and significant edge features, and can accurately reflect the geometric contour and surface details of the jewelry. The target jewelry image screens clear images from the original images collected from multiple angles, eliminates the lighting differences through brightness adjustment, and then enhances the key features through denoising and sharpening, and finally outputs high-quality images suitable for the extraction requirements of the SIFT algorithm, as the input data for constructing the KD tree index and subsequent 3D modeling, ensuring the stability of feature parameter extraction and the reliability of retrieval results.
[0028] In step S12, it is necessary to extract the jewelry feature parameters from the target jewelry image using the SIFT algorithm, and use the split space method for the jewelry feature parameters to obtain the KD tree hierarchical index structure and the standardized jewelry feature vector.
[0029] In one implementation, extracting the jewelry feature parameters from the target jewelry image using the SIFT algorithm and using the split space method for the jewelry feature parameters to obtain the KD tree hierarchical index structure and the standardized jewelry feature vector includes: According to the target jewelry image, using a preset SIFT algorithm, extract the 128-dimensional feature descriptors of each reference image to obtain the jewelry feature parameters including gradient histograms, brightness contrasts, and texture feature values; according to the jewelry feature parameters, use the split space method to recursively divide the feature vector space, determine the node division dimension with the median split strategy, and generate the KD tree level nodes; according to the KD tree level nodes, determine the split threshold of each KD tree level node based on the branch judgment method, calculate and store the backtracking path optimization parameters, and construct a hierarchical KD tree index structure; according to the target jewelry image, the jewelry feature parameters, the KD tree index structure, and the backtracking path optimization parameters, perform spatial coordinate normalization processing to generate a standardized jewelry feature vector adapted to the KD tree index.
[0030] It should be noted that the SIFT algorithm is a feature extraction method based on scale-space invariance. By detecting key points in an image and calculating the gradient direction histogram of the surrounding area, it generates a 128-dimensional feature descriptor with rotation and scale invariance, which is used to quantify the local texture, edges, and brightness distribution characteristics of jewelry. The jewelry feature parameters are a vector set composed of the feature descriptors extracted by the SIFT algorithm, including the peak distribution of the gradient histogram, the interval value of brightness contrast, and texture feature encoding, which can characterize the visual uniqueness of jewelry. The KD-tree hierarchical indexing structure is a binary tree structure constructed by recursively dividing the high-dimensional feature vector space. Each layer divides the left and right subtrees according to the median value of the feature dimension. The node stores the division dimension and threshold, and optimizes the backtracking path parameters through the branch judgment method to achieve the rapid retrieval of millions of feature vectors. The step of generating the KD-tree hierarchical nodes by recursively dividing the feature vector space according to the jewelry feature parameters using the space division method and determining the node division dimension with the median division strategy is based on the construction principle of the KD-tree. The jewelry feature parameters are regarded as a high-dimensional feature vector set, such as a 128-dimensional SIFT descriptor, containing information such as gradient histogram, brightness contrast, and texture feature values. Starting from the root node, a certain dimension is selected, and the median value of this dimension is used as the division point to divide the feature vectors into two parts. The left subtree contains vectors smaller than the median, and the right subtree contains vectors greater than or equal to the median. The dimension is switched to continue median division in the next layer, and the recursion is carried out until the number of vectors in the subspace is small enough. This method ensures the balance of the KD-tree and finally generates a hierarchical node structure. The implementation process of the step of performing spatial coordinate normalization processing on the target jewelry image, jewelry feature parameters, KD-tree indexing structure, and backtracking path optimization parameters to generate a standardized jewelry feature vector adapted to the KD-tree indexing is as follows: First, the jewelry feature parameters extracted from the target jewelry image, that is, the 128-dimensional SIFT descriptor, are used as the initial input. Then, using the division thresholds and backtracking path optimization parameters of each node in the constructed KD-tree indexing structure, the distribution range and statistical characteristics of each dimension of the feature value are calculated. Then, a normalization operation is performed on each feature vector. For example, each dimension value is mapped to the [0,1] interval through linear transformation. The specific method is to first subtract the minimum value of this dimension and then divide by the range difference, or perform standardization processing using the mean and standard deviation. Finally, the vector distribution is adjusted in combination with the backtracking path optimization parameters to align it with the hierarchical division of the KD-tree, generating a standardized jewelry feature vector for subsequent retrieval. The standardized jewelry feature vector is the result of processing the original feature parameters through spatial coordinate normalization and vector scaling, ensuring the comparability of image features taken at different scales and angles in the KD-tree indexing space.These data and structures work together in the following way: The massive jewelry image dataset provides basic samples. The SIFT algorithm extracts jewelry feature parameters from them. The segmentation space method is used to construct a KD-tree hierarchical index structure to support efficient retrieval. The standardized jewelry feature vectors eliminate external interferences. Finally, a retrieval system adapted to jewelry feature matching is formed.
[0031] In step S13, it is necessary to perform similar image retrieval on the KD-tree hierarchical index structure and the standardized jewelry feature vectors to obtain similar images.
[0032] In one implementation, performing similar image retrieval on the KD-tree hierarchical index structure and the standardized jewelry feature vectors to obtain similar images includes: According to the KD-tree hierarchical index structure and the standardized jewelry feature vectors, using the RANSAC algorithm, estimate the affine transformation matrix for the matching feature points in the KD-tree hierarchical index structure to eliminate the coordinate offset caused by the perspective difference and obtain the affine transformation matrix; according to the affine transformation matrix and the standardized jewelry feature vectors, perform feature pose correction to generate a set of standardized feature descriptors after perspective alignment; according to the set of standardized feature descriptors and the KD-tree hierarchical index structure, perform dynamic backtracking search, optimize the backtracking path using the branch judgment method, and screen in combination with a preset Euclidean distance threshold to obtain the nearest neighbor feature vector; according to the nearest neighbor feature vector and the set of standardized feature descriptors, perform spatial distribution consistency verification, eliminate abnormal matching points deviating from the affine transformation model, and generate a candidate similar image list; according to the candidate similar image list, based on geometric constraint conditions, analyze the feature matching density, calculate the matching confidence of each image, and screen in combination with a preset matching confidence threshold to obtain similar images.
[0033] It should be noted that the RANSAC algorithm is used to estimate the affine transformation matrix. By means of the random sample consensus mechanism, an inlier set that satisfies the geometric transformation relationship is selected from the feature point pairs matched in the KD-tree index. The candidate transformation matrices are calculated through multiple random samplings, and the number of inliers is verified. Finally, the optimal affine transformation matrix is determined to eliminate the offset of the feature point coordinates caused by the difference in shooting perspectives. The step of performing feature pose correction according to the affine transformation matrix and the normalized jewelry feature vector to generate a set of normalized feature descriptors after perspective alignment is realized by using the affine transformation matrix that describes transformation relationships such as rotation, scaling, and translation to adjust the feature point positions of the normalized jewelry feature vector. Specifically, the coordinates of each feature point are applied with the transformation to align it with the reference perspective while keeping the feature information of the descriptor unchanged, and finally a set of normalized feature descriptors with consistent perspectives is generated. The process of performing dynamic backtracking search according to the set of normalized feature descriptors and the KD-tree hierarchical index structure, optimizing the backtracking path using the branch judgment method, and screening in combination with a preset Euclidean distance threshold to obtain the nearest feature vector is as follows: First, a descriptor is selected from the set of normalized feature descriptors as the query point and enters the root node of the KD-tree hierarchical index structure. Then, according to the splitting dimension and threshold of the current node, it is judged whether the corresponding dimension value of the query point is less than or greater than the threshold. If it is less, it enters the left subtree; if it is greater than or equal, it enters the right subtree, and traverses down the tree until reaching the leaf node, and the preliminary candidate feature vector closest to the query point is found in the leaf node. Then, the dynamic backtracking search starts, returns from the leaf node upward, checks the unexplored branches in the path, and optimizes the backtracking path using the branch judgment method. Specifically, the distance from the query point to the current node's splitting hyperplane is calculated. When this distance is less than the distance of the current nearest neighbor, it means that the other branch may contain closer points, and enters this branch to continue the search; otherwise, this branch is skipped to reduce the amount of calculation. During the backtracking process, for each candidate point encountered, its Euclidean distance from the query point is calculated and compared with the currently recorded minimum distance. If it is smaller, the nearest neighbor candidate is updated. Then, the Euclidean distances of all candidate points are compared with the preset Euclidean distance threshold, and only the candidate points less than this threshold are retained to further narrow the screening range. Finally, from all the traversed and screened candidates, the feature vector with the smallest Euclidean distance is selected as the nearest feature vector of this query point. This process is repeated for each descriptor in the set of normalized feature descriptors to obtain the corresponding set of nearest feature vectors. This method makes full use of the hierarchical structure and branch optimization of the KD-tree to ensure the search efficiency and result accuracy. The spatial distribution consistency verification is carried out by calculating the residual distribution of the matched feature point pairs under the affine transformation model, removing the outliers that deviate from the predicted positions of the model (such as the mis-matched points caused by metal reflection), and retaining the valid matched points that conform to the geometric constraints in the spatial distribution to generate a candidate image list.The similar images are high-confidence images screened from the candidate list after geometric verification and matching confidence calculation. Their style classification, main stone type, and metal material information highly match those of the target jewelry, and are used for subsequent 3D model screening and geometric fusion. The process of obtaining the similar images is as follows: Starting from the candidate similar image list, geometric constraint checks are performed on the matching features of each image, such as checking whether the distances and angles between the matching points are consistent. Then, the number of valid matching pairs that meet the constraints is counted, and the feature matching density (the ratio of the number of valid matching pairs to the total number of feature points) is calculated. Next, the matching confidence is calculated based on the feature matching density and geometric consistency. The matching confidence is comprehensively obtained through the number of matches and the transformation error. Finally, the confidence of each image is compared with a preset threshold, and the images with a confidence higher than the preset threshold are retained as similar images to ensure that the results highly match the target jewelry image both in terms of features and geometry.
[0034] In step S14, similar jewelry features need to be extracted based on the similar images, and modeling is performed through a geometric shape value fusion algorithm to obtain a continuous and smooth 3D jewelry model.
[0035] In one implementation, based on the similar images, similar jewelry features are extracted, and modeling is performed through a geometric shape value fusion algorithm to obtain a continuous and smooth 3D jewelry model, including: Based on the similar images, analyze the geometric shape features of the jewelry, use the Canny edge detection algorithm to extract the jewelry contour, calculate the area, perimeter, and aspect ratio parameters of the contour to obtain a geometric feature vector; use the historical geometric feature vector as the input and the historical style classification label as the output to construct and train a style classification model. When the number of training times is greater than or equal to the preset number of training times, it is determined that the training is completed to obtain a trained style classification model; input the geometric feature vector into the trained style classification model to obtain a style classification label; based on the style classification label and the similar images, perform main stone type and metal material analysis to construct 3D model screening conditions including style classification, main stone type, and metal material; based on the similar images and the 3D model screening conditions, match candidate models in a preset 3D jewelry model library, and perform spatial alignment of the geometric features of the candidate models and the target jewelry through the iterative closest point algorithm to obtain a geometric matching degree; based on the geometric matching degree, use the Poisson reconstruction algorithm to fuse local geometric shape values and optimize the surface curvature through the Laplace smoothing algorithm to generate a preliminary 3D jewelry model with continuous transition; based on the preliminary 3D jewelry model, perform mesh topology consistency inspection and repair the model for holes and non-manifold structures to obtain a continuous and smooth 3D jewelry model.
[0036] It should be noted that the Canny edge detection algorithm is an edge extraction technology widely used in image processing. Proposed by John Canny, it can effectively detect edge features in images and is used to extract the contours of jewelry in jewelry detection. In its usage process, first, similar images are grayscaled to convert color images into grayscale images to simplify calculations. Then, the grayscale images are smoothed using a Gaussian filter to reduce the interference of noise on edge detection. Next, the gradient intensity and direction of the image are calculated. By applying a gradient operator to pixel points, the brightness changes are detected to determine potential edge positions. Subsequently, non-maximum suppression is performed to retain only the pixel points with the maximum intensity in the gradient direction and suppress non-edge points to further refine the edges. Finally, a double-threshold method is used to screen the edges. Two thresholds, a high threshold and a low threshold, are set. Pixels below the low threshold are removed, pixels above the high threshold are confirmed as edges, and pixels between the two are determined to be retained or removed based on their connectivity to the confirmed edges. Through this series of operations, clear and continuous jewelry contours are extracted from similar images, providing basic data for subsequent calculation of geometric feature vectors such as area, perimeter, and aspect ratio. Extracting contour parameters using the Canny edge detection algorithm to generate geometric feature vectors is to identify the contour boundaries in jewelry images through multi-level threshold edge detection technology and quantify the contour area, perimeter, and aspect ratio to form a numerical geometric description. In the step of using the historical geometric feature vectors as input and the historical style classification labels as output to construct a style classification model and train it, and determining that the training is completed when the number of training times is greater than or equal to the preset number of training times to obtain a trained style classification model, the training process of the model is as follows: First, prepare the training dataset. The historical geometric feature vectors are a set of features extracted from a large number of jewelry images, including numerical values such as contour area, perimeter, and aspect ratio, while the historical style classification labels are the pre-annotated categories corresponding to these images, such as rings, necklaces, or earrings, etc. Then, select a machine learning model, such as a support vector machine, random forest, or neural network. Use the historical geometric feature vectors as input features and the historical style classification labels as the target output. After initializing the model parameters, start training. The training process iteratively optimizes the model parameters to minimize the error between the prediction and the true label. Specifically, in implementation, the dataset is divided into a training set and a validation set. In each round of training, a batch of feature vectors is input, the model outputs a prediction result, and the loss (such as cross-entropy loss) is calculated by comparing it with the true label. The parameters are updated through an optimization algorithm (such as gradient descent), and the iteration is repeated. After each iteration, the performance of the model, such as accuracy, is evaluated on the validation set. When the number of training times reaches the preset value (such as 1000 times), check whether the model converges. If the performance is stable, determine that the training is completed to obtain a model that can predict the style classification based on geometric feature vectors. Constructing the screening conditions for the 3D model is to combine the labels output by the style classification model with the semantic information of the main stone type and metal material in the similar images to generate a joint retrieval rule to screen candidate models in the model library that match in terms of geometry and material.The iterative closest point algorithm calculates the geometric matching degree by rigidly transforming and aligning the candidate model point cloud with the target jewelry contour features, calculating the average distance between key points as the matching score, and evaluating the geometric similarity between the candidate model and the target jewelry. The process of implementing the step of fusing local geometric shape values using the Poisson reconstruction algorithm and optimizing the surface curvature using the Laplace smoothing algorithm to generate a preliminary three-dimensional jewelry model with continuous transitions is as follows: Based on three-dimensional reconstruction technology, first, using the geometric matching degree, analyze the spatial alignment degree between the candidate model and the target jewelry, extract local geometric shape values from the candidate model, such as vertex coordinates and normal vectors. The Poisson reconstruction algorithm constructs an implicit surface function through local geometric shape values. Specifically, establish a gradient field for all local geometric shape values and solve the Poisson equation to generate a continuous surface. This process fuses discrete geometric information into a smooth preliminary overall model. Subsequently, apply the Laplace smoothing algorithm to optimize the surface curvature, calculate the average position of the neighborhood for each vertex of the preliminary overall model, and adjust the vertex coordinates to reduce local curvature differences, making the surface transition more natural. Finally, generate a preliminary three-dimensional jewelry model with fused geometric shapes and continuous surfaces, laying the foundation for subsequent repair. Mesh topology consistency checking verifies the connection relationship of triangular patches in the preliminary three-dimensional model, detects and repairs holes (such as missing prong vertices) and non-manifold structures (such as isolated edges or hanging faces). The three-dimensional jewelry model contains accurate geometric topology structures and material property labels. After passing the mesh topology consistency check to repair holes and non-manifold edges (such as hanging faces), it ensures that the model can be applied to downstream tasks such as 3D printing and optical rendering, serving as the basic carrier for subsequent material optimization and similarity comparison.
[0037] In step S15, it is necessary to optimize the material parameters and the number of recursive layers of ray tracing according to the three-dimensional jewelry model to generate a high-fidelity jewelry image.
[0038] In one implementation, optimizing the material parameters and the number of recursive layers of ray tracing according to the three-dimensional jewelry model to generate a high-fidelity jewelry image includes: Based on the three-dimensional jewelry model, perform a preliminary analysis based on the BRDF model to determine the optical material parameters of the jewelry surface including the diffuse reflection coefficient, specular reflection coefficient, and roughness; according to the optical material parameters of the jewelry surface and the three-dimensional jewelry model, render the three-dimensional jewelry model from multiple angles through the ray tracing algorithm, extract the gradient histogram, brightness contrast, and texture features as the visual attribute benchmarks, and generate an optimized jewelry image; according to the optimized jewelry image and the visual attribute benchmarks, construct an optimization objective function including visual attribute differences and physical constraints, adopt the adaptive step size gradient descent algorithm, perform ray tracing recursive analysis, and iteratively adjust the optical material parameters of the jewelry surface to obtain the optimized optical material parameters of the jewelry surface and the parameter-adjusted jewelry image; according to the optimized optical material parameters of the jewelry surface and the parameter-adjusted jewelry image, perform image rendering verification. When the visual similarity between the rendered image and the target jewelry is greater than the preset visual similarity threshold, determine that the current rendered image is a high-fidelity jewelry image; when the visual similarity between the rendered image and the target jewelry is less than the preset visual similarity threshold, perform ray tracing recursive analysis optimization until the visual similarity is greater than the visual similarity threshold, and determine that the current rendered image is a high-fidelity jewelry image.
[0039] It should be noted that the implementation process of the step of performing preliminary analysis based on the BRDF model according to the three-dimensional jewelry model to determine the optical material parameters of the jewelry surface including the diffuse reflection coefficient, specular reflection coefficient, and roughness is as follows: First, extract the surface geometric information from the three-dimensional jewelry model, including vertex coordinates and normal vectors, as the basis for subsequent analysis. Then, introduce the BRDF model, that is, the bidirectional reflectance distribution function, which is used to describe the reflection characteristics of light on the jewelry surface. The BRDF model calculates the reflected light intensity based on the incident light direction, the outgoing light direction, and the surface normal vector. Assuming that the jewelry surface material conforms to a certain common BRDF model, such as the Phong model or the Cook-Torrance model, the analysis process first divides the surface of the three-dimensional model into regions and assigns initial parameters according to the material type (such as metal or gemstone). The diffuse reflection coefficient represents the proportion of light evenly scattered, usually related to the base color of the jewelry. The specular reflection coefficient reflects the intensity of light concentrated reflection and is related to the surface glossiness. The roughness affects the degree of diffusion of the reflection. The initial values can be set by experience or referenced from a database of similar materials. Subsequently, verify these parameters through ray simulation. Specifically, emit a set of virtual rays on the model surface, calculate the angle between the incident light and the surface normal vector, combine the outgoing light direction, substitute it into the BRDF function formula, generate a preliminary reflected light distribution, and then compare it with the actual lighting effect of the target jewelry image. For example, adjust the parameters by observing the highlight area and shadow distribution. If the highlights generated by the model are too concentrated, reduce the roughness or increase the specular reflection coefficient. If the diffuse light is insufficient, increase the diffuse reflection coefficient. This process is repeatedly adjusted until the lighting effect output by the BRDF model is initially matched with the visual characteristics of the target jewelry, and finally determine a set of reasonable diffuse reflection coefficients, specular reflection coefficients, and roughness as the optical material parameters of the jewelry surface. The implementation process of the step of performing multi-angle rendering on the three-dimensional jewelry model according to the optical material parameters of the jewelry surface and the three-dimensional jewelry model, extracting the gradient histogram, brightness contrast, and texture features as the visual attribute benchmarks, and generating an optimized jewelry image is as follows: Apply the optical material parameters of the jewelry surface to the three-dimensional jewelry model and use the ray tracing algorithm for rendering. Ray tracing calculates the lighting effect of each pixel by simulating the path of light starting from the camera, reflecting, refracting, or scattering on the model surface and then returning. In order to capture multi-angle features, project rays from different perspectives (such as the front, side, and top views) to generate multiple rendered images. Subsequently, extract the visual attributes from these images. Specifically, calculate the gradient histogram for each image to characterize the edge changes, analyze the brightness contrast to reflect the light and dark distribution, and extract the texture features to describe the surface details. Use the gradient histogram, brightness contrast, and texture features as the visual attribute benchmarks, and finally select the rendered image with the best visual effect as the optimized jewelry image.
[0040] The process of implementing the step of constructing an optimization objective function that includes visual attribute differences and physical constraints based on the optimized jewelry image and the visual attribute benchmark, and using an adaptive step size gradient descent algorithm to perform ray tracing recursive analysis and iteratively adjust the optical material parameters of the jewelry surface to obtain the optimized optical material parameters of the jewelry surface and the image of the parameter-adjusted jewelry is as follows: First, compare the optimized jewelry image with the visual attribute benchmark, calculate the differences between the two in terms of gradient histogram, brightness contrast, and texture features, and construct an optimization objective function. The construction of the optimization objective function quantifies the visual attribute differences as loss terms and at the same time incorporates physical constraints, such as the reasonable range of material parameters (the diffuse reflection coefficient is between 0 and 1). Then, use an adaptive step size gradient descent algorithm to optimize this function. Specifically, after initializing the material parameters, generate an image through ray tracing recursive rendering, calculate the value of the objective function, adjust the parameters according to the gradient direction, and the adaptive step size dynamically adjusts the learning rate according to the change in loss to accelerate convergence. Update the material parameters and re-render after each iteration, and repeat this process until the objective function converges or reaches the preset number of iterations, finally obtaining the optimized optical material parameters of the jewelry surface and the image of the parameter-adjusted jewelry. Rendering verification and iterative optimization are carried out by calculating the visual similarity between the optimized image and the target image. If the threshold is not reached, restart the ray tracing process and adjust the number of recursive layers to enhance the ability to restore details until an image that meets the preset standard is output. The high-fidelity jewelry image is the rendering result generated after multiple rounds of optimization of the material parameters and adjustment of the number of recursive layers as described above. Its gradient distribution, brightness transition, and texture details have a visual attribute difference from the target jewelry lower than the preset similarity threshold, and it can accurately restore the specular reflection of precious metals, the dispersion effect of gemstones, and the optical characteristics of the surface microstructure, serving as the benchmark data for subsequent multi-dimensional similarity comparison to determine whether to trigger model iterative correction or output the final detection result.
[0041] In step S16, it is necessary to extract visual attribute parameters and style classification information based on the high-fidelity jewelry image, and conduct multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity.
[0042] In one implementation, extracting visual attribute parameters and style classification information based on the high-fidelity jewelry image and conducting multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity includes: Based on the high-fidelity jewelry image and the target jewelry image, perform multi-scale feature alignment based on the affine transformation matrix to obtain a modeling-actual image pair; according to the modeling-actual image pair, extract the histogram of gradients, brightness contrast, and texture feature values, and perform item-by-item difference quantization to obtain a visual attribute difference vector; according to the modeling-actual image pair, perform multivariate collaborative analysis of jewelry styles, main stone types, and metal materials to construct a classification consistency vector; according to the visual attribute difference vector and the classification consistency vector, perform vector weighted fusion, dynamically adjust the visual attribute weight and the classification weight, and obtain the overall jewelry similarity.
[0043] It should be noted that the modeling-actual image pair is a spatial alignment image combination formed by performing scale scaling, rotation correction, and perspective distortion elimination on the high-fidelity jewelry image and the target jewelry image through the affine transformation matrix. The coordinate system normalization in the process makes the pixel points in the same semantic regions (such as diamond facets, ring setting reflection areas) strictly correspond.
[0044] The implementation process of the step of extracting the histogram of oriented gradients, brightness contrast and texture feature values from the modeling-actual image pair, performing item-by-item difference quantization, and obtaining the visual attribute difference vector is as follows: First, start from the modeling-actual image pair, calculate the visual attributes for each image separately. Specifically, calculate the histogram of oriented gradients for the high-fidelity image and the target image, detect the edge direction and intensity distribution by statistically analyzing the pixel gray-scale changes, calculate the brightness contrast, quantify the light-dark contrast by analyzing the difference between the pixel brightness range and the mean value of the image, calculate the texture feature values, analyze the surface details by extracting the gray-level co-occurrence matrix or Fourier transform of the local area. Subsequently, compare these attributes of the two images item by item. For the histogram of oriented gradients, calculate the Euclidean distance or chi-square distance between the two histograms to represent the difference. For the brightness contrast, directly take the difference between the contrast values of the two images. For the texture feature values, calculate the Euclidean distance or cosine similarity of the feature vectors. All the difference values form a multi-dimensional vector, that is, the visual attribute difference vector, which reflects the deviation of the two images in visual characteristics. The classification consistency vector is a Boolean vector generated by predicting the style labels of the modeling image and the actual image through a pre-trained style classification model, combined with the main stone type recognition result and the metal material analysis, and is used to characterize the semantic matching degree of the two in terms of style category, main stone type and material type. The implementation process of the step of performing vector weighted fusion based on the visual attribute difference vector and the classification consistency vector, dynamically adjusting the visual attribute weight and the classification weight, and obtaining the overall jewelry similarity is as follows: First, perform weighted fusion on the visual attribute difference vector and the classification consistency vector. Specifically, initialize the visual attribute weight and the classification weight, for example, each accounts for 0.5. When fusing, multiply the visual attribute difference vector and the classification consistency vector by the corresponding weights respectively and then add them to obtain a comprehensive vector. Next, dynamically adjust the weights according to actual requirements or data characteristics. For example, if the visual difference is large, increase the visual attribute weight; if the classification consistency is more critical, increase the classification weight. The adjustment method can be through preset rules or dynamically calculated according to the distribution of vector values. For example, determine the weight by the inverse of the norm of the difference vector. Finally, take the norm of the fused comprehensive vector and perform normalization processing to obtain a scalar value, that is, the overall jewelry similarity. The overall jewelry similarity is a comprehensive score obtained by dynamically weighted fusion of the normalized visual attribute difference vector and the classification consistency vector, and is used to judge the consistency degree of the optical characteristics and semantic attributes between the high-fidelity image and the target jewelry.
[0045] In step S17, it is necessary to compare the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, iteratively adjust the local details of the three-dimensional jewelry model and re-optimize the rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained.
[0046] In one implementation, the overall jewelry similarity is compared with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, the current high-fidelity jewelry image is determined as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, the local details of the three-dimensional jewelry model are iteratively adjusted and re-optimized for rendering until a final jewelry model with an overall jewelry similarity greater than the similarity threshold is obtained, including: The overall jewelry similarity is compared with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, the current high-fidelity jewelry image is determined as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, local regions with significant visual property differences in the high-fidelity jewelry image are located, and a geometric shape deviation map and a material parameter deviation vector are generated; according to the geometric shape deviation map, the local geometric features of the three-dimensional jewelry model are reversely optimized, the vertex coordinate distribution is adjusted through the Poisson reconstruction algorithm, and the surface discontinuity regions are repaired by combining the Laplacian smoothing algorithm to obtain a corrected three-dimensional jewelry model; according to the material parameter deviation vector, the number of ray tracing recursion layers is calculated, and the BRDF model is dynamically corrected to obtain corrected BRDF parameters; according to the corrected three-dimensional jewelry model and the corrected BRDF parameters, iterative rendering optimization is performed to generate a corrected high-fidelity jewelry image; according to the corrected high-fidelity jewelry image, visual property parameters are extracted for overall similarity calculation to obtain a corrected overall jewelry similarity; the corrected overall jewelry similarity is compared with the preset similarity threshold. When the corrected overall jewelry similarity is greater than the similarity threshold, the current corrected high-fidelity jewelry image is determined as the final jewelry model. When the corrected overall jewelry similarity is less than the similarity threshold, the local details of the three-dimensional jewelry model are continuously iteratively adjusted and re-optimized for rendering until a final jewelry model with an overall jewelry similarity greater than the similarity threshold is obtained.
[0047] It should be noted that the geometric shape deviation map is a two-dimensional error distribution map generated by comparing the contour features of a high-fidelity jewelry image and a target jewelry image, quantifying the degree of geometric deviation in a local area and locating the vertex groups to be adjusted. The material parameter deviation vector is the direction of BRDF parameter correction deduced by analyzing the differences in visual attributes such as luminance contrast and specular distribution between the rendered image and the target image, including the adjustment amount of the diffuse reflection coefficient, the correction value of the specular reflection coefficient, and the roughness change gradient. The process of reverse-optimizing the local geometric features of the three-dimensional jewelry model according to the geometric shape deviation map, adjusting the vertex coordinate distribution through the Poisson reconstruction algorithm, and combining the Laplacian smoothing algorithm to repair the surface discontinuous areas to obtain the corrected three-dimensional jewelry model is as follows: Analyze the vertices of the three-dimensional model corresponding to each pixel in the geometric shape deviation map to determine the local geometric features that need to be adjusted, and then apply the Poisson reconstruction algorithm. By calculating the gradient field of the deviation area, adjust the vertex coordinate distribution to match the target shape. Specifically, iteratively update the vertex positions to make the model surface tend to be consistent with the shape indicated by the deviation map. Subsequently, use the Laplacian smoothing algorithm to optimize the adjusted surface, calculate the average position of the neighborhood of each vertex, smooth the discontinuous areas, and eliminate sharp or abrupt geometric defects, and finally obtain the corrected three-dimensional jewelry model. The process of calculating the ray tracing recursion level according to the material parameter deviation vector and dynamically correcting the BRDF model to obtain the corrected BRDF parameters is as follows: Calculate the ray tracing recursion level according to the material parameter deviation vector. Specifically, map the deviation value to the recursion depth through a preset formula. For example, the greater the deviation, the more recursion levels are added to improve the rendering accuracy. Then dynamically correct the BRDF model, adjust parameters such as the diffuse reflection coefficient, specular reflection coefficient, and roughness to make them closer to the optical characteristics of the target image. The correction process verifies the parameter effects by simulating light reflection, and finally obtains a set of optimized corrected BRDF parameters. The process of performing iterative rendering optimization according to the corrected three-dimensional jewelry model and the corrected BRDF parameters to generate a corrected high-fidelity jewelry image is as follows: According to the corrected three-dimensional jewelry model and the corrected BRDF parameters, use the ray tracing algorithm for rendering, project light rays from multiple angles, calculate the surface lighting effect, generate a preliminary image, and compare the visual attributes with the target image. If the difference still exists, adjust the rendering parameters or local geometric details, and repeat the rendering process. Optimize the lighting and material performance in each iteration until the generated image is visually close to the target, and finally output the corrected high-fidelity jewelry image.The corrected overall jewelry similarity is the updated score obtained by re - comparing the optimized high - fidelity image with the target image in multiple dimensions. If it is still lower than the similarity threshold, the geometric and material dual - path optimization loop is restarted. The model accuracy is improved by parallelly executing geometric correction and material parameter adjustment: when the corrected overall jewelry similarity does not reach the threshold, local defects such as the angular deviation of the main stone facets are located. The vertex coordinate distribution of the 3D model is reversely adjusted through the Poisson reconstruction algorithm, and the Laplacian smoothing algorithm is used to repair the surface transition area to eliminate surface discontinuities; at the same time, according to the quantization result of insufficient specular reflection in the material parameter deviation vector, the specular reflection coefficient and roughness of the BRDF model are dynamically corrected along the gradient descent direction, and the number of ray - tracing recursive layers is increased according to the optical properties of the material to simulate the subsurface scattering effect; the corrected geometric model and material parameters are synchronously input into the rendering engine to generate a new image, and the visual attributes are re - extracted to calculate the overall jewelry similarity. If the overall jewelry similarity is still less than the similarity threshold, the geometric and material dual - path optimization loop forms a closed - loop iterative process until the overall jewelry similarity is greater than the similarity threshold. The final jewelry model is a three - dimensional digital entity whose rendered image has an overall similarity higher than the preset similarity threshold with the target jewelry after multiple iterative adjustments. It has the same geometric accuracy and optical properties as real jewelry and can be directly used for generating authenticity appraisal reports, virtual display, or 3D printing manufacturing.
[0048] For the convenience of understanding the present invention, some preferred embodiments of the present invention will be further described below.
[0049] The working process of the present invention is described below by taking a relatively common scenario as an example. Please also refer to Figure 2 , which is Figure 1 a schematic diagram of the working scenario of the method of
[0050] Suppose a jewelry appraisal agency needs to conduct authenticity appraisal and digital modeling on a platinum - set diamond ring entrusted by a customer. The main body of the ring is made of platinum, the main stone is a round - cut diamond, and multiple side diamonds are inlaid on the ring band. Traditional detection methods rely on manual experience judgment and basic 3D scanning equipment, which are difficult to accurately restore the optical properties of diamond color and metallic luster, and the modeling efficiency is low. When using the method of the present invention, the working process is as follows: First, place the ring in a standard lighting environment, collect multi-angle images through a high-resolution camera, and automatically select the image with the highest clarity from the top-down perspective as the target jewelry image. Extract key feature points in the image based on the preset SIFT algorithm, calculate the gradient histogram to quantify the direction distribution of the edges of the diamond facets, analyze the brightness contrast to identify the highlight areas and shadow transitions of the platinum ring setting, and at the same time extract texture feature values to describe the local regularity of the side diamond inlay arrangement. After encoding all feature parameters, jointly construct a KD-tree hierarchical index structure with the feature vectors of a large number of jewelry images in the historical database. During this process, eliminate the scale deviation caused by the difference in shooting distance through spatial coordinate normalization processing, and perform rotation correction on the feature vectors to ensure the robustness of subsequent retrieval.
[0051] Subsequently, input the feature descriptors of the target image into the KD-tree index, and traverse the index nodes using a dynamic backtracking search strategy. After retrieving a set of potentially similar images, estimate the affine transformation matrix between the target image and the candidate images through the RANSAC algorithm, and automatically correct the spatial offset of the feature points caused by different shooting angles. For example, map the side-view feature points of the candidate image to the top-down coordinate system of the target image. Perform spatial distribution consistency verification on the corrected set of feature descriptors, eliminate abnormal matching points caused by metal reflection interference, and finally output a list of similar images with the highest matching confidence, all from the certified genuine same-model rings in the database.
[0052] Based on the geometric features of the similar images, select the basic ring setting model and the round diamond model from the preset 3D model library. Align the model with the contour features of the target ring in space through the iterative closest point algorithm, and adjust the curvature of the ring and the setting angle of the main stone. After fusing the local geometric data of the ring setting and the main stone using the Poisson reconstruction algorithm to generate a preliminary 3D model, optimize the curvature of the connection area between the ring and the main stone base through the Laplacian smoothing algorithm to eliminate the surface edges and corners caused by data fusion. Then, automatically detect the mesh topology structure of the model, repair the side diamond inlay hole positions with micron-level precision to ensure that the contact surfaces of all claws and side diamonds are continuous and smooth, and finally output a high-precision 3D jewelry model.
[0053] Initialize the BRDF parameters according to the material tags of the 3D model: assign a high specular reflection coefficient to platinum to simulate metallic luster, and set the transmission parameters for diamond that conform to its refraction characteristics. Render the model from multiple angles through the ray tracing algorithm, generate the initial image, and extract its visual attributes. When the fire color intensity of the rendered image is detected to be lower than the target image, start the gradient descent algorithm, iteratively adjust the BRDF parameters in the direction of reducing the diffuse reflection weight and increasing the specular reflection coefficient, and at the same time dynamically increase the ray tracing recursion level to capture the secondary refracted light inside the diamond. After multiple rounds of optimization, the visual differences between the dispersion effect of the diamond and the specular reflection distribution on the platinum surface in the rendered image and the target image are significantly reduced. It is determined that the optimization of the optical material parameters is completed, and a high-fidelity jewelry image is output.
[0054] Spatially align the high-fidelity jewelry image with the target jewelry image, quantify and compare the gradient histograms to evaluate the consistency of the facet edges and corners, analyze the brightness contrast to verify the metallic reflection intensity, and detect the texture feature differences in the arrangement pattern of the side diamonds. At the same time, confirm that both are "round diamond rings" through a pre-trained style classification model, and generate a classification consistency vector in combination with the main stone type and the metal material tag. Dynamically assign weights according to the material type, assign a higher visual attribute weight to the platinum material to strengthen the verification of the reflective characteristics, and focus on the classification consistency of the diamond main stone to ensure style matching. Finally, calculate the overall similarity. If the similarity is higher than the preset threshold, generate a detection report and output the 3D digital file; if it does not meet the standard, locate the difference area, adjust the geometric model through Poisson reconstruction and restart the material optimization process until the threshold requirement is met.
[0055] Through the above process, the present invention realizes the full-chain automated processing from image acquisition, feature retrieval, 3D reconstruction to optical rendering. Through the BRDF parameter optimization driven by gradient descent and the dynamic recursive ray tracing technology, it accurately simulates the fire color effect formed by the multiple refractions and dispersions of the light inside the diamond, as well as the mixed reflection characteristics of the incident light on the micro-structure of the platinum surface. Compared with the traditional method, the digital reduction error of the jewelry optical characteristics is significantly reduced, and at the same time, the full-process detection time is greatly compressed, significantly improving the detection efficiency and reliability, making the authenticity identification of jewelry change from a subjective judgment relying on manual experience to an objective analysis based on quantitative data, and providing a practical solution for the digital upgrade of the jewelry industry.
[0056] In summary, the present invention discloses a modeling method for jewelry detection, including obtaining a target jewelry image; extracting jewelry feature parameters from the target jewelry image using the SIFT algorithm, and using the segmentation space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a standardized jewelry feature vector; performing similar image retrieval on the KD-tree hierarchical index structure and the standardized jewelry feature vector to obtain similar images; extracting similar jewelry features according to the similar images, and performing modeling through a geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model; according to the three-dimensional jewelry model, using the gradient descent algorithm to optimize the material parameters and the number of recursive layers of ray tracing, and generating a high-fidelity jewelry image; extracting visual attribute parameters and style classification information according to the high-fidelity jewelry image, and performing multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity; comparing the overall jewelry similarity with a preset similarity threshold, when the overall jewelry similarity is greater than the similarity threshold, determining the current high-fidelity jewelry image as the final jewelry model, and when the overall jewelry similarity is less than the similarity threshold, iteratively adjusting the local details of the three-dimensional jewelry model and re-optimizing the rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained.
[0057] The present invention realizes efficient similar image retrieval through the KD-tree hierarchical index structure and the standardized feature vector constructed based on the target jewelry image, combines perspective correction and dynamic backtracking search to optimize the matching accuracy, and generates a high-precision three-dimensional jewelry model based on the geometric shape fusion algorithm. Furthermore, by establishing a BRDF optical material attribute mathematical model, using the gradient descent algorithm to iteratively optimize the material parameters and the number of recursive layers of ray tracing, dynamically adjusting the depth of the light propagation path during the rendering process to adapt to the optical characteristics of different materials, and continuously optimizing the model details through a multi-dimensional similarity comparison and iterative correction mechanism, the constructed fine jewelry optical material model can accurately represent the physical laws of the reflection on the surface of precious metals and the refraction inside gemstones. Combining the ray tracing algorithm with dynamic recursive layer control, on the premise of ensuring computational efficiency, it accurately captures the complex propagation processes such as multiple scattering, dispersion, and total reflection of light inside the jewelry, thereby solving the problem of rendering distortion caused by fixed recursive layers and simplified material models in the prior art, and realizing the accurate and efficient simulation of the propagation process of complex light inside the jewelry.
[0058] Refer to Figure 2 , the second embodiment of the present invention provides a modeling system for jewelry detection, including: A data acquisition module, configured to obtain a target jewelry image; A feature extraction module, configured to obtain a target jewelry image, extract jewelry feature parameters from the target jewelry image using the SIFT algorithm, and use the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a normalized jewelry feature vector; A similarity retrieval module, configured to perform similar image retrieval on the KD-tree hierarchical index structure and the normalized jewelry feature vector to obtain similar images; A fusion modeling module, configured to extract similar jewelry features according to the similar images, and perform modeling through a geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model; An optical rendering module, configured to optimize material parameters and the number of recursive layers of ray tracing according to the three-dimensional jewelry model using the gradient descent algorithm to generate a high-fidelity jewelry image; A similarity comparison module, configured to extract visual attribute parameters and style classification information according to the high-fidelity jewelry image, and perform multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity; A result output module, configured to compare the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, iteratively adjust the local details of the three-dimensional jewelry model and re-optimize the rendering until the overall jewelry similarity greater than the similarity threshold of the final jewelry model is obtained.
[0059] It should be noted that a modeling device for jewelry detection provided in an embodiment of the present invention is used to execute all the process steps of a modeling method for jewelry detection in the above embodiment. The working principles and beneficial effects of the two correspond one by one, and thus will not be described in detail.
[0060] An embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a modeling program for jewelry detection. When the processor executes the computer program, the steps in the above embodiments of the modeling method for jewelry detection are implemented, such as Figure 1 Step S11 shown. Alternatively, when the processor executes the computer program, the functions of each module / unit in the above device embodiments are implemented, such as the optical rendering module.
[0061] Exemplarily, the computer program may be divided into one or more modules / units. The one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0062] The electronic device can be a computing device such as a desktop computer, notebook, handheld computer, and smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above components are only examples of the electronic device and do not constitute a limitation on the electronic device. It may include more or fewer components than the above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, a bus, etc.
[0063] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the electronic device and connects all parts of the entire electronic device through various interfaces and lines.
[0064] The memory can be used to store the computer program and / or module. The processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and by calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.
[0065] Among them, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0066] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0067] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only specific embodiments of the present invention and is not used to limit the protection scope of the present invention. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A modeling method for jewelry detection, characterized in that, Including: Obtain a target jewelry image; Extract jewelry feature parameters from the target jewelry image using the SIFT algorithm, and use the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a normalized jewelry feature vector; Perform similar image retrieval on the KD-tree hierarchical index structure and the normalized jewelry feature vector to obtain similar images; Extract similar jewelry features based on the similar images, and perform modeling through a geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model; According to the three-dimensional jewelry model, use the gradient descent algorithm to optimize the material parameters and the number of ray tracing recursion layers to generate a high-fidelity jewelry image; Extract visual attribute parameters and style classification information from the high-fidelity jewelry image, and perform multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity; Compare the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, iteratively adjust the local details of the three-dimensional jewelry model and re-optimize the rendering until the overall jewelry similarity greater than the similarity threshold is obtained for the final jewelry model.
2. The modeling method for jewelry detection according to claim 1, characterized in that, The obtaining of the target jewelry image includes: Obtain an initial jewelry image dataset; According to the jewelry image dataset, adjust the image brightness distribution to obtain a preliminary jewelry image dataset with balanced brightness; According to the preliminary jewelry image dataset, perform image denoising and enhance the edge details of the image to obtain the target jewelry image.
3. The modeling method for jewelry detection according to claim 1, wherein The extracting of jewelry feature parameters from the target jewelry image using the SIFT algorithm and using the split space method for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a normalized jewelry feature vector includes: According to the target jewelry image, use a preset SIFT algorithm to extract 128-dimensional feature descriptors for each reference image to obtain jewelry feature parameters including gradient histograms, brightness contrast, and texture feature values; According to the jewelry feature parameters, use the split space method to recursively divide the feature vector space, and determine the node division dimension with a median split strategy to generate KD-tree hierarchical nodes; According to the KD-tree hierarchical nodes, determine the split threshold for each KD-tree hierarchical node based on the branch judgment method, calculate and store the backtracking path optimization parameters, and construct a hierarchical KD-tree index structure; According to the target jewelry image, the jewelry feature parameters, the KD-tree index structure, and the backtracking path optimization parameters, perform spatial coordinate normalization processing to generate a normalized jewelry feature vector adapted to the KD-tree index.
4. The modeling method for jewelry detection according to claim 1, characterized in that, The performing of similar image retrieval on the KD-tree hierarchical index structure and the normalized jewelry feature vector to obtain similar images includes: According to the KD-tree hierarchical index structure and the normalized jewelry feature vector, use the RANSAC algorithm to estimate the affine transformation matrix for the matching feature points in the KD-tree hierarchical index structure, eliminate the coordinate offset caused by the perspective difference, and obtain the affine transformation matrix; Perform feature pose correction based on the affine transformation matrix and the standardized jewelry feature vectors to generate a set of standardized feature descriptors after perspective alignment; Perform dynamic backtracking search based on the set of standardized feature descriptors and the KD-tree hierarchical index structure, optimize the backtracking path using the branch judgment method, and perform screening in combination with a preset Euclidean distance threshold to obtain the nearest neighbor feature vectors; Perform spatial distribution consistency verification based on the nearest neighbor feature vectors and the set of standardized feature descriptors, eliminate abnormal matching points deviating from the affine transformation model, and generate a list of candidate similar images; Based on the list of candidate similar images, analyze the feature matching density according to geometric constraint conditions, calculate the confidence of feature matching for each image, and perform screening in combination with a preset confidence threshold of feature matching to obtain similar images; 5. The modeling method for jewelry detection according to claim 1, characterized in that, Extract similar jewelry features from the similar images, and perform modeling through the geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model, including: Analyze the geometric shape features of the jewelry according to the similar images, use the Canny edge detection algorithm to extract the jewelry contour, calculate the area, perimeter, and aspect ratio parameters of the contour to obtain geometric feature vectors; Use the historical geometric feature vectors as the input and the historical style classification labels as the output to construct and train a style classification model. When the number of training times is greater than or equal to the preset number of training times, it is determined that the training is completed to obtain a trained style classification model; Input the geometric feature vectors into the trained style classification model to obtain style classification labels; Based on the style classification labels and the similar images, analyze the main stone type and metal material, and construct three-dimensional model screening conditions including style classification, main stone type, and metal material; Match candidate models in a preset three-dimensional jewelry model library according to the similar images and the three-dimensional model screening conditions, and perform spatial alignment of the geometric features of the candidate models and the target jewelry through the iterative closest point algorithm to obtain the geometric matching degree; According to the geometric matching degree, use the Poisson reconstruction algorithm to fuse local geometric shape values, and optimize the surface curvature through the Laplacian smoothing algorithm to generate a preliminary three-dimensional jewelry model with continuous transition; Perform grid topology consistency inspection on the preliminary three-dimensional jewelry model, and repair the model for holes and non-manifold structures to obtain a continuous and smooth three-dimensional jewelry model.
6. The modeling method for jewelry detection according to claim 1, characterized in that Using the three-dimensional jewelry model, adopt the gradient descent algorithm to optimize the material parameters and the number of recursive layers of ray tracing to generate high-fidelity jewelry images, including: Based on the BRDF model, perform preliminary analysis on the three-dimensional jewelry model to determine the optical material parameters of the jewelry surface including the diffuse reflection coefficient, specular reflection coefficient, and roughness; According to the optical material parameters of the jewelry surface and the three-dimensional jewelry model, perform multi-angle rendering on the three-dimensional jewelry model through the ray tracing algorithm, extract the gradient histogram, brightness contrast, and texture features as the visual attribute benchmarks, and generate optimized jewelry images; Based on the optimized jewelry image and the visual attribute benchmark, construct an optimization objective function that includes visual attribute differences and physical constraints. Use the adaptive step size gradient descent algorithm to perform ray tracing recursive analysis, and iteratively adjust the optical material parameters of the jewelry surface to obtain the optimized optical material parameters of the jewelry surface and the parameter-adjusted jewelry image; Based on the optimized optical material parameters of the jewelry surface and the parameter-adjusted jewelry image, perform image rendering verification. When the visual similarity between the rendered image and the target jewelry is greater than the preset visual similarity threshold, determine the current rendered image as a high-fidelity jewelry image; when the visual similarity between the rendered image and the target jewelry is less than the preset visual similarity threshold, perform ray tracing recursive analysis optimization until the visual similarity is greater than the visual similarity threshold, and determine the current rendered image as a high-fidelity jewelry image.
7. The modeling method for jewelry detection according to claim 1, wherein, Based on the high-fidelity jewelry image, extract visual attribute parameters and style classification information, and perform multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity, including: Based on the high-fidelity jewelry image and the target jewelry image, perform multi-scale feature alignment based on the affine transformation matrix to obtain a modeling-actual image pair; Based on the modeling-actual image pair, extract the histogram of gradients, brightness contrast, and texture feature values, and perform item-by-item difference quantification to obtain a visual attribute difference vector; Based on the modeling-actual image pair, perform multi-element collaborative analysis of jewelry style, main stone type, and metal material to construct a classification consistency vector; Based on the visual attribute difference vector and the classification consistency vector, perform vector weighted fusion, and dynamically adjust the visual attribute weight and classification weight to obtain the overall jewelry similarity.
8. The modeling method for jewelry detection according to claim 1, wherein Compare the overall jewelry similarity with the preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, iteratively adjust the local details of the three-dimensional jewelry model and re-optimize the rendering until the overall jewelry similarity greater than the similarity threshold is obtained for the final jewelry model, including: Compare the overall jewelry similarity with the preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, determine the current high-fidelity jewelry image as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, locate the local area with significant visual attribute differences in the high-fidelity jewelry image, and generate a geometric shape deviation map and a material parameter deviation vector; Based on the geometric shape deviation map, perform reverse optimization on the local geometric features of the three-dimensional jewelry model, adjust the vertex coordinate distribution through the Poisson reconstruction algorithm, and combine the Laplacian smoothing algorithm to repair the surface discontinuous area to obtain a corrected three-dimensional jewelry model; Based on the material parameter deviation vector, calculate the ray tracing recursive layer number, and dynamically correct the BRDF model to obtain corrected BRDF parameters; Based on the corrected three-dimensional jewelry model and the corrected BRDF parameters, perform iterative rendering optimization to generate a corrected high-fidelity jewelry image; According to the corrected high-fidelity jewelry image, visual attribute parameters are extracted for overall similarity calculation to obtain the corrected overall jewelry similarity. The corrected overall jewelry similarity is compared with a preset similarity threshold. When the corrected overall jewelry similarity is greater than the similarity threshold, the current corrected high-fidelity jewelry image is determined as the final jewelry model. When the corrected overall jewelry similarity is less than the similarity threshold, the local details of the three-dimensional jewelry model are iteratively adjusted and re-optimized for rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained.
9. A modeling system for jewelry detection, characterized in that, It includes: A data acquisition module for acquiring a target jewelry image. A feature extraction module for acquiring the target jewelry image. The SIFT algorithm is used to extract jewelry feature parameters from the target jewelry image, and the split space method is used for the jewelry feature parameters to obtain a KD-tree hierarchical index structure and a normalized jewelry feature vector. A similarity retrieval module for performing similar image retrieval on the KD-tree hierarchical index structure and the normalized jewelry feature vector to obtain similar images. A fusion modeling module for extracting similar jewelry features based on the similar images and performing modeling through a geometric shape value fusion algorithm to obtain a continuous and smooth three-dimensional jewelry model. An optical rendering module for optimizing the material parameters and the number of ray tracing recursions according to the three-dimensional jewelry model by using the gradient descent algorithm to generate a high-fidelity jewelry image. A similarity comparison module for extracting visual attribute parameters and style classification information from the high-fidelity jewelry image and performing multi-dimensional comparison with the target jewelry image to obtain the overall jewelry similarity. A result output module for comparing the overall jewelry similarity with a preset similarity threshold. When the overall jewelry similarity is greater than the similarity threshold, the current high-fidelity jewelry image is determined as the final jewelry model. When the overall jewelry similarity is less than the similarity threshold, the local details of the three-dimensional jewelry model are iteratively adjusted and re-optimized for rendering until the final jewelry model with the overall jewelry similarity greater than the similarity threshold is obtained.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the jewelry detection modeling method according to any one of claims 1 to 7.
Citation Information
Cited By
Model digital generation type design method and device based on continuous implicit function
CN121788728A