D-OpenMax open set tracing method based on SE mechanism and anchoring class center

CN120219822APending Publication Date: 2025-06-27SOUTHEAST UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510280857.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing CT image traceability method is difficult to achieve sufficient robustness and accuracy when facing noise mode diversity and device differences. Especially when the device is not seen, the system is prone to making incorrect judgments.

Method used

The D-OpenMax open-collection traceability method based on SE mechanism and anchor class center is adopted to extract shallow and deep images through branch networks, combine the SE module weighted fusion features, and use anchor class center loss and improved D-OpenMax algorithm to improve the model's recognition ability of known and unknown categories.

Benefits of technology

It significantly improves the recognition ability of known and unknown categories in the medical CT image traceability task, enhances the model's recognition accuracy of unknown devices and the recognition ability of unknown categories, and provides a more accurate and robust traceability solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219822A_ABST
    Figure CN120219822A_ABST
Patent Text Reader

Abstract

The invention provides a D-OpenMax open set tracing method based on an SE mechanism and an anchoring center. Shallow and deep features of an original image are extracted through two branch networks, weighted fusion is carried out through an SE module, and then processing is carried out through a full connection layer to obtain a feature representation and prediction result. Then, the D-OpenMax is used for correcting the activation vector, and all kinds of probabilities are calculated through Softmax normalization; and finally, judging whether the sample is an unknown class according to the unknown score and a threshold value. According to the method, multi-layer features are integrated, intra-class compactness and inter-class separation are utilized, the accuracy and robustness of the model in multi-device image recognition are effectively improved, and the traceability problem in an open set environment is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of computer vision and image traceability, and particularly relates to a D-OpenMax open-set traceability method based on the SE mechanism and the anchored class center. Background Art

[0002] With the wide application of medical imaging technology, CT images play a crucial role in the medical field. However, with the development of digital image transmission technology, the transmission process of CT images is prone to problems such as metadata loss or tampering. In practical applications, especially in the sharing and transmission of CT images, metadata often cannot reliably provide accurate information about the source device. Therefore, relying on metadata for traceability is no longer a robust solution. To improve the accuracy and security of source device traceability, identifying the source device based on the characteristics of the CT image itself, especially the noise pattern and texture information, has become a more reliable alternative.

[0003] Existing traceability methods based on noise patterns, although able to identify the source information of the device to a certain extent, still face many problems. First, the noise patterns in CT images vary significantly under different devices and shooting conditions, which affects the accuracy of noise extraction. Second, existing technologies often cannot effectively handle the open-set problem, that is, when faced with unknown devices or unseen images, the system is prone to making incorrect judgments. Therefore, how to improve the accuracy of noise extraction in source device traceability and how to ensure the accuracy of traceability in the case of unseen devices have become difficult problems that need to be urgently solved in the current technology.

[0004] In addition, most traditional image traceability methods rely on the extraction of static features of images and fail to effectively handle the diversity of noise patterns and differences between devices. Especially in the face of the complexity of CT images, existing algorithms often have difficulty achieving sufficient robustness and accuracy. Summary of the Invention

[0005] To solve the above problems, the present invention discloses a D-OpenMax open-set traceability method based on the SE mechanism and the anchored class center, which can improve the recognition accuracy of the model for known devices and enhance its discriminative ability for unknown categories.

[0006] To achieve the above object, the technical solution of the present invention is as follows:

[0007] A D-OpenMax open-set traceability method based on the SE mechanism and the anchored class center is divided into two stages: training and testing. Among them, the training stage includes the following steps:

[0008] S1: Input the original medical CT image I for training train into two branch networks to respectively extract the shallow features of the image Itrain_1 Deep image feature I train_2 , which is weighted and fused by the SE module to obtain the fused feature I train_SE . Subsequently, classification is completed through the fully connected layer and the anchor class center loss to obtain the prediction result I train_result and the corresponding feature representation I train_feature , and the mean activation vector M train_c is extracted therefrom as the class center, providing a basis for the open set test.

[0009] The test phase includes the following steps:

[0010] S2: Input the medical CT image I to be tested test into step S1 to obtain the activation vector M of the test image test_c ;

[0011] S3: Calculate the channel-level distance between the activation vector M of the test image test_c and the mean activation vector M of the known classes train_c to obtain the channel distance vector CD, and estimate the unknown class score S unknown ;

[0012] S4: Combine the unknown class score S unknown with Softmax to calculate the final class probability P final .

[0013] Furthermore, for the training phase, step S1 specifically includes the following steps

[0014] S1.1: Input the original medical CT image I for training train into branch network 1 and branch network 2 respectively to obtain the shallow image feature I train_1 and the deep image feature I train_2 ;

[0015] S1.2: Input the shallow image feature I train_1 and the deep image feature I train_2 into the SE module respectively, and perform weighted splicing in the channel dimension to obtain the fused image feature I train_SE ;

[0016] S1.3: Input the fused image feature I train_SE into the fully connected layer for classification learning, and use the anchor class center loss to cluster the same-class samples to obtain the class prediction result I train_result and the corresponding feature representation I train_feature ;

[0017] S1.4: From the feature representation I output by the fully connected layer train_featureExtract the activation vectors of each category and calculate the mean activation vector M of each known category train_c , that is, the category center information, to prepare for subsequent open-set testing.

[0018] Furthermore, for the test phase, the step S2 specifically includes the following steps

[0019] S2.1: Input the medical CT image I to be tested test into branch network 1 and branch network 2 respectively to obtain the shallow image feature I test_1 and the deep image feature I test_2 ;

[0020] S2.2: Input the shallow image feature I test_1 and the deep image feature I test_2 into the SE module for channel weighting to obtain the weighted fusion feature I test_SE ;

[0021] S2.3: Input the weighted fusion feature I test_SE into the fully connected layer to obtain the activation vector M of the test image test_c , which is used for subsequent distance calculation and classification determination;

[0022] Furthermore, in the test phase, for the step S3, by calculating the distance between the activation vector M of each test image test_c and the mean activation vector M of the known category train_c , the channel distance vector CD between the test sample and each category is obtained. Based on the channel distance vector CD, the unknown class score S unknown is estimated for unknown class determination.

[0023] Furthermore, for the test phase, the step S4 specifically includes the following steps

[0024] S4.1: Adjust the activation vector M unknown according to the unknown class score S test_c and the previously calculated distance information, and correct some elements in the activation vector to obtain the corrected activation vector M ’ test_c ;

[0025] S4.2: Normalize the corrected activation vector M ’ test_c through Softmax to obtain the final prediction probability P of each category final . If the unknown class score S unknown is higher than the set threshold τ, it is determined that the test sample is an unknown category; otherwise, normal classification is performed according to the final prediction probability P final .

[0026] The beneficial effects of the present invention are as follows:

[0027] By integrating the SE mechanism, the anchored class center loss, and the improved D-OpenMax algorithm, the present invention significantly improves the recognition ability of known and unknown categories in the task of tracing medical CT images. The SE mechanism enhances the model's ability to extract key features, making it more focused on distinguishing the features of different CT scanning devices, thereby improving the recognition accuracy of unknown devices. The anchored class center loss optimizes the class distribution in the feature space, improves the discrimination between classes, and effectively enhances the model's ability to identify unknown categories. At the same time, the D-OpenMax algorithm improves the tail fitting step of the traditional OpenMax. By analyzing the distance relationship between classes, it improves the model's accurate judgment of unknown categories. Experimental results show that this method performs excellently in an open-set environment, can effectively distinguish unknown categories, and maintains high accuracy in the recognition of existing categories, providing a more accurate and robust solution for tracing medical CT images. Description of the Drawings

[0028] Figure 1 It is the network structure diagram of the present invention.

[0029] Figure 2 It is the structure diagram of the SE module in the specific implementation of the present invention.

[0030] Figure 3 It is the calculation process of the average activation vector of known categories of D-OpenMax in the specific implementation of the present invention.

[0031] Figure 4 It is the calculation process of the channel distance vector of D-OpenMax in the specific implementation of the present invention.

[0032] Figure 5 It is the calculation process of the D-OpenMax score in the specific implementation of the present invention. Detailed Embodiments

[0033] The present invention will be further clarified below in conjunction with the drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and not to limit the scope of the present invention.

[0034] As shown in the figure, a D-OpenMax open-set tracing method based on the SE mechanism and the anchored class center according to the present invention is divided into two stages: training and testing.

[0035] Among them, the training stage includes the following steps:

[0036] S1: Input the original medical CT image I for training train into two branch networks to respectively extract the shallow-layer features of the image I train_1Image deep feature I train_2 is weighted and fused by the SE module to obtain the fused feature I train_SE . Subsequently, classification is completed through the fully connected layer and the anchor class center loss to obtain the prediction result I train_result and the corresponding feature representation I train_feature , and the average activation vector M train_c is extracted therefrom as the class center, providing a basis for the open set test.

[0037] The test phase includes the following steps:

[0038] S2: Input the medical CT image I to be tested test into step S1 to obtain the activation vector M of the test image test_c ;

[0039] S3: Calculate the channel-level distance between the activation vector M of the test image test_c and the mean activation vector M of the known classes train_c to obtain the channel distance vector CD, and estimate the unknown class score S unknown ;

[0040] S4: Combine the unknown class score S unknown with Softmax to calculate the final class probability P final .

[0041] Furthermore, step S1 in the training phase specifically includes the following steps

[0042] S1.1: Input the original medical CT image I for training train into branch network 1 and branch network 2 respectively to obtain the image shallow feature I train_1 and the image deep feature I train_2 ;

[0043] Specifically, input the original medical CT image I for training train into the shallower branch network 1. This branch network consists of an input layer, multiple residual modules, and a global pooling output layer. The input layer compresses the feature map size through 7×7 convolution and max pooling. Each residual module includes two layers of 3×3 convolution, batch normalization, and ReLU activation function, and the residual connection adds the input size adjusted by 1×1 convolution. Finally, the feature map is compressed into a fixed-length vector through the global average pooling layer, and the image shallow feature I train_1 is extracted through the fully connected layer.

[0044] Input the original medical CT image I for training trainInput into the deeper branch network 2. This branch network is similar in structure to branch network 1 and consists of an input layer, multiple Bottleneck residual blocks, and a global pooling output layer. The Bottleneck residual block extracts deep features I of the image by introducing a combination of 1×1, 3×3, and 1×1 convolutions and through batch normalization and activation functions train_2 .

[0045] S1.2: Input the shallow image features I train_1 and the deep image features I train_2 into the SE module respectively, and perform weighted splicing in the channel dimension to obtain the fused image feature I train_SE ;

[0046] Specifically, after the shallow and deep image features are extracted by branch network 1 and branch network 2 respectively, the SE module first performs global average pooling on the feature map, aggregating the features within each channel into a single scalar, which compresses the spatial information. This process obtains a scalar formula as a feature descriptor by averaging the spatial information of each channel. The formula is expressed as:

[0047]

[0048] In the formula, u c represents the feature map extracted by the branch network, c is the number of channels, H and W are the height and width of the feature map respectively, and z c is the compressed feature descriptor.

[0049] Subsequently is the excitation operation, which reprocesses the compressed descriptor through two fully connected layers. The first fully connected layer is used for dimensionality reduction, and the reduction coefficient r is 8. Then comes the ReLU non-linear activation, and then dimensionality recovery is performed through another fully connected layer and ends with a Sigmoid activation function to generate the weights for feature recalibration. The formula is expressed as:

[0050] s = F ex (z, W) = σ(g(z, W)) = σ(W2δ(W1z))

[0051] In the formula, (z, W) represents the fully connected layer operation, σ is the Sigmoid activation function, δ is the ReLu activation function, and W1 and W2 are the weight matrices of the two fully connected layers respectively.

[0052] After that, the shallow features and deep features are combined through weighted splicing to generate richer image features I train_SE . Among them, feature recalibration is achieved by performing element-wise multiplication of the weights obtained in the excitation step with the previous layer feature map, enhancing the network's attention to useful features and suppressing secondary features. The formula is expressed as:

[0053] X c = F scale (u c , s c ) = u c × s c

[0054] Wherein, X c represents the feature map after being recalibrated by the SE module, and s c is the channel-specific weight factor obtained from the excitation step.

[0055] S1.3: Input the fused image feature I train_SE into the fully connected layer for classification learning, and use the anchored class center loss to aggregate samples of the same class to obtain the class prediction result I train_result and the corresponding feature representation I train_feature

[0056] Specifically, input the fused image feature into the fully connected layer for classification learning, and use the anchored class center loss to aggregate samples of the same class. In the anchored class center loss, the selection of the class center is preset and fixed. For the anchored class center c i of each known class i, it is set to a fixed position in the feature space. These positions are usually selected as points that can clearly represent the class to ensure that they are well separated from each other in the feature space. In actual operation, each class center is set to a scaled form of the standard basis vector. If there are N known classes, then the anchored class center of each class i is represented as:

[0057] c i = α × e i

[0058] Wherein, e i represents the i-th unit basis vector in the feature space (in the N-dimensional feature space, the unit basis vector of the i-th class is defined as a vector with 1 at the i-th coordinate position and 0 at all other positions). α represents the scaling factor, which controls the scaling degree of the class center in the feature space. In the present invention, the value of α is 10.

[0059] After the class center is set, it is necessary to calculate the distance between each training sample and the corresponding class. The distance calculation uses the Euclidean distance, and the formula is expressed as:

[0060] d(x, c i ) = ‖z i - c i ||2

[0061] Wherein, z iis the output vector of the network for the input sample x, ||·||2 represents the Euclidean norm, and the calculated distance value d(x, c i ) is used for the calculation of the loss function in the subsequent training process. The loss function selected in the present invention combines the anchor loss and the improved Tuplet loss, where the anchor loss encourages the model to pull the feature vector of each sample closer to the predefined anchor point (i.e., the class center) of its corresponding class. The formula of the anchor loss is expressed as:

[0062] L A (x, y) = ||f(x) - c y ||2

[0063] In the formula, f(x) is the output of the model for the input x, and c y is the center of class y.

[0064] The Tuplet loss is a metric learning loss function that extends the traditional triplet loss and is used to handle the situation in deep metric learning where multiple negative examples are compared simultaneously instead of a single negative example. The purpose is to enhance the separability of the feature vectors in the multi-dimensional space by maximizing the distance between the input sample and its negative samples (samples of different classes) while minimizing the distance to the positive samples (samples of the same class). The Tuplet loss is expressed as:

[0065]

[0066] In the formula, x is the input sample, x + is the positive example of x, is the set of negative examples of x, and f is the embedding function generated by the neural network.

[0067] The improved Tuplet loss enhances the discrimination between classes by calculating the distances between the sample and all other class centers and maximizing the distance from the sample to the wrong class centers. The improved formula is expressed as:

[0068]

[0069] In the formula, d y is the distance from the sample to the correct class center, and d j is the distance to other wrong class centers.

[0070] Combining this loss function with the anchor loss forms a comprehensive loss function for optimizing the model during the training process. The total loss function is expressed as:

[0071] L(x, y) = L T (x, y) + λL A (x, y)

[0072] Wherein, λ is a hyperparameter used to adjust the balance between the anchor loss and the Tuplet loss. In the present invention, the value of λ is 0.2. The final output is the class prediction result I train_result and the corresponding feature representation I train_feature .

[0073] S1.4: Extract the activation vectors of each category from the feature representation I train_feature output by the fully connected layer, and calculate the mean activation vector M train_c of each known category, that is, the category center information, to prepare for subsequent open-set testing.

[0074] Specifically, extract the activation vectors A train_feature of each category from the feature representation I train_c output by the fully connected layer. These activation vectors represent the representations of the training samples in the feature space and reflect the characteristics of each category. By averaging the activation vectors of the same category, calculate the mean activation vector M train_c of each known category, that is, the category center. For each category c, the mean activation vector M train_c is the average of the activation vectors of all training samples in this category. The formula is expressed as:

[0075]

[0076] Where N c represents the number of samples in category c, represents the activation vector of the i-th sample in category c. In this way, the category center M train_c of each category can be obtained, providing a stable reference point for subsequent open-set testing.

[0077] Furthermore, for the test phase, the step S2 specifically includes the following steps,

[0078] S2.1: Input the medical CT image I test to be tested into branch network 1 and branch network 2 respectively. Branch network 1 extracts the shallow features I test_1 of the image, while branch network 2 extracts the deep features I test_2 of the image.

[0079] S2.2: Input the shallow image features I test_1 and the deep image features I test_2 into the SE module for channel weighting. The SE module generates descriptors for each channel through global average pooling. After compressing the spatial information, calculate the weights W test_1 and W test_2 . Through the weighting operation, apply these weights to I test_1 and I test_2, the weighted fusion feature I is obtained test_SE ;

[0080] S2.3: Input the weighted fusion feature I test_SE into the fully connected layer to obtain the activation vector M of the test image test_c . The connection layer maps to the class space by learning the relationship between the input features and the classes. The generated activation vector M test_c contains the information of the test sample in the feature space and is the basis for subsequent classification determination and distance calculation, used to determine whether the test sample belongs to a known class or an unknown class.

[0081] Further, in step S3 described in the test phase, calculate the channel-level distance between the activation vector M test_c of the test image and the mean activation vector M train_c of the known classes. Use the Euclidean distance to calculate the distance vector CD between M test_c and M train_c . Among them, the formula for the distance vector CD of the i-th sample i is expressed as:

[0082]

[0083] Based on the calculated distance vector CD, estimate the score S unknown of the test sample belonging to the unknown class. This score takes into account the relative distance between the test sample and the centers of all known classes and obtains the confidence of the unknown class by normalizing CD. The formula is expressed as:

[0084]

[0085] Further, step S4 described in the test phase specifically includes the following steps

[0086] S4.1: Adjust the activation vector M unknown according to the unknown class score S test_c and the previously calculated distance information, and correct some elements in the activation vector to obtain the corrected activation vector M ’ test_c ;

[0087] Specifically, by calculating the weight factor M of the minimum channel distance, this factor enhances the credibility of the adjusted activation vector by balancing the minimum distance, and the balance parameter β is used to adjust the influence degree of the minimum channel distance. Then, the activation vector is weighted after removing the minimum value to obtain M test_SAF , and M test_SAF is adjusted according to the normalized distance and the weight factor M to obtain the corrected activation vector M ’ test_cThis correction process enables the network to strengthen the attention to key information and suppress secondary information based on distance information and weights. Finally, by calculating the difference between the activation vectors before and after correction, a new eigenvalue M of the unknown class is obtained. test_unknown , and it is added to the activation vector as additional information. The calculation process is expressed as:

[0088] M = -β[min(CD), …, min(CD)] T

[0089] M test_SAF = M test_c - min(M test_c )

[0090]

[0091]

[0092] modM test_c (N + 1) = M test_unknown

[0093] S4.2: Normalize the corrected activation vector M ’ test_c through Softmax to obtain the final prediction probability P for each class. final . If the unknown class score S unknown is higher than the set threshold τ, the test sample is determined to be of the unknown class; otherwise, normal classification is performed according to the final prediction probability P final .

[0094] Specifically, the corrected activation vector M ’ test_c is transformed through the Softmax function to obtain the probability distribution for each class. The Softmax function applies the exponential function to the corrected activation vector for each class and normalizes it to ensure that the sum of the probabilities for all classes is 1, resulting in a vector DM representing the prediction probability for each class, where each element DM j represents the probability of class j. The formula is expressed as:

[0095]

[0096] DM = [DM1, DM2, …, DM j , …, DM N+1

[0097] Then, the set threshold τ is used to determine whether the test sample belongs to the unknown class. If the unknown class score S unknown is higher than the threshold, the test sample is determined to be of the unknown class; otherwise, normal classification is performed according to the final prediction probability P finalPerform normal classification.

[0098] It should be noted that the above content only illustrates the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. For those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements all fall within the protection scope of the claims of the present invention.

Claims

1. A D-OpenMax open set traceability method based on SE mechanism and anchored class center, characterized by: It is divided into two stages: training and testing: The training phase includes the following steps: S1: Original medical CT image I to be used for training train Input two branch networks to extract shallow features of the image I respectively train_1 Image Deep Features I train_2 , weighted fusion by SE module is fusion feature I train_SE ; Then, the classification is completed through the full connection layer and the anchor class center loss to obtain the prediction result I train_result And the corresponding feature representation I train_feature , and extract the activation vector mean M from it train_c Acts as a category center, providing a basis for open set testing; Furthermore, the testing phase includes the following steps: S2: The medical CT image to be tested I test Input to step S1 to get the activation vector M of the test image test_c ; S3: Calculate the activation vector M of the test image test_c With the mean activation vector M of the known category train_c The channel-level distance between them is obtained, and the channel distance vector CD is obtained, and the unknown class score S is estimated based on the channel distance vector CD unknown ; S4: Score the unknown class unknown Combined with Softmax to calculate the final category probability P final .

2. According to claim 1, a D-OpenMax open set traceability method based on SE mechanism and anchored class center is characterized by: For the training phase, step S1 specifically includes the following steps: S1.1: Original medical CT images I to be used for training train Input into branch network 1 and branch network 2 respectively to obtain the shallow feature I of the image train_1 And image deep features I train_2 ; Specifically, the original medical CT image I used for training train Input to the shallower branch network 1; the branch network consists of an input layer, multiple residual modules and a global pooling output layer; the input layer compresses the feature map size through 7×7 convolution and maximum pooling; each residual module includes two layers of 3×3 convolution, batch normalization and ReLU activation function, and the residual connection adjusts the input size through 1×1 convolution and then adds; finally, the feature map is compressed into a fixed-length vector through a global average pooling layer, and the shallow feature I of the image is extracted through a fully connected layer train_1 ; The original medical CT image I will be used for training train Input to the deeper branch network 2; the branch network has a similar structure to branch network 1, consisting of an input layer, multiple Bottleneck residual blocks, and a global pooling output layer; the Bottleneck residual block extracts deep image features I by introducing 1×1, 3×3, and 1×1 convolution combinations, and by batch normalization and activation functions train_2 ; S1.2: Image shallow features I train_1 Image Deep Features I train_2 They are input into the SE module respectively, and weighted concatenation is performed on the channel dimension to obtain the fused image feature I train_SE ; Specifically, after branch network 1 and branch network 2 extract shallow features and deep features of the image respectively, the SE module first performs global average pooling on the feature map, aggregates the features in each channel into a single scalar, and compresses the spatial information. This process averages the spatial information of each channel to obtain a scalar formula as a feature descriptor; the formula is expressed as: In the formula, u c represents the feature map extracted by the branch network, c is the number of channels, H and W are the height and width of the feature map respectively, z c is the compressed feature descriptor; After that, the excitation operation is performed, and the compressed descriptor is reprocessed through two fully connected layers. The first fully connected layer is used for dimensionality reduction, and the dimensionality reduction coefficient r is selected as 8; followed by ReLU nonlinear activation, and then through another fully connected layer for dimensionality recovery, and ended with a Sigmoid activation function to generate weights for feature recalibration; the formula is expressed as: s=F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z)) Where (z, W) represents the fully connected layer operation, σ is the Sigmoid activation function, δ is the ReLu activation function, W1 and W2 are the weight matrices of the two fully connected layers respectively; Afterwards, the shallow features are combined with the deep features through weighted splicing to generate richer image features I train_SE ; Among them, feature recalibration is to multiply the weights obtained in the excitation step by the feature map of the previous layer element by element, which enhances the network's attention to useful features and suppresses minor features; the formula is expressed as: X c =F scale (u c ,s c )=u c ×s c Where, X c represents the feature map after recalibration by the SE module, s c is the channel-specific weight factor obtained from the excitation step; S1.3: The fused image features I train_SE Input to the fully connected layer for classification learning, use the anchor class center loss to aggregate similar samples, and obtain the category prediction result I train_result And the corresponding feature representation I train_feature ; Specifically, the fused image features Input to the fully connected layer for classification learning, and use the anchor class center loss to aggregate similar samples; in the anchor class center loss, the selection of the class center is preset and fixed; for each known class i, the anchor class center c i Set to a fixed position in the feature space. These positions are usually selected to be points that can clearly represent the category to ensure that they are well separated from each other in the feature space. In practice, each class center is set to a scaled form of the standard basis vector. If there are N known categories, then the anchor class center of each class i is expressed as: c i =α×e i In the formula, e i represents the i-th unit basis vector in the feature space; α represents the scaling factor, which controls the degree of scaling of the class center in the feature space. Here, the α value is 10; After the class center is set, the distance between each training sample and the corresponding class is calculated. The distance calculation uses the Euclidean distance, which is expressed as follows: D(x,c i )=||z i -c i ||2 In the formula, z i is the output vector of the network for the input sample x, ||·||2 represents the Euclidean norm, and the calculated distance value d(x,c i ) is used to calculate the loss function in the subsequent training process; the selected loss function combines the anchor loss and the improved Tuplet loss, where the anchor loss encourages the model to bring the feature vector of each sample closer to the predefined anchor point of its corresponding class; the formula of the anchor loss is expressed as: L A (x,y)=||f(x)-c y ||2 Where f(x) is the output of the model for input x, c y is the center of class y; Tuplet loss is a metric learning loss function that extends the traditional triplet loss. Its purpose is to enhance the separability of feature vectors in multidimensional space by maximizing the distance between the input sample and its negative sample while minimizing the distance to the positive sample. Tuplet loss is expressed as: In the formula, x is the input sample, x + is a positive example of x, is the negative example set of x, and f is the embedding function generated by the neural network; The improved Tuplet loss maximizes the distance from the sample to the center of the wrong class by calculating the distance between the sample and all other class centers, thereby enhancing the distinction between classes. The improved formula is expressed as: Where, d y is the distance from the sample to the center of the correct class, d j is the distance to the center of other error classes; This loss function is combined with the anchor loss to form a comprehensive loss function, which is used to optimize the model during training; the total loss function is expressed as: L(x,y)=L T (x,y)+λL A (x,y) In the formula, λ is a hyperparameter used to adjust the balance between anchor loss and Tuplet loss; λ is set to 0.2; the final output category prediction result I train_result And the corresponding feature representation I train_feature ; S1.4: Feature representation I output from the fully connected layer train_feature Extract the activation vectors of each category and calculate the mean activation vector M for each known category train_c , i.e., category center information, in preparation for subsequent open set testing; Specifically, the feature representation I output from the fully connected layer train_feature Extract the activation vector A of each category train_c ; These activation vectors represent the representation of the training samples in the feature space and reflect the characteristic features of each category; by averaging the activation vectors of the same category, the mean activation vector M for each known category is calculated train_c , i.e., the category center; for each category c, the mean activation vector M train_c is the average value of the activation vectors of all training samples of this category; the formula is expressed as: Where N c represents the number of samples of category c, Represents the activation vector of the i-th sample in category c; in this way, the category center M of each category is obtained train_c , providing a stable reference point for subsequent open set testing.

3. According to claim 1, a D-OpenMax open set traceability method based on SE mechanism and anchored class center is characterized by: For the testing phase, step S2 specifically includes the following steps: S2.1: The medical CT image to be tested I test Input to branch network 1 and branch network 2 respectively; branch network 1 extracts shallow features I of the image test_1 , while branch network 2 extracts the deep features of the image I test_2 ; S2.2: Image shallow features I test_1 And image deep features I test_2 Input the SE module for channel weighting; the SE module generates the descriptor of each channel through global average pooling, compresses the spatial information, and calculates the weight W of each channel test_1 and W test_2 ; Apply these weights to I through a weighted operation test_1 and I test_2 , and obtain the weighted fusion feature I test_SE ; S2.3: The weighted fusion feature I test_SE Input to the fully connected layer to get the activation vector M of the test image test_c ; The connection layer maps the relationship between the input features and the categories to the category space; the generated activation vector M test_c It contains the information of the test sample in the feature space and is the basis for subsequent classification judgment and distance calculation. It is used to determine whether the test sample belongs to a known category or an unknown category.

4. According to claim 1, a D-OpenMax open set traceability method based on SE mechanism and anchored class center is characterized by: In step S3 described in the test phase, the activation vector M of the test image is calculated. test_c With the mean activation vector M of the known category train_c The channel-level distance between them; using Euclidean distance to calculate M test_c and M train_c The distance vector CD between them; Among them, the i-th sample distance vector CD i The formula is expressed as: Based on the calculated distance vector CD, estimate the score S of the test sample belonging to the unknown category unknown ; This score takes into account the relative distance between the test sample and the center of all known categories, and obtains the confidence of the unknown class by normalizing the CD; the formula is expressed as:

5. According to claim 1, a D-OpenMax open set traceability method based on SE mechanism and anchored class center is characterized by: For the testing phase, step S4 specifically includes the following steps: S4.1: According to the unknown class score S unknown And the distance information calculated previously adjusts the activation vector M test_c , and correct some elements in the activation vector to obtain the corrected activation vector M' test_c ; Specifically, by calculating the weight factor M of the minimum channel distance, the factor enhances the credibility of the adjusted activation vector by balancing the minimum distance, and the balance parameter β is used to adjust the influence of the minimum channel distance; Then, the activation vector is obtained by removing the minimum value and weighting it to obtain M test_SAF , and according to the normalized distance and weight factor M test_SAF Adjust to get the corrected activation vector M' test_c ; This correction process enables the network to strengthen its focus on key information and suppress secondary information based on distance information and weights; finally, by calculating the difference between the activation vectors before and after correction, a new unknown class feature value M is obtained test_unknown , and add it to the activation vector as additional information; The calculation process is expressed as: M=-β[min(CD),…,min(CD)] T M test_SAF =M test_c -min(M test_c ) modM test_c (N+1)=M test_nknown S4.2: The corrected activation vector M' test_c Normalized by Softmax to get the final prediction probability P for each category final ; Unknown class score S unknown If the value is higher than the set threshold τ, the test sample is judged as an unknown category; otherwise, according to the final prediction probability P final Perform normal classification; Specifically, the corrected activation vector M' test_c The Softmax function is used to transform the probability distribution of each category. The Softmax function applies an exponential function to the modified activation vector of each category and normalizes it to ensure that the sum of the probabilities of all categories is 1. A vector DM representing the predicted probability of each category is obtained, where each element DM j Represents the probability of category j; the formula is expressed as: DM=[DM1,DM2,…,DM j ,…,DM N+1 ] Afterwards, the set threshold τ is used to determine whether the test sample belongs to an unknown category; if the unknown class score S unknown If the value is higher than the threshold, the test sample is judged as an unknown category; otherwise, according to the final prediction probability P final Perform normal classification.

Citation Information

Cited By

  • Elevator abnormal state online monitoring method and system based on vibration signal analysis

    CN120987155A