A method for classifying internal flaws of a diamond based on multi-view feature fusion
Patent Information
- Application Number
- CN202611522355.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
1.通过依据钻石轮廓和刻面边界建立三维表面模型,并对候选瑕疵区域对应的折射传播路径进行追迹,各视角提取的局部图像特征被映射至统一内部坐标系。映射后的空间对应关系用于建立跨视角瑕疵观察组,使参与融合的特征具有共同的内部瑕疵对象基础;根据折射传播路径和候选区域成像状态生成的可信权重,对观察组内不同视角的局部图像特征实施门控融合。由此,空间错位的候选特征受到分离,成像状态较差的视角在融合中的占比受到约束,而其他视角中与同一三维位置对应的清晰特征得到保留,所得融合特征能够同时反映瑕疵的跨视角共同信息和可信局部信息,使内部瑕疵类别判定建立在几何对应与图像表征相互约束的基础上。
Smart Images

Figure CN123016101A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and gemstone image recognition technology, and to a method for classifying internal flaws in diamonds based on multi-view feature fusion. Background Technology
[0002] Diamond internal flaw classification typically uses visible light microscopy or industrial camera imaging as data sources. By changing the diamond's orientation relative to the imaging direction, multi-view images of the crown, pavilion, and side facets are obtained. Image processing usually includes brightness correction, reflective area identification, noise smoothing, edge extraction, and candidate region segmentation. Image features such as grayscale distribution, boundary morphology, texture variations, and spatial location are then calculated from the candidate regions. In the classification stage, a statistical or neural network classifier is built using samples labeled with flaw categories. Each viewpoint image independently provides a classification result, and the classification of the entire diamond is formed through majority decision, confidence comparison, or selection of a lower clarity grade. This processing method has a relatively clear implementation chain, but the relationships between different viewpoints are usually only established at the classification result level.
[0003] Existing solutions similar to multi-view feature fusion utilize collimated light images to extract diamond contours and facet boundaries, combine this with camera imaging relationships to establish a 3D surface model of the diamond, and detect point-like, line-like, and sheet-like anomalous regions in diffuse or transmitted light images. For each candidate anomalous region, the internal propagation path after passing through the incident facet from the camera's optical center is calculated based on the facet normal and the diamond's refraction relationship. The intersection of propagation paths from different perspectives within the diamond is then compared. Candidate anomalous regions that can form similar locations internally are clustered into the same flaw, while anomalous regions located on the surface, facet boundaries, or reflection paths are excluded. After spatial clustering, the system extracts the size, shape, grayscale, and location of the region surrounding the flaw, and determines the internal flaw category based on preset classification rules or a trained classification model.
[0004] In the aforementioned processing approach, multi-view images primarily handle 3D localization and candidate verification tasks. Local image features of candidate regions from each viewpoint still participate in classification independently. When the same internal defect is imaged through different facets, its image position, projection scale, and local morphology change with the refraction path, and different viewpoints also produce observation results with varying degrees of clarity. Without unified internal coordinate constraints and imaging reliability relationships, directly stitching, averaging, or summarizing features from different viewpoints may combine spatially mismatched anomalies into the same object, or cause features from reflective or blurred edge viewpoints to occupy an inappropriate proportion. Therefore, it is necessary to address how to establish cross-viewpoint feature correspondences for the same internal defect under diamond refraction imaging conditions and complete collaborative classification according to the reliability of observations from each viewpoint. Summary of the Invention
[0005] The purpose of this invention is to provide a diamond internal flaw classification method based on multi-view feature fusion, which can effectively solve the problems in the background art mentioned above.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for classifying internal flaws in diamonds based on multi-view feature fusion includes: acquiring multi-view images of the diamond to be classified, and establishing a three-dimensional surface model of the diamond based on the contours and facet boundaries contained in each of the multi-view images. Based on the diamond 3D surface model and the imaging relationship from each viewpoint, the refraction propagation path corresponding to the candidate flaw area in each viewpoint is traced, and the local image features extracted from the candidate flaw area are mapped to a unified internal coordinate system. A cross-view defect observation group is established according to the mapped spatial correspondence, and a reliable weight of each local image feature is generated based on the refraction propagation path and the imaging state of the candidate defect area. We use reliable weights to perform gated fusion of local image features within a cross-view defect observation group, and determine the internal defect category based on the obtained fused features.
[0007] Preferably, the tracing of the refraction propagation path includes: emitting back-projection rays from the optical centers of the cameras corresponding to each viewpoint to the feature sampling positions within the candidate defect area, and determining the incident facets where the back-projection rays intersect with the three-dimensional surface model of the diamond; The internal propagation direction is obtained based on the normal of the incident facet and the refraction relationship of the diamond. The propagation direction is traced to another facet to obtain a candidate region path bundle composed of multiple internal ray segments. The corresponding local image features are carried by the spatial sampling position within the candidate region path bundle.
[0008] Preferably, the establishment of the cross-view defect observation group includes: performing spatial nearest intersection calculation on candidate region path bundles from different viewpoints to form an intersection area located inside the three-dimensional surface model of the diamond; Each intersection area is back-projected onto the image from each viewpoint along the corresponding candidate region path bundle, and the intersection area that overlaps with the original candidate defect area is retained. Based on the spatial connectivity between the retained intersection areas, the corresponding candidate defect areas are merged, and the common neighboring areas of the merged candidate area path bundles are used as three-dimensional anchor points.
[0009] Preferably, the generation of the confidence weight includes: generating a path confidence component based on the spatial deviation of each candidate region path bundle relative to the three-dimensional anchor point and the overlap relationship between the back projection and the original candidate defect region; Based on the local brightness distribution and edge sharpness of the candidate defect area, a reliable imaging component is generated; The path confidence component and the imaging confidence component are combined according to the corresponding viewpoint and normalized within the cross-viewpoint defect observation group to obtain the confidence weight of each local image feature.
[0010] Preferably, for multiple alternative refraction propagation paths formed by passing through adjacent facets at the same feature sampling position, the intersection area of each alternative refraction propagation path with candidate region path bundles from other perspectives within the three-dimensional surface model of the diamond is calculated. The alternative refraction propagation paths that can form a common three-dimensional anchor point and return to the original candidate defect area through back projection are determined as valid paths, and the alternative refraction propagation paths that fail to pass the back projection verification are recorded as reflection interference paths.
[0011] Preferably, the determination of the spatial connectivity relationship includes: taking the candidate defect region from each viewpoint as the observation node, and establishing an association edge between the observation nodes whose back projections all coincide with the corresponding candidate defect region and whose path bundles of the candidate region share a three-dimensional anchor point; The connected subgraph formed by connecting the associated edges is determined as a cross-view defect observation group, and when there are multiple observation nodes in the same view, the observation nodes with small deviations between the candidate region path bundle and the three-dimensional anchor point space are retained.
[0012] Preferably, the confidence weight is decomposed into a basic weight corresponding to the entire view and a correction weight corresponding to the feature sampling position, wherein the basic weight is determined according to the path confidence component, and the correction weight is determined according to the imaging confidence component and the correlation of the same feature channel in other viewpoints. The base weights and correction weights are combined and then normalized across the same spatial sampling locations and the same feature channels in the cross-view defect observation group.
[0013] Preferably, the gated fusion includes: resampling local image features within the cross-view defect observation group to a common space grid according to three-dimensional anchor points, and calculating weighted shared features within the common space grid based on normalized confidence weights; Calculate the residual features of local image features from each viewpoint relative to the weighted common features, retain the residual features that can gain support in the candidate defect region of another viewpoint through the corresponding refraction propagation path, and combine the weighted common features and the retained residual features into a fused feature.
[0014] Preferably, the weighted common features are projected along the refraction propagation path corresponding to each viewpoint to each candidate defect region, and compared with the corresponding local image features to obtain cross-viewpoint consistency residuals; The 3D anchor points are corrected based on the cross-view consistency residuals in the path direction, the correction weights are corrected based on the cross-view consistency residuals in the feature channels, and the fused features are regenerated based on the corrected 3D anchor points and correction weights.
[0015] Preferably, when establishing the defect classification model, the modified fusion features within the same cross-view defect observation group are used as category-consistent samples, and the local image features not included in the cross-view defect observation group are used as artifact samples. The defect classification model is jointly trained based on the internal defect category labeling and the cross-view consistency relationship. The fusion features of the diamond to be classified are input into the trained flaw classification model to obtain classification results for internal flaw categories and artifact categories.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. A 3D surface model is established based on the diamond's outline and facet boundaries. The refraction propagation path corresponding to candidate flaw regions is traced, and local image features extracted from each viewpoint are mapped to a unified internal coordinate system. The mapped spatial correspondence is used to establish a cross-view flaw observation group, ensuring that the features participating in the fusion have a common internal flaw object basis. Based on the credibility weights generated by the refraction propagation path and the imaging state of the candidate regions, gated fusion is performed on the local image features from different viewpoints within the observation group. As a result, spatially misaligned candidate features are separated, the proportion of viewpoints with poor imaging states in the fusion is constrained, while clear features corresponding to the same 3D position in other viewpoints are preserved. The resulting fused features can simultaneously reflect the cross-view common information and credible local information of flaws, making the determination of internal flaw categories based on the mutual constraints of geometric correspondence and image representation.
[0017] 2. Spatial intersection calculation and back-projection verification of candidate region path bundles preserve intersection areas located inside the diamond that can return to the original candidate region, and form observation groups and 3D anchor points through spatial connectivity. Path confidence components and imaging confidence components further form viewpoint base weights and correction weights corresponding to feature sampling positions, allowing the weights to limit the feature channels that can extend to the common spatial grid. The weighted shared features formed during the gated fusion process are used to express consistent content across multiple views, while residual features supported by other views are used to preserve locally visible flaw details; the consistency residuals generated after the shared features are back-projected continue to correct the 3D anchor points and correction weights. The above processing reduces the chance of isolated reflection responses entering flaw representation and reduces the dominance of single-view defocusing or occlusion on the fusion result, while retaining category distinction information that is only presented in some confidence views. Attached Figure Description
[0018] Figure 1This is a flowchart illustrating the overall process of multi-view diamond internal defect classification according to the present invention. Figure 2 A flowchart for establishing the refraction propagation path tracing and cross-view observation group of the present invention; Figure 3 This is a verification diagram of the refraction propagation direction of the present invention; Figure 4 This is the path nearest intersection verification diagram of the present invention; Figure 5 This is a flowchart of the trusted weight generation and multi-view feature gating fusion process of the present invention; Figure 6 This is a verification diagram of the credibility weights and common features of the present invention. Detailed Implementation
[0019] Please refer to Figure 1 In one embodiment, a diamond internal flaw classification method based on multi-view feature fusion includes: acquiring multi-view images of the diamond to be classified; establishing a three-dimensional surface model of the diamond based on the contours and facet boundaries contained in each of the multi-view images; tracing the refraction propagation path corresponding to the candidate flaw area in each view based on the three-dimensional surface model of the diamond and the imaging relationship of each view; mapping the local image features extracted from the candidate flaw area to a unified internal coordinate system; establishing a cross-view flaw observation group according to the mapped spatial correspondence; generating a reliable weight of each local image feature based on the refraction propagation path and the imaging state of the candidate flaw area; using the reliable weight to perform gated fusion of the local image features in the cross-view flaw observation group; and determining the internal flaw category based on the obtained fused features.
[0020] In this embodiment, the multi-view image is a collection of digital images obtained from different viewing directions for the same diamond to be classified. Each image saves the corresponding viewpoint identifier, imaging coordinate relationship and acquisition order. Each image establishes an object-level association through the diamond outline and a spatial-level association through the viewpoint identifier and the corresponding imaging relationship, so that subsequent processing can distinguish image data from different sources but with the same imaging object. The internal defects to be classified include point-like or block-like inclusions formed by non-diamond materials, linear cracks formed by discontinuous crystal structures, cloud-like areas formed by dense micro-inclusions, and heterogeneous crystals encased inside the diamond. Surface scratches, facet edges and external attachments are not output as internal defect categories.
[0021] Specifically, uniform data preprocessing is performed on each multi-view image, the brightness distribution of the original image is read and a reference brightness area is determined within the diamond outline, and brightness correction is completed based on the gray-scale mapping relationship between the reference brightness area and the full diamond area; neighborhood smoothing that preserves the edges is used for isolated local noise points, a reflection mark map is generated for large-area saturated reflective areas, and a facet mark map is generated for pixels with continuous gradients that coincide with known facet boundaries; the preprocessed image maintains the same coordinate size as the reflection mark map and the facet mark map, and the imaging status of the corresponding position can be queried in the subsequent mapping and weighting process of local image features.
[0022] In a preferred embodiment, the diamond outline is obtained by the brightness difference between the foreground and the background. In local areas where the brightness difference is insufficient, the boundary is completed by combining the projection position of the outline of the adjacent viewpoint. The facet boundary is extracted by the continuity of the image gradient direction, and straight or curved segments with common intersection points and located inside the diamond outline are combined into facet polygons. For facets that are blocked by reflections and do not form complete boundaries, they are completed according to the common edge of adjacent facets and the projection shape of the corresponding facets in other viewpoints. The completion result needs to meet the constraint that each facet forms a closed outer surface in three-dimensional space.
[0023] In this embodiment, the imaging relationship of each viewpoint is jointly represented by the internal imaging relationship of the camera and the external imaging relationship of the camera relative to the diamond coordinate system. The internal imaging relationship is used to convert the image position into the observation ray in the camera coordinate system, and the external imaging relationship is used to convert the observation ray to a unified internal coordinate system. When establishing a unified internal coordinate system, the geometric center of the area surrounded by the three-dimensional surface model of the diamond is used as the origin of the coordinate system, and the facet normal that can be stably identified in each viewpoint is used to determine the coordinate direction. The contours, facet boundaries, candidate flaw areas and local image features in all images are registered under the corresponding viewpoint identifier.
[0024] Furthermore, the three-dimensional surface model of the diamond is established by combining multi-view contour constraints and facet plane constraints. The diamond contour in each image is back-projected into a spatial contour cone, and the common area of each spatial contour cone is obtained as the initial shape. The facet boundaries identified from each viewpoint are mapped to the initial shape surface, and the facet plane is fitted according to the consistent projection relationship of the same facet in different viewpoints. The intersection of adjacent facet planes forms a three-dimensional facet edge, and the intersection of multiple facet edges forms a model vertex. The model vertex, facet edges, and facet plane constitute a closed polyhedral surface.
[0025] Preferably, the closed polyhedron surface is converted into a surface mesh composed of triangular facets. Each facet stores vertex coordinates, external normal, facet identifier, and connection relationship with adjacent facets. When the back-projected ray intersects with a facet of the surface mesh, the corresponding facet normal is obtained based on the facet where the intersection point is located, and the facet identifier is used to determine whether the intersection point is inside the facet, in the facet edge neighborhood, or in the model vertex neighborhood. The model projection obtained by back-calculation from the contours of different viewpoints is compared with the original image contour, and the position and normal of the relevant facet planes are adjusted according to the projection deviation until the model projection under each viewpoint remains geometrically consistent.
[0026] In one embodiment, candidate defect regions are obtained by the difference between the original image and the local background representation, which is generated by pixels outside the candidate location that are not covered by the reflective marker map; dot-shaped candidate regions are determined based on the brightness difference between the central pixel and the peripheral pixels, linear candidate regions are determined based on continuous gradient ridges and width variations, and sheet-like candidate regions are determined based on the deviation of local texture statistics relative to the adjacent transparent region; the initial candidate region is composed of pixels that are interconnected by the difference response, and the initial candidate region that crosses the facet boundary and whose response directions on both sides are discontinuous is split into candidate defect regions belonging to different incident facets.
[0027] In this embodiment, local image features are extracted from the candidate defect region and its surrounding context region. A feature sampling grid covering different receptive ranges is established for the candidate defect region, and brightness contrast, gradient direction, texture response, and region boundary relationship are recorded at each sampling position. The features obtained from each receptive range are aligned according to the same sampling position and converted into feature vectors with consistent dimensions by sharing feature extraction parameters. The center position, boundary sampling position, and position with strong response of the candidate defect region are all used as feature sampling positions. Each local image feature saves the corresponding image coordinates, viewpoint identifier, and candidate region identifier.
[0028] Please refer to Figure 2 Furthermore, the tracing of the refraction propagation path includes: emitting back-projection rays from the optical centers of the cameras corresponding to each viewpoint to the feature sampling positions within the candidate defect area, determining the incident facets where the back-projection rays intersect with the three-dimensional surface model of the diamond; obtaining the internal propagation direction based on the normal of the incident facets and the diamond refraction relationship, tracing along the internal propagation direction to another facet, obtaining a candidate region path bundle composed of multiple internal ray segments, and using the spatial sampling positions within the candidate region path bundle to carry the corresponding local image features.
[0029] Formula for calculating the direction of refraction:
[0030]
[0031] ; In the above formula for calculating the refraction direction, i represents the unit incident direction from the camera's optical center to the incident facet, m represents the unit normal of the incident facet from the inside of the diamond to the outside, and t represents the unit propagation direction after refraction into the diamond. Indicates the refractive index of the outer medium of a diamond. Indicates the refractive index of a diamond. It represents the ratio of the two. This represents the cosine of the angle between the incident direction and the facet normal. The square root term is used to preserve the unit length and normal component of the refraction direction. For example, when the refractive index of the external medium is 1, the refractive index of the diamond is 2.42, and vector i is a coordinate vector (0.342, 0, -0.940) and vector m is a coordinate vector (0, 0, 0), we get... , The approximate propagation direction t is a coordinate vector (0.141, 0, -0.990), and the corresponding tangential component changes from 0.342 to 0.141, thus forming an internal propagation path deflected towards the normal of the facet.
[0032] Please refer to Figure 3 , Figure 3 The horizontal axis represents the sampling process of the external incident angle, and is divided into the initial, front, mid-front, middle, mid-back, rear, and final stages according to the incident state from small to large; the vertical axis represents the internal direction and deflection measurement. The black solid line is the internal tangential component, the dark gray dashed line is the internal normal component, and the light gray dotted line is the deflection intensity index.
[0033] from Figure 3 It is evident that the internal tangential component continuously increases with the increase of the incident angle, indicating that the lateral offset of the light path gradually strengthens under oblique incidence conditions; the internal normal component remains at a high level and decreases slowly, indicating that the propagation direction is still dominated by the direction of penetration into the interior of the diamond. The deflection intensity index and the tangential component both increase, reflecting... and Changes in these changes can cause discernible directional differences in the candidate region path bundles from different perspectives.
[0034] In a preferred embodiment, when generating a back-projected ray from the image position, the image coordinates are converted into normalized camera coordinates through internal imaging relations, and then converted into direction vectors in a unified internal coordinate system through external imaging relations. The intersection of the ray with the surface mesh is used to obtain the positive intersection point closest to the camera optical center, and the mesh containing the intersection point is determined as the incident mesh. When the intersection point is near the common edge of the mesh, the alternative refraction direction is calculated using the normal of the adjacent mesh to avoid the unique propagation path being discarded prematurely due to the extraction error of the facet boundary.
[0035] Specifically, the internal propagation direction extends from the incident intersection point and intersects with the closed surface grid again. The intersection point located in the positive direction of propagation and closest to the incident intersection point is determined as the exit intersection point. The line segment between the incident intersection point and the exit intersection point constitutes an internal ray segment. The sampling position on the internal ray segment is saved according to a unified internal coordinate system. When the imaging light path includes the alternative case of re-entering the diamond after reflection from the internal facets, subsequent ray segments are generated according to the intersection point normal, and the propagation order, facet markings, and path source are recorded for each ray segment.
[0036] In this embodiment, the candidate region path bundle consists of internal ray segments corresponding to multiple feature sampling positions within the same candidate defect region. Each internal ray segment maintains an adjacency relationship along the spatial arrangement of the candidate region in the image. Local image features are not directly assigned a unique depth on the ray, but rather several spatial sampling positions are established along the corresponding internal ray segments, and the image features are copied to the corresponding spatial positions through bilinear sampling results. After subsequent cross-view intersection calculations determine the possible depth of the same defect, only the spatial sampling features of the adjacent intersection regions are retained, and the two-dimensional candidate region is converted into a three-dimensional feature path bundle with depth constraints.
[0037] In a preferred embodiment, for candidate regions of linear cracks, continuous feature sampling positions are selected along the center line of the candidate region, and the internal ray segments corresponding to adjacent positions are connected to form a path band; for candidate regions of point-like or block-like inclusions, a planar sampling grid is established between the center and the boundary of the region, and the internal ray segments corresponding to the grid positions are combined to form a path tube; both the path band and the path tube are stored in the form of candidate region path bundle data, the path band retains the directional continuity relationship of the linear candidate region, and the path tube retains the projection range relationship of the block candidate region.
[0038] Furthermore, when mapping local image features from various perspectives to a unified internal coordinate system, a voxel index or continuous coordinate index is established based on the spatial position of the internal ray segment, and the perspective identifier, candidate region identifier, local image features, and corresponding path information are written into the index entries. When path bundles from different perspectives fall into adjacent spatial index entries, a correspondence to be verified is formed. Features located outside the model or exceeding the range of the corresponding internal ray segment are not written into the internal index. The index in the unified internal coordinate system only undertakes cross-perspective candidate correspondence and feature resampling, without changing the numerical content of the original image features.
[0039] In a preferred embodiment, the establishment of a cross-view defect observation group includes: performing spatial nearest intersection calculations on candidate region path bundles from different viewpoints to form intersection areas located inside the three-dimensional surface model of the diamond; back-projecting each intersection area along the corresponding candidate region path bundle to the image of each viewpoint, retaining the intersection areas whose back-projection coincides with the original candidate defect areas; merging the corresponding candidate defect areas according to the spatial connectivity between the retained intersection areas, and using the common neighbor area of the merged candidate region path bundle as a three-dimensional anchor point.
[0040] Specifically, an internal ray segment is selected from each of two different perspectives, and the shortest connecting line segment between the two internal ray segments is obtained. The midpoint of the shortest connecting line segment is taken as the candidate intersection position. When the candidate region path bundle includes multiple internal ray segments, the candidate intersection positions obtained by combining the ray segments are spatially aggregated. The intersection area is formed by the candidate intersection positions that are continuously distributed and fall inside the diamond 3D surface model. If the nearest position of two internal ray segments is located on the extension line of any ray segment but not in the actual internal segment, the corresponding candidate intersection position is not included in the intersection area.
[0041] Formula for calculating the closest intersection in space:
[0042] ; In the above formula for calculating the closest intersection in space, a and b represent the starting positions of the two internal ray segments, respectively, and u and v represent the unit directions of the corresponding ray segments. and This represents the distance traveled in their respective directions. , Let represent the actual lengths of the two internal ray segments respectively. The minimum value operation represents the variable combination that minimizes the squared positional distance within the range of the two actual internal ray segments. The squared L2 norm represents the squared Euclidean distance. and This represents the obtained nearest position parameter, where p represents the midpoint between the two nearest positions; for example, taking vector a as coordinate vector (0,0,0), vector u as coordinate vector (0,0,1), vector b as coordinate vector (1,0,1), and vector v as coordinate vector (-1,0,0), and with the lengths of both inner ray segments not less than 1, we obtain... , The vector p is a coordinate vector (0,0,1), indicating that the internal propagation paths of the two perspectives form a consistent observation at the same spatial location. If the two paths are spatially skewed, then the vector p corresponds to the midpoint of the shortest connecting line segment and retains the corresponding spatial deviation for subsequent reliable calculations.
[0043] Please refer to Figure 4 , Figure 4 The horizontal axis represents the ranking progress of candidate path pairs, and the vertical axis represents distance and intra-segment position metrics. The solid black line represents the shortest distance between two internal ray segments, while the dark gray dashed line and light gray dotted line represent... and The two segments are marked by black dots and lines, indicating their intersection and support levels. and It is the closest position parameter on two finite ray segments. and Let p represent the closest point between two paths, and p represent the candidate intersection point.
[0044] from Figure 4 As can be seen, the closest distance remains consistently low, indicating that most candidate path pairs can form a good spatial proximity relationship within the diamond. The positions of the first and second segments fluctuate alternately at different sampling stages, suggesting that the effective intersection points of candidate paths from different perspectives do not always fall within the same segment but adjust according to changes in the incident facet and candidate region position. The intersection support score fluctuates with changes in the closest distance and the stability of the position within the segment; regions with higher values represent candidate intersection areas more suitable as 3D anchor points. If the closest distance increases at a certain stage and the position within the segment is close to the end, the back-projection coincidence relationship of that perspective and whether the path falls within the actual internal segment should be verified.
[0045] In this embodiment, the back projection of the intersection area is performed according to the reversible relationship of the light path. It reaches the incident facet from the spatial position in the intersection area along the opposite direction of the original internal propagation direction, and then generates the external propagation direction according to the refraction relationship from the inside to the outside of the diamond. It is converted into image coordinates through the imaging relationship corresponding to the viewing angle. The image area formed by the back projection is compared with the original candidate defect area, and the overlapping pixels and boundary correspondence between the two are recorded. The intersection area that the back projection falls outside the original candidate area is not used as the spatial basis of the same defect. The intersection area that the back projection covers the main body of the original candidate area is entered into the spatial connectivity analysis.
[0046] Furthermore, using the preserved intersection area as a spatial connection medium, candidate defect areas from different perspectives are associated; when two intersection areas are in contact with each other in a unified internal coordinate system or are continuously covered by the same set of path bundles, they are determined to have a spatial connectivity relationship; candidate region path bundles belonging to the same connected set are grouped into cross-view defect observation groups, and three-dimensional anchor points are determined based on the concentrated area of the nearest position of each path bundle within the group; the three-dimensional anchor points preserve the spatial center, coverage area, and participating view set, and local image features are established to correspond with the three-dimensional anchor points through the participating view set.
[0047] In a preferred embodiment, spatial connectivity is determined by an observation association graph. Candidate defect regions from each viewpoint are used as observation nodes. Association edges are established between observation nodes whose back projections coincide with the corresponding candidate defect regions and whose candidate region path bundles share three-dimensional anchor points. The connected subgraph formed by connecting the association edges is determined as a cross-view defect observation group. When there are multiple observation nodes in the same viewpoint, observation nodes with smaller spatial deviations between the candidate region path bundles and the three-dimensional anchor points are retained.
[0048] Specifically, each observation node stores the viewpoint source, two-dimensional boundary, path bundle range, and local image features of the candidate region. The associated edges store the shortest path distance, intersection overlap, and bidirectional back projection coincidence between two observation nodes. When constructing associated edges, it is prohibited to connect two observation nodes from the same viewpoint, so that an observation group retains at most one corresponding observation in each viewpoint. When an observation node is connected to two spatially separated node sets at the same time, the path bundle and local features in the observation node are split according to the spatial continuity of the three-dimensional anchor point pointed to by the corresponding associated edge, and the splitting results are merged into the corresponding observation groups respectively.
[0049] In a preferred embodiment, when two adjacent internal defects have overlapping projections from a certain viewpoint, two 3D anchor points formed from other viewpoints are used to back-project the overlapping projection area, and the local image features are split according to the attribution relationship formed by the two back-projected areas within the candidate area. The feature sampling positions located at the overlapping part of the two back-projected areas are simultaneously retained to both observation groups, but in the subsequent confidence weight calculation, they are assigned weights according to their path deviation relationship to the corresponding 3D anchor points. This maintains the boundary and spatial positioning relationship of the observation groups in the multi-defect scenario.
[0050] In a preferred embodiment, for multiple alternative refraction propagation paths formed by passing through adjacent facets at the same feature sampling position, the intersection area of each alternative refraction propagation path with candidate region path bundles from other perspectives within the diamond three-dimensional surface model is calculated; the alternative refraction propagation paths that can form a common three-dimensional anchor point and return to the original candidate defect area after back projection are determined as valid paths, and the alternative refraction propagation paths that fail to pass the back projection verification are recorded as reflection interference paths.
[0051] Specifically, when the back-projected ray falls near the common edge of the facet or the candidate region spans multiple facet projections, alternative refraction propagation paths are generated using the normals of each adjacent facet, and an independent facet sequence is established for each alternative path. Each alternative path sequentially performs spatial intersection calculations with other viewpoint path bundles, and paths with a common intersection area are entered into back-projection verification. When there are multiple verified paths for the same candidate region, the spatial concentration of the intersection area corresponding to each path and the bidirectional projection coincidence relationship are compared, and the path with a higher degree of correspondence with cross-viewpoint observation is retained as an effective path carrying local image features.
[0052] In this embodiment, reflection interference paths and effective paths are stored separately. The candidate region identifier, local image features, and facet sequence corresponding to the reflection interference path are written into the artifact sample set. If a path can explain the candidate bright spot in one viewpoint but cannot form a common three-dimensional anchor point inside the diamond with other viewpoints, or if its intersection area falls into different candidate regions after back projection, the observation corresponding to the path is removed from the cross-view flaw observation group. The removed observation still retains its imaging state and local features, which are used to distinguish the image response formed by the reflection of the facets.
[0053] Please refer to Figure 5 In one embodiment, the generation of the confidence weights includes: generating a path confidence component based on the spatial deviation of each candidate region path bundle relative to the three-dimensional anchor point and the overlap relationship between the back projection and the original candidate defect region; generating an imaging confidence component based on the local brightness distribution and edge sharpness of the candidate defect region; combining the path confidence component and the imaging confidence component according to the corresponding viewpoint, and normalizing them within the cross-view defect observation group to obtain the confidence weights of each local image feature.
[0054] Specifically, the path confidence component is represented by the spatial consistency relationship between the candidate region path bundle and the 3D anchor point. The deviation between the nearest position and the coverage area of the 3D anchor point is calculated for each ray segment in the path bundle, and the coverage of the intersection area falling into the original candidate region is combined to form a path record. When most ray segments in a path bundle pass through the coverage area of the 3D anchor point and the bidirectional projection remains corresponding, the path record takes a higher confidence order. When the path bundle only approaches the 3D anchor point by extension line or deviates from the original candidate boundary by back projection, the path record takes a lower confidence order.
[0055] Furthermore, the imaging confidence component is calculated from the candidate defect region and its surrounding context. The sampling position falling into the reflective marker map is recorded as the saturation position, and the region where the local gradient direction remains continuous at adjacent sampling positions is recorded as the sharp region. A local contrast record is formed based on the degree of brightness separability between the candidate region and the surrounding reference region. Edge sharpness is represented by the gradient response width and directional stability of the candidate boundary method. Edges with smaller width and continuous direction correspond to higher sharpness order, while edges with larger diffusion range or truncated by the saturation position correspond to lower sharpness order.
[0056] In this embodiment, the path confidence component and the imaging confidence component are paired according to the same viewpoint identifier and candidate region identifier. The combination result is converted into the initial confidence value of the local image feature through non-negative mapping. The initial confidence values in the same cross-viewpoint defect observation group are summed, and the confidence weight is formed by the proportion of each initial confidence value to the sum value, so that the sum of the viewpoint weights in the same observation group is kept to a uniform value. When a certain viewpoint lacks a corresponding candidate region, the invisible state is recorded in the observation group data instead of being replaced by zero-value features, so as to avoid non-existent observations from participating in normalization.
[0057] In a preferred embodiment, the confidence weight is decomposed into a base weight corresponding to the entire viewpoint and a correction weight corresponding to the feature sampling position. The base weight is determined based on the path confidence component, and the correction weight is determined based on the imaging confidence component and the correlation of the same feature channel in other viewpoints. The base weight and the correction weight are combined and normalized between the same spatial sampling position and the same feature channel in the cross-viewpoint defect observation group.
[0058] Specifically, the base weights are shared across all feature sampling locations within the same candidate region and are used to record the overall geometric relationship between the candidate region path bundle and the 3D anchor point from the corresponding viewpoint. The correction weights vary with the spatial sampling location and feature channels. The spatial correction part is obtained from reflective markers, edge sharpness, and local contrast records, while the channel correction part is obtained by comparing the response directions of feature channels from different viewpoints at the same 3D location. The base weights first define the contribution range of the entire viewpoint, and the correction weights then adjust the participation level of local locations and feature channels within the contribution range.
[0059] In this embodiment, the correlation of the same feature channel in other viewpoints is calculated by the corresponding sampling position in a unified internal coordinate system. The channel response of the viewpoint to be calculated is compared with the channel response of other viewpoints after spatial resampling. A positive correlation record is formed when the response change direction is consistent and the corresponding position is continuous. A low correlation record is formed when the response only appears in a single viewpoint or coincides with the position of the reflective mark. For crack direction features, the channel direction is rotated to a unified spatial direction according to the projection direction from each viewpoint to the three-dimensional anchor point before comparison to avoid the same crack causing the channel direction to be inconsistent due to the change of projection angle.
[0060] Trusted fusion calculation formula:
[0061] ; In the aforementioned reliable fusion calculation formula, the view set symbol represents the set of views with actual observations within the cross-view defect observation group, j and k represent view indices, h represents the sampling position in the common spatial grid, and g represents the feature channel. Represents a set of viewpoints. This represents the normalized spatial deviation of the corresponding viewpoint path bundle relative to the 3D anchor point. Indicates a reliable imaging record of the sampling location. This represents cross-view correlation records for feature channels. This represents the normalized spatial deviation of the corresponding viewpoint k-path bundle relative to the 3D anchor point. Represents the reliable imaging record of the sampling position at viewpoint k. The cross-view correlation records of the feature channels of viewpoint k are represented, where A, B, and C represent positive scaling factors that maintain the consistency of the dimensions of each record. This represents a logical function that maps inputs to a non-negative finite interval. Representing local image features, Represents the normalized confidence weights. This represents a weighted shared feature; for example, if the observation group contains two perspectives and A, B, and C are all 1, then the record corresponding to the first perspective is... , , The second perspective corresponds to the record as follows , , When normalized, the approximate weights for the first perspective are 0.676 and the approximate weights for the second perspective are 0.324. The corresponding common features are formed by adding 0.676 times the features of the first perspective and 0.324 times the features of the second perspective.
[0062] Please refer to Figure 6 , Figure 6The horizontal axis represents the sampling process of viewpoint feature records, and the vertical axis represents reliability and common feature values. The solid black line represents the percentage of viewpoint reliability, the dark gray dashed line represents the quality constraint score, and the light gray dotted line represents common feature values. Figure 6 As can be seen, the quality constraint score fluctuates within a relatively stable range, indicating that the imaging quality and channel correlation of most viewpoints can maintain effective fusion. The low and stable viewpoint reliability percentage indicates that the contributions of each viewpoint are controlled within a reasonable range after normalization, and there is no situation where a single viewpoint dominates for a long time. The shared feature value continues to increase with the sampling process, indicating that as spatial location and feature channels advance, the image response that can be jointly supported by multiple viewpoints gradually increases.
[0063] In a preferred embodiment, gated fusion includes: resampling local image features within a cross-view defect observation group to a common space grid according to three-dimensional anchor points; calculating weighted shared features within the common space grid based on normalized confidence weights; calculating residual features of local image features from each viewpoint relative to the weighted shared features; retaining residual features that can gain support in the candidate defect region of another viewpoint through the corresponding refraction propagation path; and combining the weighted shared features with the retained residual features into fused features.
[0064] Specifically, a common spatial grid is established with the coverage area of the three-dimensional anchor point as the center. The grid direction is determined according to the spatial distribution of the path bundles of candidate regions within the observation group. For linear defects, a grid direction is set along the extension direction of the path intersection area. For point or block defects, a grid direction consistent with the unified internal coordinate system is adopted. Local image features from each viewpoint are mapped to the grid position through the corresponding refraction propagation path. For features falling between adjacent grid positions, interpolation is performed according to the spatial proximity relationship, and imaging confidence components and path confidence components are mapped simultaneously.
[0065] In this embodiment, the weighted shared features are calculated at each sampling position and each feature channel of the common spatial grid. The viewpoints involved in the calculation are limited to the viewpoints that can be projected onto the candidate defect area along the effective refraction propagation path of the corresponding grid position. When only one viewpoint forms an observation at a certain grid position, the position is marked as a position to be verified and is not directly written into the weighted shared features. When multiple viewpoints form observations, the corresponding local image features are summed according to the normalized confidence weights so that the shared features correspond to cross-viewpoint consistent content at the same three-dimensional position.
[0066] Furthermore, the weighted common features are mapped back to the feature coordinates of the corresponding candidate region along the refraction propagation path of each viewpoint, and the part consistent with the common features is separated from the corresponding local image features, and the remaining part constitutes the residual features. The visibility query of other viewpoints is established for the spatial grid position of the residual features. If the position can be projected to the candidate defect region of another viewpoint, and the other viewpoint has a directional or texture-compatible local response at the corresponding position, then the residual features are recorded as supported complementary information. Only residual features corresponding to saturation positions, facet boundaries, or reflection interference paths are not included in the fusion features.
[0067] In a preferred embodiment, when a feather-like crack appears as a continuous line pattern in some viewpoints and as a short line or bright spot in others, it is not required that the residual features remain the same in image morphology. Instead, the responses of each viewpoint are converted into spatial directions through the refraction propagation path and then compared. When the path corresponding to the short line or bright spot falls within the three-dimensional extension area formed by the mapping of the continuous line pattern, the two are determined to have a spatial support relationship. The directional features of the continuous line pattern enter the weighted common part, and the end changes of the local short lines are retained as supported residuals, thereby forming a fusion representation that simultaneously includes the overall extension and local morphology.
[0068] In this embodiment, the weighted common features and the retained residual features are combined according to the common spatial grid position. The common features occupy a fixed basic feature area, and the residual features are written into the complementary feature area after being weighted by a reliable weight according to the source perspective and spatial support relationship. When multiple perspectives form residual support at the same grid position, they are weighted and aggregated. When the spatial directions of each residual are different but are all supported by the corresponding path relationship, the direction encoding is retained and no numerical cancellation is performed. The basic feature area and the complementary feature area together constitute the fusion feature used for internal defect classification.
[0069] In a preferred embodiment, the weighted common features are projected onto each candidate defect region along the refraction propagation path corresponding to each viewpoint, and compared with the corresponding local image features to obtain cross-viewpoint consistency residuals; the three-dimensional anchor points are corrected according to the components of the cross-viewpoint consistency residuals in the path direction, the correction weights are corrected according to the components of the cross-viewpoint consistency residuals in the feature channels, and the fused features are regenerated based on the corrected three-dimensional anchor points and correction weights.
[0070] Specifically, the cross-view consistency residual is decomposed into spatial correspondence residual and feature response residual. The spatial correspondence residual is represented by the displacement between the common feature projection position and the corresponding response position in the candidate region, and is converted into the path direction component in the unified internal coordinate system according to the imaging relationship. The feature response residual is represented by the channel difference between the common projection feature and the local image feature at the same sampling position. The spatial correspondence residual only participates in the 3D anchor point correction, and the feature response residual only participates in the correction weight correction of the corresponding position and channel, so as to avoid the two types of residuals from changing the unrelated data relationship.
[0071] Furthermore, when correcting the 3D anchor points, the nearest locations that can reduce the spatial residuals are searched along the direction of the candidate region path bundles of each participating viewpoint, and the spatial center and coverage of the 3D anchor points are updated with the common region of the nearest locations of multiple views. The updated 3D anchor points need to be located inside the diamond 3D surface model and maintain the back projection coincidence relationship of most candidate regions in the original observation group. If the updated position causes the observation group to split into two unconnected intersecting regions, the observation group is split according to the connectivity relationship of the observation correlation diagram and 3D anchor points are established separately.
[0072] In this embodiment, when correcting the correction weights, the feature response residuals and imaging confidence components are jointly judged. When the local image features differ significantly from the common features and there is saturation or edge diffusion records at the corresponding positions, the correction weights of the corresponding positions and channels are reduced. When the local image features differ from the common features but the residuals can obtain spatial support from other perspectives, the corresponding residuals are transferred to the complementary feature region without reducing their correction weights. The corrected weights are renormalized and used together with the corrected 3D anchor points to drive the common spatial grid resampling and gated fusion.
[0073] In a preferred embodiment, the 3D anchor point correction, correction weight correction, and fusion feature regeneration are performed cyclically according to a fixed number of data processing rounds. In each round, the observation group members, the intersection area to which the 3D anchor point belongs, and the supported residual set are compared to see if they have changed. When the same data association result is maintained for two consecutive rounds, the loop ends and the current fusion feature is output. If the data association result still changes after the preset number of processing rounds, the observation nodes with more stable back projection coincidence are retained to form the final observation group, and the remaining observation nodes are moved into the artifact sample set.
[0074] In one embodiment, internal defect classification employs a defect classification model based on labeled samples. The model input consists of weighted shared features in a common spatial grid, supported residual features, and spatial morphological features corresponding to three-dimensional anchor points. Spatial morphological features are extracted from the intersection regions of the path bundles in the observation group, including compact, extended, and branched forms of the intersection regions, and are converted into data that can be combined with image fusion features through unified encoding. The combined features are transformed into category representations by a feature transformation layer, and then the category determination layer outputs the classification results corresponding to each internal defect category and artifact category.
[0075] Specifically, when establishing the flaw classification model, the modified fusion features within the same cross-view flaw observation group are used as category-consistent samples, and the local image features not included in the cross-view flaw observation group are used as artifact samples. The flaw classification model is jointly trained based on the internal flaw category labeling and the cross-view consistency relationship. The fusion features of the diamond to be classified are input into the trained flaw classification model to obtain the classification results of the internal flaw category and the artifact category.
[0076] In this embodiment, training samples are hierarchically labeled according to a single diamond and a single internal flaw. Each internal flaw is recorded with a category label, the diamond identifier it belongs to, and the candidate region label in each viewpoint. The candidate regions of the same flaw in different viewpoints are verified by the 3D surface model and refraction propagation path to form a consistent sample group. Candidate regions from different flaws or that cannot form a common 3D anchor point shall not be placed in the same sample group. For flaws that are not visible in some viewpoints, the corresponding viewpoints are recorded with invisible labels. No fictitious local image features are generated during the training process.
[0077] Furthermore, the category consistency relation is used to constrain the category representation of local image features within the same observation group after spatial mapping, so that perspective observations that can form a common 3D anchor point maintain the same category in the category representation; artifact samples include candidate features that have not been verified by back projection, candidate features that only form interpretations along the reflection interference path, and candidate features that continuously overlap with the facet marker map; category consistent samples and artifact samples jointly participate in model training, so that the classification boundary simultaneously uses the flaw image representation and the refraction path to verify the results.
[0078] In a preferred embodiment, the training process calculates the internal defect category determination bias, the same-group viewpoint category representation bias, and the representation separation bias between real defects and artifacts, and propagates these three types of biases in the same training round to the local feature extraction process and the gated fusion process. The category determination bias is obtained based on the sample category labeling, the same-group viewpoint category representation bias is obtained based on the cross-viewpoint defect observation group relationship, and the representation separation bias is obtained based on the reflection interference path and the candidate regions not included in the group. After training is completed, the data transformation relationship used for feature extraction, reliable mapping, gated fusion, and category determination is fixed.
[0079] In this embodiment, when processing the diamond to be classified, the diamond's three-dimensional surface model, candidate region path bundle, cross-view flaw observation group, three-dimensional anchor point, confidence weight, and fusion feature are generated sequentially according to the same data structure in the training phase. Each observation group is input into the flaw classification model, and the model outputs the internal flaw category or artifact category corresponding to the observation group. When there are multiple observation groups for the same diamond, the correspondence between the three-dimensional anchor point and the category result of each observation group is maintained, and multiple spatially separated flaws are not pre-merged into a single image feature.
[0080] In one embodiment, when an internal anomaly manifests as a continuous dark line, a local bright line, and a short dot-like response in three perspectives, the candidate regions form a continuous intersection zone inside the diamond after being mapped by the refraction propagation path. The observation correlation diagram merges the three candidate regions into the same observation group. The observation corresponding to the continuous dark line has a small path deviation and a complete edge, thus obtaining a large confidence weight in the directional feature channel. The location of the local bright line coincides with the reflective mark and obtains a small correction weight. The short dot-like response falls at the end of the intersection zone after spatial direction transformation and is retained as a supported residual. The combined common features, residual features, and spatial extension features are input into the defect classification model to obtain crack-type results.
[0081] In another embodiment, when a bright candidate region appears only in a single viewpoint and forms multiple alternative propagation paths along adjacent facets, each alternative path is intersected with the path bundles of candidate regions in other viewpoints. Alternative paths that do not form a common 3D anchor point are recorded as reflection interference paths, and the corresponding local image features do not enter cross-viewpoint gating fusion. If a weak response exists in another viewpoint and one of the alternative paths forms an internal intersection area with the weak response, the correspondence is verified by bidirectional backprojection, and the participation weights of the two observations are determined by the path confidence component and the imaging confidence component, avoiding the determination of the internal defect category based solely on the bright intensity of a single image.
[0082] In one embodiment, when point-like inclusions form compact candidate regions in multiple viewpoints, the path tubes of each candidate region form a convergent area with a concentrated range in a unified internal coordinate system, and the coverage of the three-dimensional anchor points remains compact accordingly; the weighted shared features in the common spatial grid record the central contrast response that exists in each viewpoint, and the supported residual features record the local texture changes formed by the reflection of the inclusion surface in some viewpoints; the defect classification model combines the compact spatial morphology and the shared image representation of multiple viewpoints to output the point-like inclusion category, and outputs isolated facet bright spots outside the observation group as artifact categories.
[0083] In one embodiment, when cloud-like defects are composed of multiple low-contrast small responses, the candidate regions in a single image may exhibit a state of discontinuous boundaries. The path bundles of candidate regions from different perspectives form an intersection with a certain coverage range inside the diamond through spatial connectivity. The common spatial grid resampling accumulates the low-contrast responses corresponding to the positions in different perspectives into weighted common features, and the locally missing positions are recorded in an invisible state without being filled with zero-value features. The dispersed residuals that can still obtain support in other perspective candidate regions after back projection are preserved, and the fused features thus maintain the distribution pattern and cross-perspective texture relationship of the cloud-like defects.
[0084] Furthermore, all intermediate data is stored using a traceable data recording method. The diamond 3D surface model records its source image and facet identifiers, the candidate region path bundle records its source candidate region and the facets it passes through, the cross-view flaw observation group records member nodes and associated edges, the confidence weight records the path confidence component and the imaging confidence component, and the fusion feature records the common spatial grid, shared features, and supported residual features. The classification result can return the candidate region in the corresponding view and the 3D anchor point inside the diamond along the above data relationship, maintaining a complete data closed loop between multi-view image processing, spatial correspondence, confidence fusion, and category output.
Claims
1. A diamond internal flaw classification method based on multi-view feature fusion, characterized in that, include: Obtain multi-view images of the diamond to be classified, and establish a three-dimensional surface model of the diamond based on the contours and facet boundaries contained in each of the multi-view images. Based on the diamond 3D surface model and the imaging relationship from each viewpoint, the refraction propagation path corresponding to the candidate flaw area in each viewpoint is traced, and the local image features extracted from the candidate flaw area are mapped to a unified internal coordinate system. A cross-view defect observation group is established according to the mapped spatial correspondence, and a reliable weight of each local image feature is generated based on the refraction propagation path and the imaging state of the candidate defect area. We use reliable weights to perform gated fusion of local image features within a cross-view defect observation group, and determine the internal defect category based on the obtained fused features.
2. The diamond internal flaw classification method based on multi-view feature fusion according to claim 1, characterized in that, The tracing of the refraction propagation path includes: emitting back-projection rays from the optical center of the camera corresponding to each viewpoint to the feature sampling position within the candidate defect area, and determining the incident facet where the back-projection rays intersect with the three-dimensional surface model of the diamond; The internal propagation direction is obtained based on the normal of the incident facet and the refraction relationship of the diamond. The propagation direction is traced to another facet to obtain a candidate region path bundle composed of multiple internal ray segments. The corresponding local image features are carried by the spatial sampling position within the candidate region path bundle.
3. The diamond internal flaw classification method based on multi-view feature fusion according to claim 1, characterized in that, The establishment of the cross-view defect observation group includes: performing spatial nearest intersection calculation on candidate region path bundles from different viewpoints to form an intersection area located inside the three-dimensional surface model of the diamond; Each intersection area is back-projected onto the image from each viewpoint along the corresponding candidate region path bundle, and the intersection area that overlaps with the original candidate defect area is retained. Based on the spatial connectivity between the retained intersection areas, the corresponding candidate defect areas are merged, and the common neighboring areas of the merged candidate area path bundles are used as three-dimensional anchor points.
4. The diamond internal flaw classification method based on multi-view feature fusion according to claim 1, characterized in that, The generation of the confidence weights includes: generating path confidence components based on the spatial deviation of each candidate region path bundle relative to the three-dimensional anchor point and the overlap relationship between the back projection and the original candidate defect region; Based on the local brightness distribution and edge sharpness of the candidate defect area, a reliable imaging component is generated; The path confidence component and the imaging confidence component are combined according to the corresponding viewpoint and normalized within the cross-viewpoint defect observation group to obtain the confidence weight of each local image feature.
5. The diamond internal flaw classification method based on multi-view feature fusion according to claim 2, characterized in that, For multiple alternative refraction propagation paths formed by passing through adjacent facets at the same feature sampling position, the intersection area of each alternative refraction propagation path with candidate region path bundles from other perspectives is calculated within the three-dimensional surface model of the diamond. The alternative refraction propagation paths that can form a common three-dimensional anchor point and return to the original candidate defect area through back projection are determined as valid paths, and the alternative refraction propagation paths that fail to pass the back projection verification are recorded as reflection interference paths.
6. The diamond internal flaw classification method based on multi-view feature fusion according to claim 3, characterized in that, The determination of the spatial connectivity relationship includes: taking the candidate defect region from each viewpoint as the observation node, and establishing an association edge between the observation nodes whose back projections all coincide with the corresponding candidate defect region and whose candidate region path bundles share a three-dimensional anchor point; The connected subgraph formed by connecting the associated edges is determined as a cross-view defect observation group, and when there are multiple observation nodes in the same view, the observation nodes with small deviations between the candidate region path bundle and the three-dimensional anchor point space are retained.
7. The diamond internal flaw classification method based on multi-view feature fusion according to claim 1, characterized in that, The confidence weight is decomposed into a basic weight corresponding to the entire view and a correction weight corresponding to the feature sampling position. The basic weight is determined based on the path confidence component, and the correction weight is determined based on the imaging confidence component and the correlation of the same feature channel in other view. The base weights and correction weights are combined and then normalized across the same spatial sampling locations and the same feature channels in the cross-view defect observation group.
8. The diamond internal flaw classification method based on multi-view feature fusion according to claim 1, characterized in that, The gated fusion includes: resampling local image features within the cross-view defect observation group to a common space grid according to three-dimensional anchor points, and calculating weighted shared features within the common space grid based on normalized confidence weights; Calculate the residual features of local image features from each viewpoint relative to the weighted common features, retain the residual features that can gain support in the candidate defect region of another viewpoint through the corresponding refraction propagation path, and combine the weighted common features and the retained residual features into a fused feature.
9. The diamond internal flaw classification method based on multi-view feature fusion according to claim 8, characterized in that, The weighted common features are projected along the refraction propagation path corresponding to each viewpoint to each candidate defect region, and compared with the corresponding local image features to obtain cross-viewpoint consistency residuals. The 3D anchor points are corrected based on the cross-view consistency residuals in the path direction, the correction weights are corrected based on the cross-view consistency residuals in the feature channels, and the fused features are regenerated based on the corrected 3D anchor points and correction weights.
10. The diamond internal flaw classification method based on multi-view feature fusion according to claim 1, characterized in that, When establishing a defect classification model, the modified fusion features within the same cross-view defect observation group are used as category-consistent samples, and the local image features not included in the cross-view defect observation group are used as artifact samples. The defect classification model is jointly trained based on the internal defect category labeling and the cross-view consistency relationship. The fusion features of the diamond to be classified are input into the trained flaw classification model to obtain classification results for internal flaw categories and artifact categories.