An optical coherence tomography image target recognition method based on HRSw-Former
By constructing the HRSw-Former network, the problems of detail loss and insufficient utilization of 3D spatial information in OCT 3D image recognition are solved, achieving efficient feature fusion and 3D spatial modeling, thus improving the accuracy and efficiency of OCT 3D image recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU LIXIANG OPHTHALMIC HOSPITAL CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies for OCT 3D image target recognition suffer from problems such as severe loss of detail, inefficient feature fusion, neglect of 3D spatial information, and insufficient model generalization ability, resulting in low recognition efficiency.
The HRSw-Former network is adopted, and an OCT recognition model is constructed by connecting five three-dimensional feature extraction and fusion modules and a classification head. The three-dimensional voxel block embedding module and the three-dimensional Swing Transformer module are used for feature extraction and fusion. Combined with the three-dimensional depthwise separable convolution and upsampling module, efficient three-dimensional feature extraction and fusion are achieved.
By effectively fusing multi-scale features while maintaining high resolution, the accuracy and efficiency of OCT 3D image recognition are improved. It can globally model the 3D spatial dependencies of target objects, thereby improving the accuracy of recognition and segmentation.
Smart Images

Figure CN122156775A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a target recognition method and system based on HRSw-Former optical coherence tomography images, belonging to the field of network construction and training technology. Background Technology
[0002] In image target object recognition applications, existing technologies suffer from several shortcomings: First, significant detail loss occurs. Mainstream U-Net-like algorithms rely on downsampling and upsampling operations, leading to severe loss of fine-grained features of the target object region during feature transfer. Second, feature fusion is inefficient. Feature fusion often employs simple stitching or addition methods, failing to efficiently integrate contextual information at different scales, resulting in low segmentation accuracy for complex lesions. Third, insufficient utilization of 3D information is addressed. Most methods are based on 2D slicing, neglecting the structural relationships of lesions in 3D space, leading to a lack of spatial continuity in the segmentation results. Fourth, weak model generalization ability results in poor adaptability to changes in image quality and differences in imaging from different devices, limiting their practicality in real-world applications. These shortcomings are particularly pronounced in OCT 3D image recognition applications, significantly impacting the efficiency of OCT 3D image processing. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a target recognition method based on HRSw-Former optical coherence tomography images, which can solve the problems of insufficient ability to capture details of image target objects and insufficient utilization of three-dimensional spatial information in the existing technology, and can effectively improve the working efficiency of OCT three-dimensional image recognition applications.
[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The present invention designs an optical coherence tomography (OCT) image target recognition method based on HRSw-Former, and performs the following steps A to C to obtain an OCT recognition model, which is used to identify the regional location of a preset target object in an OCT three-dimensional image;
[0005] Step A. Obtain a preset number of OCT 3D sample images, and know the location of the preset target object in each OCT 3D sample image, then proceed to Step B;
[0006] Step B. Construct the HRSw-Former network by sequentially connecting the backbone network for 3D image analysis and the classification head from the input end to the output end, and then proceed to step C;
[0007] Step C. Based on each OCT 3D sample image, using the OCT 3D sample image as input and the preset target object region location in the OCT 3D sample image as output, train the HRSw-Former network to obtain the trained network, i.e., the OCT recognition model.
[0008] As a preferred technical solution of the present invention: In the HRSw-Former network constructed in step B, the input end of the backbone network constitutes the input end of the HRSw-Former network; the backbone network includes five three-dimensional feature extraction and fusion modules connected in series from the input end to the output end, wherein the first three-dimensional feature extraction and fusion module includes a first cross-resolution feature fusion module and a feature extraction module. The first cross-resolution feature fusion module includes one input end and two output ends. The input end of the feature extraction module constitutes one input end of the first three-dimensional feature extraction and fusion module, which constitutes the input end of the backbone network. The output end of the feature extraction module is connected to the input end of the first cross-resolution feature fusion module. The two output ends of the first cross-resolution feature fusion module constitute the two output ends of the first three-dimensional feature extraction and fusion module.
[0009] The second sequential 3D feature extraction and fusion module includes a second cross-resolution feature fusion module and two feature extraction modules. The second cross-resolution feature fusion module includes two input terminals and three output terminals. The input terminals of the two feature extraction modules constitute the two input terminals of the second sequential 3D feature extraction and fusion module, which are used to connect to the two output terminals of the first sequential 3D feature extraction and fusion module. The output terminals of the two feature extraction modules are respectively connected to each input terminal of the second cross-resolution feature fusion module. The three output terminals of the second cross-resolution feature fusion module constitute the three output terminals of the second sequential 3D feature extraction and fusion module.
[0010] The third sequential 3D feature extraction and fusion module includes a third cross-resolution feature fusion module and three feature extraction modules. The third cross-resolution feature fusion module includes three input terminals and three output terminals. The input terminals of the three feature extraction modules constitute the three input terminals of the third sequential 3D feature extraction and fusion module, which are used to connect to the three output terminals of the second sequential 3D feature extraction and fusion module. The output terminals of the three feature extraction modules are respectively connected to each input terminal of the third cross-resolution feature fusion module. The three output terminals of the third cross-resolution feature fusion module constitute the three output terminals of the third sequential 3D feature extraction and fusion module.
[0011] The fourth sequential 3D feature extraction and fusion module includes a fourth cross-resolution feature fusion module and three feature extraction modules. The fourth cross-resolution feature fusion module includes three input terminals and four output terminals. The input terminals of the three feature extraction modules constitute the three input terminals of the fourth sequential 3D feature extraction and fusion module, which are used to connect to the three output terminals of the third sequential 3D feature extraction and fusion module. The output terminals of the three feature extraction modules are respectively connected to each input terminal of the fourth cross-resolution feature fusion module. The four output terminals of the fourth cross-resolution feature fusion module constitute the four output terminals of the fourth sequential 3D feature extraction and fusion module.
[0012] The fifth sequential 3D feature extraction and fusion module includes a fifth cross-resolution feature fusion module and four feature extraction modules. The fifth cross-resolution feature fusion module includes four input terminals and four output terminals. The input terminals of the four feature extraction modules constitute the four input terminals of the fifth sequential 3D feature extraction and fusion module, which are used to connect to the four output terminals of the fourth sequential 3D feature extraction and fusion module. The output terminals of the four feature extraction modules are respectively connected to each input terminal of the fifth cross-resolution feature fusion module. The four output terminals of the fifth cross-resolution feature fusion module constitute the four output terminals of the fifth sequential 3D feature extraction and fusion module, which are the output terminals of the backbone network.
[0013] Each feature extraction module in the 3D feature extraction and fusion module has the same structure. Each feature extraction module includes a 3D voxel block embedding module and a 3D Swing Transformer module. In the feature extraction module structure, the input end of the 3D voxel block embedding module constitutes the input end of the feature extraction module, the output end of the 3D voxel block embedding module is connected to the input end of the corresponding 3D Swing Transformer module, and the output end of the 3D Swing Transformer module constitutes the output end of the feature extraction module.
[0014] Each output of the backbone network is connected to the input of the classification head, and the output of the classification head constitutes the output of the HRSw-Former network.
[0015] As a preferred technical solution of the present invention: the first cross-resolution feature fusion module includes a three-dimensional voxel block merging module and a straight wire. One end of the straight wire is connected to the input end of the three-dimensional voxel block merging module, and the connection position constitutes the input end of the first cross-resolution feature fusion module. The other end of the straight wire and the output end of the three-dimensional voxel block merging module constitute the two output ends of the first cross-resolution feature fusion module.
[0016] The second cross-resolution feature fusion module includes a 3D voxel block expansion module, a 3D depthwise separable convolution module, two 3D voxel block merging modules, and three connection modules. The input of one of the 3D voxel block merging modules is connected to one of the inputs of the first connection module, and this connection constitutes one input of the second cross-resolution feature fusion module. The output of one of the 3D voxel block merging modules is connected to the inputs of the 3D depthwise separable convolution module and one of the inputs of the second connection module, respectively. The output of the 3D depthwise separable convolution module is connected to one of the inputs of the third connection module. The other input of the second connection module, the input of the 3D voxel block expansion module, and the input of the other 3D voxel block merging module are connected, and this connection constitutes another input of the second cross-resolution feature fusion module. The output of the 3D voxel block expansion module is connected to the other input of the first connection module. The output of the other 3D voxel block merging module is connected to the other input of the third connection module. The outputs of the three connection modules constitute the three outputs of the second cross-resolution feature fusion module.
[0017] The third cross-resolution feature fusion module includes a 3D voxel block expansion module, a 3D depthwise separable convolution module, two 3D voxel block merging modules, two 3D upsampling modules, and three connection modules. The input of one of the 3D voxel block merging modules is connected to the first input of the first connection module, and this connection constitutes the first input of the third cross-resolution feature fusion module. The output of one of the 3D voxel block merging modules is connected to the input of the 3D depthwise separable convolution module and the first input of the second connection module, respectively. The output of the 3D depthwise separable convolution module is connected to the first input of the third connection module. The inputs of the 3D voxel block expansion module, the second input of the second connection module, and the input of the other 3D voxel block merging module are connected together. The three-dimensional voxel block expansion module is connected to the second input of the first connection module, and the output of the three-dimensional voxel block merging module is connected to the second input of the third connection module. The output of the other three-dimensional voxel block merging module is connected to the second input of the third connection module. The input of one of the three-dimensional upsampling modules is connected to the third input of the third connection module, and the connection position constitutes the third input of the third cross-resolution feature fusion module. The output of one of the three-dimensional upsampling modules is connected to the input of another three-dimensional upsampling module and the third input of the second connection module. The output of the other three-dimensional upsampling module is connected to the third input of the first connection module. The outputs of the three connection modules constitute the three outputs of the third cross-resolution feature fusion module.
[0018] The fourth cross-resolution feature fusion module includes three 3D voxel block merging modules, three 3D upsampling modules, three 3D depthwise separable convolutional modules, and four connection modules. The input of the first 3D voxel block merging module is connected to the first input of the first connection module, and this connection constitutes the first input of the fourth cross-resolution feature fusion module. The output of the first 3D voxel block merging module is connected to the input of the first 3D depthwise separable convolutional module and the first input of the second connection module. The output of the first 3D depthwise separable convolutional module is connected to the input of the second 3D depthwise separable convolutional module and the first input of the third connection module. The output of the second 3D depthwise separable convolutional module is connected to the first input of the fourth connection module. The inputs of the first 3D upsampling module, the second connection module, and the second 3D voxel block merging module are connected, and this connection constitutes the second input of the fourth cross-resolution feature fusion module. The input terminals are as follows: the output terminal of the first 3D upsampling module is connected to the second input terminal of the first connection module; the output terminal of the second 3D voxel block merging module is connected to the input terminals of the third 3D depthwise separable convolution module and the second input terminal of the third connection module; the output terminal of the third 3D depthwise separable convolution module is connected to the second input terminal of the fourth connection module; the input terminals of the second 3D upsampling module, the third connection module, and the third 3D voxel block merging module are connected together, and the connection position constitutes the third input terminal of the fourth cross-resolution feature fusion module; the output terminal of the second 3D upsampling module is connected to the input terminals of the third 3D upsampling module and the third input terminal of the second connection module; the output terminal of the third 3D upsampling module is connected to the third input terminal of the first connection module; the output terminal of the third 3D voxel block merging module is connected to the third input terminal of the fourth connection module; the output terminals of the four connection modules constitute the four output terminals of the fourth cross-resolution feature fusion module.
[0019] The fifth cross-resolution feature fusion module includes three 3D voxel block merging modules, three 3D depthwise separable convolutional modules, four connection modules, and six 3D upsampling modules. The input of the first 3D voxel block merging module is connected to the first input of the first connection module, and this connection constitutes the first input of the fifth cross-resolution feature fusion module. The output of the first 3D voxel block merging module is connected to the input of the first 3D depthwise separable convolutional module and the first input of the second connection module. The output of the first 3D depthwise separable convolutional module is connected to the input of the second 3D depthwise separable convolutional module, the first input of the third connection module, and the first input of the fourth connection module. The first input of the three connection modules; the output of the second 3D depthwise separable convolution module is connected to the first input of the fourth connection module; the inputs of the first 3D upsampling module, the second input of the second connection module, and the second 3D voxel block merging module are connected, and the connection position constitutes the second input of the fifth cross-resolution feature fusion module; the output of the first 3D upsampling module is connected to the second input of the first connection module; the output of the second 3D voxel block merging module is connected to the inputs of the third 3D depthwise separable convolution module and the second input of the third connection module, respectively; the third 3D depthwise separable convolution module... The output of the degree-separable convolution module is connected to the second input of the fourth connection module; the inputs of the second 3D upsampling module, the third input of the third connection module, and the third 3D voxel block merging module are connected, and their connection points form the third input of the fifth cross-resolution feature fusion module; the output of the second 3D upsampling module is connected to the inputs of the third 3D upsampling module and the third input of the second connection module; the output of the third 3D upsampling module is connected to the third input of the first connection module; the output of the third 3D voxel block merging module is connected to the third input of the fourth connection module. The input of the fourth 3D upsampling module is connected to the fourth input of the fourth connection module, and the connection position constitutes the fourth input of the fifth cross-resolution feature fusion module; the output of the fourth 3D upsampling module is connected to the input of the fifth 3D upsampling module and the fourth input of the third connection module, respectively; the output of the fifth 3D upsampling module is connected to the input of the sixth 3D upsampling module and the fourth input of the second connection module, respectively; the output of the sixth 3D upsampling module is connected to the fourth input of the first connection module; the outputs of the four connection modules constitute the four outputs of the fifth cross-resolution feature fusion module.
[0020] As a preferred embodiment of the present invention: the classification head, from the input end to the output end, includes a connection module, a three-dimensional voxel block expansion module, and a convolution kernel connected in series. The 3D convolution module has an input terminal that forms the input terminal of the classification head, and an output terminal that forms the output terminal of the classification head.
[0021] As a preferred embodiment of the present invention: step B further includes constructing an auxiliary network, which comprises three 3D convolutional modules. The output of the 3D voxel block embedding module in one of the 2nd, 4th, and 5th sequential 3D feature extraction and fusion modules in the backbone network is respectively connected to the input of the three 3D convolutional modules. In step C, during the training of the HRSw-Former network, the comprehensive loss result is calculated according to steps C1 to C3 as follows. ;
[0022] Step C1. Calculate the output results of the three 3D convolutional modules and compare them with the corresponding OCT 3D sample images received by the HRSw-Former network under the preset target loss function, specifically loss_1, loss_2, and loss_3. Then, based on the weight combination of the three 3D convolutional modules in the preset auxiliary network, calculate the weighted sum to obtain the branch comprehensive loss result. Then proceed to step C2;
[0023] Step C2. Calculate the loss result of the output of the backbone network compared with the corresponding OCT 3D sample image received by the HRSw-Former network under the preset target loss function. Then proceed to step C3;
[0024] Step C3. According to Calculate the comprehensive loss result ,in, This represents the weighting coefficient for the preset auxiliary network loss.
[0025] As a preferred technical solution of the present invention: the auxiliary network further includes a downsampling module. In step C1, the target three-dimensional feature image after the OCT three-dimensional sample image received by the HRSw-Former network is processed by the downsampling module in the auxiliary network is first obtained. Then, the output results of the three 3D convolution modules are calculated and compared with the target three-dimensional feature image with respect to the preset target loss function, namely loss_1, loss_2, and loss_3.
[0026] In step C2, the loss result of the output of the backbone network compared with the target 3D feature image under the preset target loss function is calculated. .
[0027] As a preferred embodiment of the present invention, the preset target loss function is as follows:
[0028] ;
[0029] ;
[0030] ;
[0031] ;
[0032] The loss result of the target loss function is obtained by calculating using the above formula. ,in, Represents the first 3D sample image in OCT. Individual pixel blocks originate from the output of the backbone network or the output of each 3D convolutional module in the auxiliary network. Represents the first 3D sample image in OCT. The true label of an individual element block This represents a preset constant. This represents the Dice loss result. This indicates that the parameter is adjusted proportionally and adaptively. , These represent the number of voxel blocks belonging to the target object and the number of voxel blocks not belonging to the target object in the OCT 3D sample images during network training, respectively. This indicates the preset adjustment factor. This represents the weighted cross-entropy loss result. and This represents the weight coefficients of the preset Dice loss result and the weighted cross-entropy loss result.
[0033] As a preferred technical solution of the present invention, step A further includes preprocessing updates for each OCT three-dimensional sample image, including denoising, contrast enhancement, standardization, and size adjustment.
[0034] The target recognition method for optical coherence tomography images based on HRSw-Former described in this invention has the following technical advantages compared with existing technologies:
[0035] This invention designs a target recognition method based on HRSw-Former optical coherence tomography (OCT) images. Using a backbone network and a classification head for 3D image analysis, an HRSw-Former network is constructed and trained to obtain an OCT recognition model. This model is used to identify the location of a preset target object in an OCT 3D image. It can maintain the detailed features of the target object throughout the process at high resolution, avoiding information loss caused by downsampling operations. Furthermore, it can effectively fuse multi-scale features and model the global 3D spatial dependencies of the target object region. The overall design scheme has the advantages of high recognition accuracy, strong detail preservation capability, and excellent 3D context modeling, effectively improving the efficiency of target object recognition and segmentation in 3D images. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the HRSw-Former network in the design of this invention;
[0037] Figure 2 This is a schematic diagram of the first cross-resolution feature fusion module in the design of this invention;
[0038] Figure 3 This is a schematic diagram of the second cross-resolution feature fusion module in the design of this invention;
[0039] Figure 4 This is a schematic diagram of the third cross-resolution feature fusion module in the design of this invention;
[0040] Figure 5 This is a schematic diagram of the fourth cross-resolution feature fusion module in the design of this invention;
[0041] Figure 6 This is a schematic diagram of the fifth cross-resolution feature fusion module in the design of this invention;
[0042] Figure 7 This is a schematic flowchart of the preprocessing and pre-processing of OCT three-dimensional sample images in the design of this invention;
[0043] Figure 8 This is a schematic diagram of the system application according to an embodiment of the present invention;
[0044] Figure 9 This is a schematic diagram illustrating the application output results of an embodiment of the present invention, comparing dry OCT image annotation and 3D annotation visualization;
[0045] Figure 10 This is a schematic diagram illustrating the application output results of an embodiment of the present invention, comparing wet OCT image annotation and 3D annotation visualization. Detailed Implementation
[0046] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0047] This invention designs a target recognition method based on HRSw-Former optical coherence tomography (OCT) images. In practical applications, steps A to C are performed to obtain an OCT recognition model, which is used to identify the location of a preset target object in the OCT three-dimensional image.
[0048] Step A. Obtain a preset number of OCT 3D sample images, and know the location of the preset target object in each OCT 3D sample image. Then, perform preprocessing updates on each OCT 3D sample image, including denoising, contrast enhancement, standardization, and size adjustment, and proceed to Step B.
[0049] Step B. Construct the HRSw-Former network by sequentially connecting the backbone network for 3D image analysis and the classification head from the input end to the output end, and then proceed to step C.
[0050] In practical applications, such as Figure 1 As shown, the HRSw-Former network structure design uses the input of the backbone network as its input. The backbone network adopts a parallel multi-resolution subnet structure, maintaining high-resolution feature maps throughout. Furthermore, the network integrates the high-resolution feature preservation capability of HRNet and the global dependency modeling capability of Swin Transformer. Specifically, the backbone network, from input to output, includes five sequentially connected 3D feature extraction and fusion modules. The first sequential 3D feature extraction and fusion module includes a first cross-resolution feature fusion module and a feature extraction module. The first cross-resolution feature fusion module includes one input and two outputs. The input of the feature extraction module constitutes one input of the first sequential 3D feature extraction and fusion module, forming the input of the backbone network. The output of the feature extraction module connects to the input of the first cross-resolution feature fusion module, and the two outputs of the first cross-resolution feature fusion module constitute the two outputs of the first sequential 3D feature extraction and fusion module.
[0051] Regarding the first cross-resolution feature fusion module, such as Figure 2As shown, the specific design includes a 3D Patch Merging module and a through wire. The 3D Patch Merging module is the inverse operation of 3DPatch Expanding; the former is downsampling (reducing dimensions and increasing the number of channels), while the latter is upsampling (increasing dimensions and decreasing the number of channels). Together, they form the core link of 3D feature scale transformation in HRSw-Former. In the structure of the first cross-resolution feature fusion module, one end of the through wire is connected to the input end of the 3D Patch Merging module, and the connection position constitutes the input end of the first cross-resolution feature fusion module. The other end of the through wire is connected to the output end of the 3D Patch Merging module, forming the two output ends of the first cross-resolution feature fusion module.
[0052] The second sequential 3D feature extraction and fusion module includes a second cross-resolution feature fusion module and two feature extraction modules. The second cross-resolution feature fusion module includes two input terminals and three output terminals. The input terminals of the two feature extraction modules constitute the two input terminals of the second sequential 3D feature extraction and fusion module, which are used to connect to the two output terminals of the first sequential 3D feature extraction and fusion module. The output terminals of the two feature extraction modules are respectively connected to each input terminal of the second cross-resolution feature fusion module. The three output terminals of the second cross-resolution feature fusion module constitute the three output terminals of the second sequential 3D feature extraction and fusion module.
[0053] Regarding the second cross-resolution feature fusion module, such as Figure 3As shown, the specific design includes a 3D voxel block expansion module (3D Patch Expanding), a 3D depth separable convolution module (3D Depth Separable conv), two 3D voxel block merging modules (3D Patch Merging), and three concat modules. The 3D voxel block expansion module (3D Patch Expanding) is the inverse operation of 3D Patch Merging. Through dynamic upsampling and multi-resolution decoding, 3D Patch Expanding restores the spatial resolution while preserving as many 3D details of the lesion as possible. The core idea of the 3D depth separable convolution module (3D Depth Separable conv) is to decompose the standard 3D convolution into two independent computational steps: depthwise 3D convolution and pointwise 3D convolution. This decomposition method significantly reduces the number of model parameters and computational complexity while maintaining feature extraction capabilities, making it particularly suitable for processing high-dimensional 3D medical image data. In the second cross-resolution feature fusion module structure, the input of one 3D voxel patch merging module is connected to one of the inputs of the first concat module, and the connection point constitutes one of the inputs of the second cross-resolution feature fusion module; the output of one 3D voxel patch merging module is connected to the input of the 3D depth separable convolution module and one of the inputs of the second concat module, respectively; the output of the 3D depth separable convolution module is connected to one of the inputs of the third concat module; the other input of the second concat module, the input of the 3D patch expanding module, and the input of another 3D voxel patch merging module are connected, and the connection point constitutes another input of the second cross-resolution feature fusion module; the 3D patch expanding module... The output of the Expanding module is connected to the other input of the first concat module; the output of the 3D PatchMerging module is connected to the other input of the third concat module; the outputs of the three concat modules constitute the three outputs of the second cross-resolution feature fusion module.
[0054] The third sequential 3D feature extraction and fusion module includes a third cross-resolution feature fusion module and three feature extraction modules. The third cross-resolution feature fusion module includes three input terminals and three output terminals. The input terminals of the three feature extraction modules constitute the three input terminals of the third sequential 3D feature extraction and fusion module, which are used to connect to the three output terminals of the second sequential 3D feature extraction and fusion module. The output terminals of the three feature extraction modules are respectively connected to each input terminal of the third cross-resolution feature fusion module. The three output terminals of the third cross-resolution feature fusion module constitute the three output terminals of the third sequential 3D feature extraction and fusion module.
[0055] Regarding the third cross-resolution feature fusion module, such as Figure 4As shown, the specific design includes a 3D Patch Expanding module, a 3D Depth Separable Convolution module, two 3D Patch Merging modules, two 3D Upsampling modules, and three concat modules. Compared to the 3D Patch Expanding module, the 3D Upsampling module does not require adjustment of the number of feature channels, making the calculation simpler and more efficient, and it can quickly restore the spatial resolution. It is suitable for use in feature fusion scenarios where there is no need to adjust the channel dimension. In the structure of the third cross-resolution feature fusion module, the input of one of the 3D Patch Merging modules is connected to the first input of the first concat module, and the connection position constitutes the first input of the third cross-resolution feature fusion module. The output of one of the 3D Patch Merging modules is connected to the 3D Depth Separable Convolution module. The input of the first concatenation module (conv), the first input of the second concatenation module (concat), and the output of the 3D depth separable convolution module (3D Depth Separable conv) are connected to the first input of the third concatenation module (concat); the input of the 3D Patch Expanding module (3D Patch Expanding), the second input of the second concatenation module (concat), and the input of another 3D Patch Merging module (3D Patch Merging) are connected, and the connection point forms the second input of the third cross-resolution feature fusion module; the output of the 3D Patch Expanding module (3D Patch Expanding) is connected to the second input of the first concatenation module (concat); the output of another 3D Patch Merging module (3D Patch Expanding) is connected to the second input of the first concatenation module (concat); The output of the merging module is connected to the second input of the third connection module (concat); the input of one of the 3D upsampling modules (3DUpsampling) is connected to the third input of the third connection module (concat), and the connection position constitutes the third input of the third cross-resolution feature fusion module; the output of one of the 3D upsampling modules (3DUpsampling) is connected to the input of another 3D upsampling module (3D Upsampling) and the third input of the second connection module (concat);The output of another 3D upsampling module is connected to the third input of the first concat module; the outputs of the three concat modules constitute the three outputs of the third cross-resolution feature fusion module.
[0056] The fourth sequential 3D feature extraction and fusion module includes a fourth cross-resolution feature fusion module and three feature extraction modules. The fourth cross-resolution feature fusion module includes three input terminals and four output terminals. The input terminals of the three feature extraction modules constitute the three input terminals of the fourth sequential 3D feature extraction and fusion module, which are used to connect to the three output terminals of the third sequential 3D feature extraction and fusion module. The output terminals of the three feature extraction modules are respectively connected to each input terminal of the fourth cross-resolution feature fusion module. The four output terminals of the fourth cross-resolution feature fusion module constitute the four output terminals of the fourth sequential 3D feature extraction and fusion module.
[0057] Regarding the fourth cross-resolution feature fusion module, such as Figure 5As shown, the specific design includes three 3D voxel patch merging modules, three 3D upsampling modules, three 3D depth separable convolutional modules, and four concat modules. The input of the first 3D patch merging module is connected to the first input of the first concat module, and this connection forms the first input of the fourth cross-resolution feature fusion module. The output of the first 3D patch merging module is connected to the input of the first 3D depth separable convolutional module and the first input of the second concat module. The output of the first 3D depth separable convolutional module is connected to the input of the second 3D depth separable convolutional module and the first input of the third concat module. The output of the second 3D depth separable convolutional module is connected to the input of the third concat module. The output of the first 3D upsampling module (conv) is connected to the first input of the fourth concatenation module (concat); the inputs of the first 3D upsampling module (3D Upsampling), the second input of the second concatenation module (concat), and the second 3D patch merging module (3D Patch Merging) are connected, and the connection point constitutes the second input of the fourth cross-resolution feature fusion module; the output of the first 3D upsampling module (3D Upsampling) is connected to the second input of the first concatenation module (concat); the output of the second 3D patch merging module (3D Patch Merging) is connected to the inputs of the third 3D depth separable convolution module (3D Depth Separable conv) and the second input of the third concatenation module (concat); the output of the third 3D depth separable convolution module (3D Depth Separable conv) is connected to the second input of the fourth concatenation module (concat); the inputs of the second 3D upsampling module (3D Upsampling), the third input of the third concatenation module (concat), and the third 3D patch merging module (3D Patch Merging) are connected to the second input of the fourth concatenation module (concat); The three input terminals of the Merging module are connected together, and the connection point constitutes the third input terminal of the fourth cross-resolution feature fusion module.The output of the second 3D upsampling module is connected to the input of the third 3D upsampling module and the third input of the second concat module. The output of the third 3D upsampling module is connected to the third input of the first concat module. The output of the third 3D patch merging module is connected to the third input of the fourth concat module. The outputs of the four concat modules constitute the four outputs of the fourth cross-resolution feature fusion module.
[0058] The fifth sequential 3D feature extraction and fusion module includes a fifth cross-resolution feature fusion module and four feature extraction modules. The fifth cross-resolution feature fusion module includes four input terminals and four output terminals. The input terminals of the four feature extraction modules constitute the four input terminals of the fifth sequential 3D feature extraction and fusion module, which are used to connect to the four output terminals of the fourth sequential 3D feature extraction and fusion module. The output terminals of the four feature extraction modules are respectively connected to each input terminal of the fifth cross-resolution feature fusion module. The four output terminals of the fifth cross-resolution feature fusion module constitute the four output terminals of the fifth sequential 3D feature extraction and fusion module, which are the output terminals of the backbone network.
[0059] Regarding the fifth cross-resolution feature fusion module, such as Figure 6As shown, the specific design includes three 3D voxel patch merging modules, three 3D depth-separable convolutional modules, four concat modules, and six 3D upsampling modules. The input of the first 3D patch merging module is connected to the first input of the first concat module, and this connection forms the first input of the fifth cross-resolution feature fusion module. The output of the first 3D patch merging module is connected to the input of the first 3D depth-separable convolutional module and the first input of the second concat module. The output of the first 3D depth-separable convolutional module is connected to the input of the second 3D depth-separable convolutional module and the first input of the third concat module. The output of the second 3D depth-separable convolutional module is connected to the input of the third concat module. The output of the first 3D upsampling module (conv) is connected to the first input of the fourth concatenation module (concat); the inputs of the first 3D upsampling module (3D Upsampling), the second input of the second concatenation module (concat), and the second 3D voxel merging module (3D Patch Merging) are connected, and the connection point constitutes the second input of the fifth cross-resolution feature fusion module; the output of the first 3D upsampling module (3D Upsampling) is connected to the second input of the first concatenation module (concat); the output of the second 3D voxel merging module (3D Patch Merging) is connected to the inputs of the third 3D depth separable convolution module (3D Depth Separable conv) and the second input of the third concatenation module (concat); the output of the third 3D depth separable convolution module (3D Depth Separable conv) is connected to the second input of the fourth concatenation module (concat); the inputs of the second 3D upsampling module (3D Upsampling), the third input of the third concatenation module (concat), and the third 3D voxel merging module (3D Patch Merging) are connected. The three input terminals of the Merging module are connected together, and the connection point constitutes the third input terminal of the fifth cross-resolution feature fusion module.The output of the second 3D Upsampling module is connected to the input of the third 3D Upsampling module and the third input of the second concat module, respectively; the output of the third 3D Upsampling module is connected to the third input of the first concat module; the output of the third 3D Patch Merging module is connected to the third input of the fourth concat module; the input of the fourth 3D Upsampling module is connected to the fourth input of the fourth concat module, and the connection position constitutes the fourth input of the fifth cross-resolution feature fusion module; the output of the fourth 3D Upsampling module is connected to the input of the fifth 3D Upsampling module and the fourth input of the third concat module, respectively; the output of the fifth 3D Upsampling module is connected to the sixth 3D Upsampling module, respectively. The input of the first module (upsampling) and the fourth input of the second concat module are connected; the output of the sixth 3D upsampling module is connected to the fourth input of the first concat module; the outputs of the four concat modules constitute the four outputs of the fifth cross-resolution feature fusion module.
[0060] The first to fifth cross-resolution feature fusion modules involved in the above technical solution achieve efficient information exchange between feature layers of different resolutions through operations such as 3D PatchMerging, 3D Patch Expanding, and 3D depthwise separable convolution.
[0061] Each feature extraction module in the 3D feature extraction and fusion module has the same structure. Each feature extraction module includes a 3D voxel embedding module and a 3D Swing Transformer module. The 3D voxel embedding module is a feature embedding module designed specifically for 3D voxel block data. Its core function is to convert unstructured AMD OCT 3D voxel block data into a fixed-dimensional feature vector sequence. The 3D Swing Transformer module uses a 3D moving window attention mechanism instead of a 2D window, which can better capture long-distance dependencies in 3D space. In application, it can better capture the 3D spatial structural association of AMD lesions in OCT images. In the feature extraction module structure, the input end of the 3D voxel embedding module constitutes the input end of the feature extraction module, the output end of the 3D voxel embedding module is connected to the input end of the corresponding 3D Swing Transformer module, and the output end of the 3D Swing Transformer module constitutes the output end of the feature extraction module.
[0062] Regarding the classification head, the specific design from input to output includes a concatenated connection module (concat), a 3D voxel block expansion module (3D Patch Expanding), and a convolutional kernel. The 3D convolutional module has an input terminal of the concat module that forms the input terminal of the classification head, an output terminal of the 3D convolutional module that forms the output terminal of the classification head, and output terminals of the backbone network that are connected to the input terminals of the classification head. The output terminals of the classification head form the output terminals of the HRSw-Former network.
[0063] Step C. Based on each OCT 3D sample image, using the OCT 3D sample image as input and the preset target object region location in the OCT 3D sample image as output, train the HRSw-Former network to obtain the trained network, i.e., the OCT recognition model.
[0064] Regarding the training of the HRSw-Former network, in practical applications, an auxiliary network is further added. Specifically, the auxiliary network includes a downsampling module and three 3D convolutional modules. The output of the 3D voxel embedding module in one of the 2nd, 4th, and 5th sequential 3D feature extraction and fusion modules of the backbone network is connected to the input of the three 3D convolutional modules, respectively. During the training of the HRSw-Former network in step C, the comprehensive loss result is calculated according to steps C1 to C3 as follows. .
[0065] Step C1. First, obtain the target 3D feature image after the OCT 3D sample image received by the HRSw-Former network is processed by the downsampling module in the auxiliary network. Then, calculate the loss results loss_1, loss_2, and loss_3 of the target 3D feature image with respect to the preset target loss function, respectively, by comparing the output results of the three 3D convolutional modules. Finally, calculate the branch comprehensive loss result by weighting the weights of the three 3D convolutional modules in the preset auxiliary network. Then proceed to step C2.
[0066] Step C2. Calculate the loss result of the output of the backbone network compared with the target 3D feature image under the preset target loss function. Then proceed to step C3.
[0067] Step C3. According to Calculate the comprehensive loss result ,in, This represents the weighting coefficients for the pre-defined auxiliary network loss, such as in the design. .
[0068] The design scheme of this invention is specifically applied to the OCT three-dimensional image analysis of AMD patients. The characteristic of the AMD OCT image macular degeneration region segmentation task is extreme class imbalance. In three-dimensional space, most voxel blocks are background, with only a small portion being macular degeneration voxel blocks. Therefore, the preset target loss function calculation involved in steps C2 and C3 above uses a composite loss function. Dice loss is a commonly used region overlap metric in medical image segmentation, insensitive to class imbalance, and particularly suitable for handling cases where the macular degeneration region accounts for a small proportion in OCT images. However, Dice loss may not be stable enough when processing small targets or slender structures. Therefore, it needs to be combined with other loss functions such as weighted cross-entropy loss. Weighted cross-entropy loss is an improvement on standard cross-entropy loss, solving the class imbalance problem by introducing class weights. Therefore, in practical applications, it is specifically calculated according to the following formula:
[0069] ;
[0070] ;
[0071] ;
[0072] ;
[0073] Calculate the loss result of the target loss function. ,in, Represents the first 3D sample image in OCT. Individual pixel blocks originate from the output of the backbone network or the output of each 3D convolutional module in the auxiliary network. Represents the first 3D sample image in OCT. The true label of an individual element block This indicates that a preset constant, such as 1e-5, is used. This represents the Dice loss result. This indicates that the parameter is adjusted proportionally and adaptively. , These represent the number of voxel blocks belonging to the target object and the number of voxel blocks not belonging to the target object in the OCT 3D sample images during network training, respectively. This indicates a preset adjustment factor, such as 0.8. This represents the weighted cross-entropy loss result. and The weighting coefficients represent the pre-defined Dice loss result and the weighted cross-entropy loss result, such as the design... , .
[0074] The combination of Dice loss and weighted cross-entropy loss leverages the advantages of each loss function, including Dice loss focusing on overall region overlap and weighted cross-entropy loss addressing class imbalance issues.
[0075] The above design draws branches from multiple high-resolution feature layers of the backbone network. Through supervision by the auxiliary loss function, the network is forced to focus on the fine-grained structure in three-dimensional space. The auxiliary network does not participate in the computation during the inference stage and does not add any extra burden.
[0076] The above design scheme is applied to a specific embodiment. After obtaining the OCT recognition model, taking the segmentation of an OCT three-dimensional image (size 256x256x256) as an example, the processing is carried out in the following order.
[0077] 1. Data preparation: Export OCT 3D images from the OCT device, and after preprocessing such as denoising and standardization, adjust them to a uniform size for updating.
[0078] 2. Model loading: Deploy the trained OCT recognition model on the server (parameter file format is .pth or .onnx).
[0079] 3. Segmentation execution: The preprocessed image data is input into the OCT 3D image into the OCT recognition model. The OCT recognition model sequentially goes through feature extraction (backbone network, CRFF module, Swin Transformer block) and segmentation head processing, and the inference is completed in about 2.3 seconds.
[0080] 4. Post-processing and output of results: Connectivity analysis is performed on the output 3D segmentation mask to remove noise points. Subsequently, the system automatically calculates the lesion volume and performs 3D visualization rendering, finally generating a diagnostic report containing lesion location and volume information.
[0081] Applying the above design method in practice, such as analyzing OCT three-dimensional images of AMD patients, involves using various OCT three-dimensional sample images of AMD patients, and knowing the location of a pre-defined target object in each OCT three-dimensional sample image, according to... Figure 7 As shown, after preprocessing and updating, the HRSw-Former network constructed in step B is trained to obtain the trained network, i.e., the OCT recognition model. Then, for the actual OCT 3D images of AMD patients, preprocessing and updating are performed first, and then the OCT recognition model is applied to process the OCT 3D images of AMD patients to identify the location of the lesion area in the OCT 3D image and generate the corresponding OCT 3D image lesion area segmentation mask. In practical applications, the 3D segmentation mask can finally be visualized (e.g., 3D reconstruction) and quantitatively analyzed (e.g., lesion volume calculation), and a structured diagnostic report can be generated.
[0082] In practical applications, the above design scheme includes an image input module, a segmentation processing module, and a result output module. The image input module corresponds to data preprocessing in the method section, ensuring the quality of the input data. The segmentation processing module corresponds to feature extraction and fusion in the method section, achieving segmentation through model inference. The result output module corresponds to the segmentation result output in the method section, transforming the segmentation result into clinically usable diagnostic information. The system realizes an integrated workflow of "image input-segmentation-report output," with a short processing time per case (≤30 seconds), meeting the needs of efficient clinical diagnosis. Further integration of this design scheme into practical medical systems for AMD can construct systems such as... Figure 8 The AMD OCT image segmentation system is shown.
[0083] Practical application results are as follows Figure 9 , Figure 10As shown, the illustrations compare dry OCT image annotation, wet AMD OCT image annotation, and 3D annotation visualization; application demonstrates the following advantages:
[0084] 1. High segmentation accuracy: The 3D Dice coefficient reaches 0.852 on the self-built dataset, which is better than mainstream algorithms such as U-Net (0.745) and TransUNet (0.794).
[0085] 2. Strong ability to preserve details: High-resolution feature preservation and auxiliary network design throughout the process effectively avoid the loss of details of minute lesions.
[0086] 3. Excellent 3D context modeling: The 3D Swin Transformer module fully explores the spatial structural information of the lesion.
[0087] 4. Strong clinical applicability: The system achieves end-to-end automated processing, with a single case processing time of ≤30 seconds, and supports multi-role user permission management.
[0088] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A target recognition method based on HRSw-Former optical coherence tomography images, characterized in that: Perform steps A to C to obtain an OCT recognition model, which is used to identify the location of a preset target object in an OCT 3D image; Step A. Obtain a preset number of OCT 3D sample images, and know the location of the preset target object in each OCT 3D sample image, then proceed to Step B; Step B. Construct the HRSw-Former network by sequentially connecting the backbone network for 3D image analysis and the classification head from the input end to the output end, and then proceed to step C; Step C. Based on each OCT 3D sample image, using the OCT 3D sample image as input and the preset target object region location in the OCT 3D sample image as output, train the HRSw-Former network to obtain the trained network, i.e., the OCT recognition model.
2. The target recognition method based on HRSw-Former optical coherence tomography image according to claim 1, characterized in that: In the HRSw-Former network constructed in step B, the input end of the backbone network constitutes the input end of the HRSw-Former network. The backbone network includes five three-dimensional feature extraction and fusion modules connected in series from the input end to the output end. The first three-dimensional feature extraction and fusion module includes a first cross-resolution feature fusion module and a feature extraction module. The first cross-resolution feature fusion module includes one input end and two output ends. The input end of the feature extraction module constitutes one input end of the first three-dimensional feature extraction and fusion module, which is the input end of the backbone network. The output end of the feature extraction module is connected to the input end of the first cross-resolution feature fusion module. The two output ends of the first cross-resolution feature fusion module constitute the two output ends of the first three-dimensional feature extraction and fusion module. The second sequential 3D feature extraction and fusion module includes a second cross-resolution feature fusion module and two feature extraction modules. The second cross-resolution feature fusion module includes two input terminals and three output terminals. The input terminals of the two feature extraction modules constitute the two input terminals of the second sequential 3D feature extraction and fusion module, which are used to connect to the two output terminals of the first sequential 3D feature extraction and fusion module. The output terminals of the two feature extraction modules are respectively connected to each input terminal of the second cross-resolution feature fusion module. The three output terminals of the second cross-resolution feature fusion module constitute the three output terminals of the second sequential 3D feature extraction and fusion module. The third sequential 3D feature extraction and fusion module includes a third cross-resolution feature fusion module and three feature extraction modules. The third cross-resolution feature fusion module includes three input terminals and three output terminals. The input terminals of the three feature extraction modules constitute the three input terminals of the third sequential 3D feature extraction and fusion module, which are used to connect to the three output terminals of the second sequential 3D feature extraction and fusion module. The output terminals of the three feature extraction modules are respectively connected to each input terminal of the third cross-resolution feature fusion module. The three output terminals of the third cross-resolution feature fusion module constitute the three output terminals of the third sequential 3D feature extraction and fusion module. The fourth sequential 3D feature extraction and fusion module includes a fourth cross-resolution feature fusion module and three feature extraction modules. The fourth cross-resolution feature fusion module includes three input terminals and four output terminals. The input terminals of the three feature extraction modules constitute the three input terminals of the fourth sequential 3D feature extraction and fusion module, which are used to connect to the three output terminals of the third sequential 3D feature extraction and fusion module. The output terminals of the three feature extraction modules are respectively connected to each input terminal of the fourth cross-resolution feature fusion module. The four output terminals of the fourth cross-resolution feature fusion module constitute the four output terminals of the fourth sequential 3D feature extraction and fusion module. The fifth sequential 3D feature extraction and fusion module includes a fifth cross-resolution feature fusion module and four feature extraction modules. The fifth cross-resolution feature fusion module includes four input terminals and four output terminals. The input terminals of the four feature extraction modules constitute the four input terminals of the fifth sequential 3D feature extraction and fusion module, which are used to connect to the four output terminals of the fourth sequential 3D feature extraction and fusion module. The output terminals of the four feature extraction modules are respectively connected to each input terminal of the fifth cross-resolution feature fusion module. The four output terminals of the fifth cross-resolution feature fusion module constitute the four output terminals of the fifth sequential 3D feature extraction and fusion module, which are the output terminals of the backbone network. Each feature extraction module in the 3D feature extraction and fusion module has the same structure. Each feature extraction module includes a 3D voxel block embedding module and a 3D Swing Transformer module. In the feature extraction module structure, the input end of the 3D voxel block embedding module constitutes the input end of the feature extraction module, the output end of the 3D voxel block embedding module is connected to the input end of the corresponding 3D Swing Transformer module, and the output end of the 3D Swing Transformer module constitutes the output end of the feature extraction module. Each output of the backbone network is connected to the input of the classification head, and the output of the classification head constitutes the output of the HRSw-Former network.
3. The target recognition method based on HRSw-Former optical coherence tomography images according to claim 2, characterized in that: The first cross-resolution feature fusion module includes a three-dimensional voxel block merging module and a straight wire. One end of the straight wire is connected to the input end of the three-dimensional voxel block merging module, and the connection position constitutes the input end of the first cross-resolution feature fusion module. The other end of the straight wire is connected to the output end of the three-dimensional voxel block merging module, which constitutes the two output ends of the first cross-resolution feature fusion module. The second cross-resolution feature fusion module includes a 3D voxel block expansion module, a 3D depthwise separable convolution module, two 3D voxel block merging modules, and three connection modules. The input of one of the 3D voxel block merging modules is connected to one of the inputs of the first connection module, and this connection constitutes one input of the second cross-resolution feature fusion module. The output of one of the 3D voxel block merging modules is connected to the inputs of the 3D depthwise separable convolution module and one of the inputs of the second connection module, respectively. The output of the 3D depthwise separable convolution module is connected to one of the inputs of the third connection module. The other input of the second connection module, the input of the 3D voxel block expansion module, and the input of the other 3D voxel block merging module are connected, and this connection constitutes another input of the second cross-resolution feature fusion module. The output of the 3D voxel block expansion module is connected to the other input of the first connection module. The output of the other 3D voxel block merging module is connected to the other input of the third connection module. The outputs of the three connection modules constitute the three outputs of the second cross-resolution feature fusion module. The third cross-resolution feature fusion module includes a 3D voxel block expansion module, a 3D depthwise separable convolution module, two 3D voxel block merging modules, two 3D upsampling modules, and three connection modules. The input of one of the 3D voxel block merging modules is connected to the first input of the first connection module, and this connection constitutes the first input of the third cross-resolution feature fusion module. The output of one of the 3D voxel block merging modules is connected to the input of the 3D depthwise separable convolution module and the first input of the second connection module, respectively. The output of the 3D depthwise separable convolution module is connected to the first input of the third connection module. The inputs of the 3D voxel block expansion module, the second input of the second connection module, and the input of the other 3D voxel block merging module are connected together. The three-dimensional voxel block expansion module is connected to the second input of the first connection module, and the output of the three-dimensional voxel block merging module is connected to the second input of the third connection module. The output of the other three-dimensional voxel block merging module is connected to the second input of the third connection module. The input of one of the three-dimensional upsampling modules is connected to the third input of the third connection module, and the connection position constitutes the third input of the third cross-resolution feature fusion module. The output of one of the three-dimensional upsampling modules is connected to the input of another three-dimensional upsampling module and the third input of the second connection module. The output of the other three-dimensional upsampling module is connected to the third input of the first connection module. The outputs of the three connection modules constitute the three outputs of the third cross-resolution feature fusion module. The fourth cross-resolution feature fusion module includes three 3D voxel block merging modules, three 3D upsampling modules, three 3D depthwise separable convolutional modules, and four connection modules. The input of the first 3D voxel block merging module is connected to the first input of the first connection module, and this connection constitutes the first input of the fourth cross-resolution feature fusion module. The output of the first 3D voxel block merging module is connected to the input of the first 3D depthwise separable convolutional module and the first input of the second connection module. The output of the first 3D depthwise separable convolutional module is connected to the input of the second 3D depthwise separable convolutional module and the first input of the third connection module. The output of the second 3D depthwise separable convolutional module is connected to the first input of the fourth connection module. The inputs of the first 3D upsampling module, the second connection module, and the second 3D voxel block merging module are connected, and this connection constitutes the second input of the fourth cross-resolution feature fusion module. The input terminals are as follows: the output terminal of the first 3D upsampling module is connected to the second input terminal of the first connection module; the output terminal of the second 3D voxel block merging module is connected to the input terminals of the third 3D depthwise separable convolution module and the second input terminal of the third connection module; the output terminal of the third 3D depthwise separable convolution module is connected to the second input terminal of the fourth connection module; the input terminals of the second 3D upsampling module, the third connection module, and the third 3D voxel block merging module are connected together, and the connection position constitutes the third input terminal of the fourth cross-resolution feature fusion module; the output terminal of the second 3D upsampling module is connected to the input terminals of the third 3D upsampling module and the third input terminal of the second connection module; the output terminal of the third 3D upsampling module is connected to the third input terminal of the first connection module; the output terminal of the third 3D voxel block merging module is connected to the third input terminal of the fourth connection module; the output terminals of the four connection modules constitute the four output terminals of the fourth cross-resolution feature fusion module. The fifth cross-resolution feature fusion module includes three 3D voxel block merging modules, three 3D depthwise separable convolutional modules, four connection modules, and six 3D upsampling modules. The input of the first 3D voxel block merging module is connected to the first input of the first connection module, and this connection constitutes the first input of the fifth cross-resolution feature fusion module. The output of the first 3D voxel block merging module is connected to the input of the first 3D depthwise separable convolutional module and the first input of the second connection module. The output of the first 3D depthwise separable convolutional module is connected to the input of the second 3D depthwise separable convolutional module, the first input of the third connection module, and the first input of the fourth connection module. The first input of the three connection modules; the output of the second 3D depthwise separable convolution module is connected to the first input of the fourth connection module; the inputs of the first 3D upsampling module, the second input of the second connection module, and the second 3D voxel block merging module are connected, and the connection position constitutes the second input of the fifth cross-resolution feature fusion module; the output of the first 3D upsampling module is connected to the second input of the first connection module; the output of the second 3D voxel block merging module is connected to the inputs of the third 3D depthwise separable convolution module and the second input of the third connection module, respectively; the third 3D depthwise separable convolution module... The output of the degree-separable convolution module is connected to the second input of the fourth connection module; the inputs of the second 3D upsampling module, the third input of the third connection module, and the third 3D voxel block merging module are connected, and their connection points form the third input of the fifth cross-resolution feature fusion module; the output of the second 3D upsampling module is connected to the inputs of the third 3D upsampling module and the third input of the second connection module; the output of the third 3D upsampling module is connected to the third input of the first connection module; the output of the third 3D voxel block merging module is connected to the third input of the fourth connection module. The input of the fourth 3D upsampling module is connected to the fourth input of the fourth connection module, and the connection position constitutes the fourth input of the fifth cross-resolution feature fusion module; the output of the fourth 3D upsampling module is connected to the input of the fifth 3D upsampling module and the fourth input of the third connection module, respectively; the output of the fifth 3D upsampling module is connected to the input of the sixth 3D upsampling module and the fourth input of the second connection module, respectively; the output of the sixth 3D upsampling module is connected to the fourth input of the first connection module; the outputs of the four connection modules constitute the four outputs of the fifth cross-resolution feature fusion module.
4. The target recognition method based on HRSw-Former optical coherence tomography image according to claim 1, characterized in that: The classification head, from input to output, includes a connection module, a three-dimensional voxel block expansion module, and a convolution kernel connected in series. The 3D convolution module has an input terminal that forms the input terminal of the classification head, and an output terminal that forms the output terminal of the classification head.
5. The target recognition method based on HRSw-Former optical coherence tomography image according to claim 2, characterized in that: Step B further includes constructing an auxiliary network, which comprises three 3D convolutional modules. The output of the 3D voxel block embedding module in one of the 2nd, 4th, and 5th sequential 3D feature extraction and fusion modules of the backbone network is respectively connected to the input of the three 3D convolutional modules. In step C, during the training of the HRSw-Former network, the comprehensive loss result is calculated according to steps C1 to C3 as follows. ; Step C1. Calculate the output results of the three 3D convolutional modules and compare them with the corresponding OCT 3D sample images received by the HRSw-Former network under the preset target loss function, specifically loss_1, loss_2, and loss_3. Then, based on the weight combination of the three 3D convolutional modules in the preset auxiliary network, calculate the weighted sum to obtain the branch comprehensive loss result. Then proceed to step C2; Step C2. Calculate the loss result of the output of the backbone network compared with the corresponding OCT 3D sample image received by the HRSw-Former network under the preset target loss function. Then proceed to step C3; Step C3. According to Calculate the comprehensive loss result ,in, This represents the weighting coefficient for the preset auxiliary network loss.
6. The target recognition method based on HRSw-Former optical coherence tomography image according to claim 5, characterized in that: The auxiliary network also includes a downsampling module. In step C1, the target three-dimensional feature image after the OCT three-dimensional sample image received by the HRSw-Former network is processed by the downsampling module in the auxiliary network is first obtained. Then, the output results of the three 3D convolution modules are calculated and compared with the target three-dimensional feature image with respect to the preset target loss function, namely loss_1, loss_2, and loss_3. In step C2, the loss result of the output of the backbone network compared with the target 3D feature image under the preset target loss function is calculated. .
7. A target recognition method based on HRSw-Former optical coherence tomography images according to claim 5 or 6, characterized in that: The preset target loss function is as follows: ; ; ; ; The loss result of the target loss function is obtained by calculating using the above formula. ,in, Represents the first 3D sample image in OCT. Individual pixel blocks originate from the output of the backbone network or the output of each 3D convolutional module in the auxiliary network. Represents the first 3D sample image in OCT. The true label of an individual element block This represents a preset constant. This represents the Dice loss result. This indicates that the parameter is adjusted adaptively according to the ratio. , These represent the number of voxel blocks belonging to the target object and the number of voxel blocks not belonging to the target object in the OCT 3D sample images during network training, respectively. This indicates the preset adjustment factor. This represents the weighted cross-entropy loss result. and This represents the weight coefficients of the preset Dice loss result and the weighted cross-entropy loss result.
8. The target recognition method based on HRSw-Former optical coherence tomography image according to claim 1, characterized in that: Step A also includes preprocessing updates for each OCT 3D sample image, including denoising, contrast enhancement, standardization, and size adjustment.