Task classification method and system based on cardiomyopathy image, terminal and storage medium

By constructing pre-trained weights and pre-processing cardiomyopathy mapping images, and combining dense convolutional networks and attention mechanisms, the problem of insufficient accuracy in cardiac MRI image classification in existing technologies is solved, achieving efficient feature extraction and accurate classification of cardiomyopathy images.

CN121482483APending Publication Date: 2026-02-06LANZHOU UNIV SECOND HOSPITAL
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511731690.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing deep learning models struggle to capture local features in cardiac MRI images when classifying them, resulting in insufficient classification accuracy.

Method used

A task classification method based on cardiomyopathy images is adopted. By constructing pre-trained weights and pre-processing cardiomyopathy mapping images, feature enhancement and feature reuse are performed using dense convolutional networks and attention mechanisms. Feature integration is combined with channel weights to achieve accurate classification of cardiomyopathy images.

Benefits of technology

It improves the accuracy of cardiomyopathy image classification and the objectivity of feature extraction, avoids the limitations of qualitative images, enhances the ability to capture myocardial lesion areas, and significantly improves the robustness and diagnostic range of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121482483A_ABST
    Figure CN121482483A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image classification, and discloses a task classification method and system based on a cardiomyopathy image, a terminal and a storage medium, and the method comprises the steps: carrying out the preprocessing of a cardiomyopathy mapping image, obtaining an input image set, and dividing the input image set into a training set and a test set, optimizing the dense convolutional network by using the pre-training weight and the training set to obtain a target dense convolutional network; the target dense convolutional network performs feature enhancement and feature multiplexing on the test set, and constructs a plurality of channel weights by using an attention mechanism; and through channel weights, multiplying the test set channel by channel to obtain a plurality of weighted feature maps, and integrating to obtain a classification result. According to the method, feature multiplexing is enhanced through dense block connection of the dense convolutional network, the attention mechanism is combined to focus on the target area, the objectivity and effectiveness of feature extraction are improved, and the limitation of qualitative images is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image classification technology, and in particular to a task classification method, system, terminal, and storage medium based on cardiomyopathy images. Background Technology

[0002] Left ventricular hypertrophy (LVH) is a common feature of myocardial types such as hypertrophic cardiomyopathy (HCM), hypertensive heart disease (HHD), and cardiac amyloidosis (CA).

[0003] However, existing deep learning models struggle to capture local features in cardiac MRI (Magnetic Resonance Imaging) images when classifying them, resulting in insufficient classification accuracy.

[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0005] The main objective of this invention is to provide a task classification method, system, terminal, and storage medium based on cardiomyopathy images, aiming to solve the problem in the prior art that it is difficult to capture local features when analyzing mapped images of cardiomyopathy, resulting in low accuracy of image classification.

[0006] To achieve the above objectives, the present invention provides a task classification method based on cardiomyopathy images, the task classification method based on cardiomyopathy images comprising the following steps: Multiple cardiomyopathy mapping images are acquired. Based on all the cardiomyopathy mapping images, pre-trained weights are constructed, and all the cardiomyopathy mapping images are pre-processed to obtain an input image set. The input image set is divided into a training set and a test set. The pre-trained weights and the training set are input into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network. The test set is input into the target dense convolutional network for continuous feature enhancement and feature reuse, and multiple channel weights are constructed using an attention mechanism; Based on all the channel weights, the test set is multiplied channel by channel to obtain multiple weighted feature maps. All the weighted feature maps are then integrated through the fully connected layer of the target dense convolutional network to obtain the classification result.

[0007] Optionally, the task classification method based on cardiomyopathy images, wherein acquiring multiple cardiomyopathy mapping images and constructing pre-trained weights based on all the cardiomyopathy mapping images specifically includes: Multiple cardiomyopathy images were acquired, and all of the cardiomyopathy images were quantitatively analyzed using magnetic resonance imaging (MRI) to obtain corresponding cardiomyopathy mapping images. The image set weights input by the user are obtained, and the image set weights are fine-tuned based on all the cardiomyopathy mapping images to obtain pre-trained weights.

[0008] Optionally, the task classification method based on cardiomyopathy images, wherein the preprocessing of all the cardiomyopathy mapping images to obtain the input image set specifically includes: Mask extraction is performed on each of the cardiomyopathy mapping images to obtain a first mask and a second mask corresponding to each cardiomyopathy mapping image, and a binary mask corresponding to each cardiomyopathy mapping image is constructed based on each pair of the first mask and the second mask; Based on each binary mask, focus is applied to each cardiomyopathy mapping image to obtain the corresponding focused region, and each focused region is normalized to obtain the corresponding normalized image. Calculate the mean and standard deviation of the RGB values ​​of all the normalized images, and standardize the mean and standard deviation according to a preset standard to obtain the input image set.

[0009] Optionally, the task classification method based on cardiomyopathy images, wherein dividing the input image set into a training set and a test set, and inputting the pre-trained weights and the training set into a pre-constructed initial dense convolutional network for model optimization to obtain a target dense convolutional network, specifically includes: The input image set is divided into a training set, a validation set, and a test set according to a preset ratio; Construct an initial dense convolutional network, input the pre-trained weights and the training set into the initial dense convolutional network, the initial dense convolutional network predicts the training set according to the pre-trained weights, and outputs training prediction labels; Based on the predicted labels from the training set and the true labels from the training set, a cross-entropy loss function is constructed, and the initial dense convolutional network is optimized using the cross-entropy loss function. The validation set is input into the optimized initial dense convolutional network, which outputs validation prediction labels. The validation prediction labels are then detected using the five-fold cross-validation method. If the detection result is satisfactory, the optimized initial dense convolutional network is defined as the target dense convolutional network.

[0010] Optionally, the task classification method based on cardiomyopathy images, wherein inputting the test set into the target dense convolutional network for continuous feature enhancement and feature reuse, and constructing multiple channel weights using an attention mechanism, specifically includes: The test set is input into the target dense convolutional network, and the test set passes through multiple dense blocks of the target dense convolutional network to obtain enhanced features; The enhanced features are iteratively input into the low-level feature extraction layer and the high-level feature extraction layer of the target dense convolutional network until low-level features and high-level features are obtained. The low-level features and the high-level features are then integrated to output a feature map containing the low-level features and the high-level features. The feature map is input into the channel attention module, which performs a global averaging operation on each channel of the feature map to obtain a channel descriptor. The channel descriptor is then input into a preset model, which outputs the channel weights for each channel.

[0011] Optionally, the task classification method based on cardiomyopathy images, wherein the step of inputting the feature map into a channel attention module, the channel attention module performing a global averaging operation on each channel of the feature map to obtain a channel descriptor, and inputting the channel descriptor into a preset model to output the channel weight of each channel, specifically includes: The feature map is input into the channel attention module, which compresses each channel of the feature map into a corresponding scalar value and constructs a channel descriptor based on all the scalar values. The channel descriptor is used to describe the global feature contribution value of each channel. The channel descriptor is input into a preset model, wherein the preset model includes two fully connected layers; The channel descriptor is reduced in dimensionality using the first fully connected layer of the preset model, and a non-linear activation function is introduced into the first fully connected layer to obtain a low-dimensional channel. The second fully connected layer of the preset model is used to perform dimensionality restoration processing on the low-dimensional channels, and a smoothing nonlinear function is introduced into the second fully connected layer to output the channel weights of each channel of the feature map.

[0012] Optionally, the task classification method based on cardiomyopathy images, wherein the step of multiplying the test set channel-by-channel according to all the channel weights to obtain multiple weighted feature maps, and integrating all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result, specifically includes: All the channel weights and the test set are input into the target dense convolutional network. The target dense convolutional network uses all the channel weights to perform weighted fusion of the feature values ​​of all channels of the test set to obtain the corresponding weighted feature map. All the weighted feature maps are input into the fully connected layer of the target dense convolutional network for feature integration, resulting in a fixed-dimensional fusion vector; Based on the fusion vector, target features are extracted from each target image in the test set, and all target features are normalized using a classification activation function to output the classification result for each target image.

[0013] Furthermore, to achieve the above objectives, the present invention also provides a task classification system based on cardiomyopathy images, wherein the task classification system based on cardiomyopathy images includes: An image preprocessing module is used to acquire multiple cardiomyopathy mapping images, construct pre-trained weights based on all the cardiomyopathy mapping images, and preprocess all the cardiomyopathy mapping images to obtain an input image set; The model training module is used to divide the input image set into a training set and a test set, and input the pre-trained weights and the training set into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network. The attention fusion module is used to input the test set into the target dense convolutional network for continuous feature enhancement and feature reuse, and to construct multiple channel weights using the attention mechanism; The result classification module is used to multiply the test set channel by channel according to all the channel weights to obtain multiple weighted feature maps, and integrate all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result.

[0014] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a task classification program based on cardiomyopathy images stored in the memory and executable on the processor, wherein when the task classification program based on cardiomyopathy images is executed by the processor, it implements the steps of the task classification method based on cardiomyopathy images as described above.

[0015] In addition, to achieve the above objectives, the present invention also provides a storage medium, wherein the storage medium stores a task classification program based on cardiomyopathy images, and when the task classification program based on cardiomyopathy images is executed by a processor, it implements the steps of the task classification method based on cardiomyopathy images as described above.

[0016] In this invention, multiple cardiomyopathy mapping images are acquired. Pre-trained weights are constructed based on all the cardiomyopathy mapping images, and these images are preprocessed to obtain an input image set. The input image set is divided into a training set and a test set. The pre-trained weights and the training set are input into a pre-constructed initial dense convolutional network for model optimization, resulting in a target dense convolutional network. The test set is input into the target dense convolutional network for continuous feature enhancement and feature reuse, and multiple channel weights are constructed using an attention mechanism. Based on all the channel weights, the test set is multiplied channel by channel to obtain multiple weighted feature maps. All weighted feature maps are then integrated through the fully connected layers of the target dense convolutional network to obtain a classification result. This invention enhances feature reuse through dense block connections in a dense convolutional network and focuses on the target region using an attention mechanism, improving the objectivity and effectiveness of feature extraction and avoiding the limitations of qualitative images. Attached Figure Description

[0017] Figure 1 This is a flowchart of a preferred embodiment of the task classification method based on cardiomyopathy images of the present invention; Figure 2 This is an overall flowchart of a preferred embodiment of the task classification method based on cardiomyopathy images of the present invention; Figure 3 This is a flowchart of the internal model of a preferred embodiment of the task classification method based on cardiomyopathy images of the present invention; Figure 4 This is a structural diagram of a preferred embodiment of the task classification system based on cardiomyopathy images of the present invention; Figure 5 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] Traditional image analysis relies on human interpretation, which is easily affected by subjectivity and makes it difficult to achieve efficient and accurate differential diagnosis. However, existing deep learning models have difficulty capturing local features in cardiac MRI images when classifying them, resulting in insufficient classification accuracy.

[0020] Therefore, this invention proposes a dense convolutional network model that incorporates an attention mechanism (defined as DenseNetSE in the embodiments of this invention) for a four-class classification task of cardiac MRI T1 (T1 stands for Longitudinal Relaxation Time) mapped images.

[0021] The preferred embodiment of the task classification method based on cardiomyopathy images described in this invention, such as... Figure 1 As shown, the task classification method based on cardiomyopathy images includes the following steps: Step S10: Obtain multiple cardiomyopathy mapping images, construct pre-trained weights based on all the cardiomyopathy mapping images, and preprocess all the cardiomyopathy mapping images to obtain an input image set.

[0022] First, for T1-mapped images of cardiomyopathy (including the base, middle, and top layers of the image), a binary mask of the myocardial ring is generated through its segmentation mask, thereby focusing on the target region, reducing the computational resources of subsequent models, and improving the efficiency of image processing.

[0023] Furthermore, existing technologies largely rely on qualitative images, which are susceptible to subjective interpretation differences or artifact interference. This invention uses quantitative T1-mapped images as input and employs a customized preprocessing process, including myocardial ring segmentation, normalization (0-1 range), and ImageNet (a large-scale visual database used for image recognition research in computer vision), to directly capture quantitative pathological features of myocardial tissue (such as the degree of fibrosis and the level of amyloid deposition). By adapting the hierarchical distribution of these features through dense blocks and transition layers, the objectivity and effectiveness of feature extraction are improved, avoiding the limitations of qualitative images.

[0024] Specifically, multiple cardiomyopathy images are acquired, and all the cardiomyopathy images are quantitatively analyzed using magnetic resonance imaging (MRI) to obtain corresponding cardiomyopathy mapping images; image set weights input by the user are acquired, and the image set weights are fine-tuned based on all the cardiomyopathy mapping images to obtain pre-trained weights.

[0025] Among them, such as Figure 2As shown, a key step in image preprocessing is the standardization of the ImageNet image set (a large-scale visual database used for image recognition research in the field of computer vision). This standardization ensures that the T1-mapped images (including cardiomyopathy-mapped images in the embodiments disclosed in this invention) are compatible with the input requirements of the DenseNet model, while improving the stability and generalization ability of the model training. The focused regions of the already focused T1-mapped images are normalized, and the mean and standard deviation of the RGB pixels (the red, green, and blue channel values ​​of each pixel) from the ImageNet image set are used to standardize the focused regions.

[0026] Furthermore, since the T1-mapped image is single-channel, in the embodiments disclosed in this invention, its RGB pixel mean is set to 0.5 and its standard deviation to 0.226 (approximately the RGB pixel mean of the ImageNet image set) to adapt to the pre-trained weights of the image set. Moreover, the standardized image maintains a size of 224×224, is single-channel, and its value range is transformed from [0, 1] to a distribution centered at 0 with a standard deviation of 1, adapting to the input requirements of the DenseNet model, significantly reducing the cost of subsequent model training and improving training speed.

[0027] Further, a mask is extracted for each cardiomyopathy mapping image to obtain a first mask and a second mask corresponding to each cardiomyopathy mapping image, and a binary mask corresponding to each cardiomyopathy mapping image is constructed based on each pair of the first mask and the second mask; based on each binary mask, each cardiomyopathy mapping image is focused to obtain a corresponding focused region, and each focused region is normalized to obtain a corresponding normalized image; the mean and standard deviation of the RGB values ​​of all normalized images are calculated, and the mean and standard deviation are standardized according to a preset standard to obtain an input image set; wherein, the preset standard is: the mean and standard deviation are respectively adapted to the pre-trained weights.

[0028] In the segmentation masking of cardiomyopathy mapping images, the base, middle, and top layers of the image can be labeled based on an empirical database. The focus is on extracting the left ventricular myocardial ring (defined as the first mask) and the ventricular cavity (defined as the second mask), generating a binary mask in NIFTI (Neuroimaging Informatics Technology Initiative) format (0 representing background, 1 representing the target region). This provides a standardized storage scheme for image data and enables cross-platform data interoperability. Furthermore, to ensure the capture of features such as asymmetric hypertrophy of HCM, concentric hypertrophy of HHD, and amyloid deposition of CA in the cardiomyopathy mapping images, the segmentation mask is re-tested based on clinical diagnostic criteria for myocardial ring segmentation to ensure alignment with the standards.

[0029] Step S20: Divide the input image set into a training set and a test set, and input the pre-trained weights and the training set into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network.

[0030] To ensure that data for the same object does not cross sets and prevent data leakage, the image set is divided into multiple groups for different purposes. In the embodiments disclosed in this invention, one image set is divided into a 70% training set, a 15% validation set, and a 15% test set. This grouping balances the needs of model learning, tuning, and evaluation. The 70% training set provides sufficient samples to support the model in fully learning the pathological features of T1-mapped images and reducing the risk of overfitting; the 15% validation set is used to monitor the training process and hyperparameter tuning to ensure optimal model convergence; and the 15% test set independently evaluates performance, avoids data leakage, and verifies generalization ability. This division is efficient and reliable in small-sample medical imaging tasks, and its robustness is further improved by combining it with five-fold cross-validation. Five-fold cross-validation evaluates model stability, and the training process includes data input, feature extraction, hyperparameter tuning, and performance evaluation.

[0031] Specifically, the input image set is divided into a training set, a validation set, and a test set according to a preset ratio; an initial dense convolutional network is constructed, and the pre-trained weights and the training set are input into the initial dense convolutional network. The initial dense convolutional network predicts the training set based on the pre-trained weights and outputs training prediction labels; a cross-entropy loss function is constructed based on the training prediction labels and the true labels of the training set, and the initial dense convolutional network is optimized using the cross-entropy loss function; the validation set is input into the optimized initial dense convolutional network, and validation prediction labels are output. The validation prediction labels are detected using the five-fold cross-validation method. If the detection result is qualified, the optimized initial dense convolutional network is defined as the target dense convolutional network.

[0032] In training the DenseNetSE model, a cross-entropy loss function and the Adam optimizer (an adaptive optimization algorithm) are used, and the model is fine-tuned based on pre-trained weights from the ImageNet image set to achieve four-class classification of T1-mapped images. During training, the model starts with pre-processed T1-mapped images, which are normalized, standardized, and automatically segmented by the image network to generate inputs focusing on the myocardial region. The DenseNetSE model is initialized using pre-trained weights, which are then fine-tuned to adapt to the characteristics of the T1-mapped images, such as myocardial texture and pathological patterns. The cross-entropy loss function is used to measure the difference between the model's predicted probabilities for the four classes and the true labels, guiding model optimization to improve classification accuracy.

[0033] Furthermore, in the embodiments disclosed in this invention, the Adam optimizer accelerates the convergence of gradient descent by adaptively adjusting the learning rate, effectively avoiding overfitting, especially on small sample datasets. Training is performed in the PyTorch framework (an open-source deep learning framework), with an initial learning rate set to... The batch size is 16, the training is conducted for 50 epochs, and the robustness of the model is ensured by five-fold cross-validation.

[0034] Step S30: Input the test set into the target dense convolutional network for continuous feature enhancement and feature reuse, and use the attention mechanism to construct multiple channel weights.

[0035] Among them, such as Figure 3 As shown, the dense convolutional network disclosed in this invention includes four dense blocks and a transition layer, achieving feature enhancement and reuse through dense connections. Unlike traditional convolutional neural networks, in the DenseNetSE model disclosed in this invention, each layer not only receives the output of the previous layer but also receives all feature maps from previous layers as input, achieved through direct connections. This design enables the network to efficiently reuse features from earlier layers, enhancing the model's ability to capture complex features (such as myocardial lesion regions in T1-mapped images).

[0036] Specifically, the test set is input into the target dense convolutional network, and the test set passes through multiple dense blocks of the target dense convolutional network to obtain enhanced features. The enhanced features are iteratively input into the low-level feature extraction layer and the high-level feature extraction layer of the target dense convolutional network until low-level features and high-level features are obtained. The low-level features and the high-level features are then integrated to output a feature map containing the low-level features and the high-level features. The feature map is input into a channel attention module, which performs a global averaging operation on each channel of the feature map to obtain a channel descriptor. The channel descriptor is then input into a preset model to output the channel weights of each channel.

[0037] In the embodiments disclosed in this invention, during inference using a target dense convolutional network, abstract features from the test set are repeatedly extracted using both low-level and high-level feature extraction layers to avoid information loss. This feature reuse process helps the DenseNetSE model better capture subtle pathological features related to the four-class classification in T1-mapped images, such as asymmetric thickening or amyloid deposition, significantly improving the model's robustness.

[0038] Further, the feature map is input into a channel attention module, which compresses each channel of the feature map into a corresponding scalar value and constructs a channel descriptor based on all the scalar values. The channel descriptor is used to describe the global feature contribution value of each channel. The channel descriptor is input into a preset model, which includes two fully connected layers. The first fully connected layer of the preset model is used to perform dimensionality reduction processing on the channel descriptor, and a nonlinear activation function is introduced into the first fully connected layer to obtain low-dimensional channels. The second fully connected layer of the preset model is used to perform dimensionality restoration processing on the low-dimensional channels, and a smoothing nonlinear function is introduced into the second fully connected layer to output the channel weight of each channel of the feature map.

[0039] While existing models can reuse features through dense connections, they lack targeted extraction of disease-specific features. Traditional attention models, though incorporating attention mechanisms, are prone to overfitting on small-sample medical data due to a lack of efficient cross-layer feature reuse capabilities. Therefore, in the embodiments disclosed in this invention, the dense connection mechanism (4 dense blocks, containing 6, 12, 24, and 16 layers respectively, with a growth rate of 12) of DenseNet-121 (the target dense convolutional network in this invention) is fused with the channel attention mechanism of SEBlock (the channel attention module in this invention): dense connections directly transmit features across layers, maximizing the utilization of limited medical image features and reducing information loss, making it suitable for scenarios with limited sample sizes; SEBlock dynamically adjusts channel weights through global pooling and fully connected layers, enhancing attention to key features of myocardial lesions (such as abnormal T1 value regions, fibrosis, or protein deposition sites), thus addressing the deficiency of existing models that "have strong generalization in feature extraction but lack specificity."

[0040] Channel weights are generated through global average pooling to dynamically focus on pathological regions. The generation process begins with feature maps output from dense blocks of DenseNet-121. These feature maps contain multiple channels, each capturing different features of the image. First, global average pooling is used to compress the spatial dimension of the feature map for each channel, averaging the pixel values ​​of the entire spatial region (224×224 pixels) into a scalar value to generate a channel descriptor that summarizes the global information of each channel, such as whether a channel strongly represents a hypertrophic region of HCM or concentric hypertrophic features of HHD. Next, the channel descriptor is input into a model consisting of two fully connected layers (i.e., the preset model described in this invention). The first fully connected layer reduces the number of channels through dimensionality reduction, lowering computational complexity while retaining key information, and introduces nonlinearity through the ReLU activation function (the nonlinear activation function described in this invention). The second fully connected layer restores the number of channels and generates weights for each channel through the Sigmoid activation function (i.e., the smoothing nonlinear function described in this invention). The weight values ​​range from 0 to 1, representing the relative importance of the channel to the classification task. For example, channels associated with CA amyloid deposition may receive higher weights, while background noise channels may have weights close to zero.

[0041] Step S40: Multiply the test set channel by channel according to all the channel weights to obtain multiple weighted feature maps, and integrate all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result.

[0042] Specifically, all channel weights and the test set are input into the target dense convolutional network. The target dense convolutional network uses all channel weights to perform weighted fusion of the feature values ​​of all channels in the test set to obtain a corresponding weighted feature map. All weighted feature maps are input into the fully connected layer of the target dense convolutional network for feature integration to obtain a fixed-dimensional fusion vector. Based on the fusion vector, target features are extracted from each target image in the test set, and all target features are normalized using a classification activation function to output the classification result of each target image.

[0043] After generating channel weights for each channel, all channel weights are directly applied to the test set. A new weighted feature map is generated by weighting the feature values ​​of each channel through channel-wise multiplication. This weighted feature map enhances disease-related channel information and suppresses irrelevant information (such as background regions), thereby improving the model's sensitivity to pathological features. Finally, the weighted feature map is passed to subsequent layers (transition layers or classification layers) of DenseNet-121. Combined with densely connected multi-scale feature reuse, it completes four classification tasks: HCM, HHD, CA, and NRM (Normal Response Mode, normal myocardium).

[0044] The fully connected layer integrates these features into a fixed-dimensional vector, comprehensively capturing the pathological information in the T1-mapped image. This vector is then converted into four probability values ​​(i.e., a multi-probability classification result) using a Softmax activation function (the classification activation function described in this invention), representing the confidence level that the image belongs to hypertrophic cardiomyopathy, hypertensive heart disease, cardiac amyloidosis, or normal myocardium, respectively. Each probability value is between 0 and 1, and the sum is 1. For example, an output of [0.70, 0.20, 0.05, 0.05] indicates that the image is most likely HCM.

[0045] By using the fusion framework of DenseNet-121 and SEBlock, end-to-end classification of four categories—HCM, HHD, CA, and NRM—was achieved for the first time, covering the main types of LVH phenotype diseases and normal controls, significantly expanding the diagnostic scope, and solving the problem that existing models have limited classification dimensions and cannot meet the comprehensive clinical identification needs.

[0046] Furthermore, such as Figure 4 As shown, based on the above-described task classification method based on cardiomyopathy images, the present invention also provides a task classification system based on cardiomyopathy images, wherein the task classification system based on cardiomyopathy images includes: Image preprocessing module 51 is used to acquire multiple cardiomyopathy mapping images, construct pre-trained weights based on all the cardiomyopathy mapping images, and preprocess all the cardiomyopathy mapping images to obtain an input image set; The model training module 52 is used to divide the input image set into a training set and a test set, and input the pre-trained weights and the training set into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network. The attention fusion module 53 is used to input the test set into the target dense convolutional network for continuous feature enhancement and feature reuse, and to construct multiple channel weights using the attention mechanism; The result classification module 54 is used to multiply the test set channel by channel according to all the channel weights to obtain multiple weighted feature maps, and integrate all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result.

[0047] Furthermore, such as Figure 5 As shown, based on the above-mentioned task classification method and system based on cardiomyopathy images, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 5 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0048] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a task classification program 40 based on cardiomyopathy images, which can be executed by the processor 10 to implement the task classification method based on cardiomyopathy images in this application.

[0049] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the task classification method based on cardiomyopathy images.

[0050] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.

[0051] In one embodiment, when the processor 10 executes the task classification program 40 based on cardiomyopathy images in the memory 20, the following steps are performed: The step of acquiring multiple cardiomyopathy mapping images and constructing pre-trained weights based on all the cardiomyopathy mapping images specifically includes: Multiple cardiomyopathy images were acquired, and all of the cardiomyopathy images were quantitatively analyzed using magnetic resonance imaging (MRI) to obtain corresponding cardiomyopathy mapping images. The image set weights input by the user are obtained, and the image set weights are fine-tuned based on all the cardiomyopathy mapping images to obtain pre-trained weights.

[0052] Specifically, the preprocessing of all the cardiomyopathy mapping images to obtain the input image set includes: Mask extraction is performed on each of the cardiomyopathy mapping images to obtain a first mask and a second mask corresponding to each cardiomyopathy mapping image, and a binary mask corresponding to each cardiomyopathy mapping image is constructed based on each pair of the first mask and the second mask; Based on each binary mask, focus is applied to each cardiomyopathy mapping image to obtain the corresponding focused region, and each focused region is normalized to obtain the corresponding normalized image. Calculate the mean and standard deviation of the RGB values ​​of all the normalized images, and standardize the mean and standard deviation according to a preset standard to obtain the input image set.

[0053] Specifically, the step of dividing the input image set into a training set and a test set, and inputting the pre-trained weights and the training set into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network includes: The input image set is divided into a training set, a validation set, and a test set according to a preset ratio; Construct an initial dense convolutional network, input the pre-trained weights and the training set into the initial dense convolutional network, the initial dense convolutional network predicts the training set according to the pre-trained weights, and outputs training prediction labels; Based on the predicted labels from the training set and the true labels from the training set, a cross-entropy loss function is constructed, and the initial dense convolutional network is optimized using the cross-entropy loss function. The validation set is input into the optimized initial dense convolutional network, which outputs validation prediction labels. The validation prediction labels are then detected using the five-fold cross-validation method. If the detection result is satisfactory, the optimized initial dense convolutional network is defined as the target dense convolutional network.

[0054] Specifically, the step of inputting the test set into the target dense convolutional network for continuous feature enhancement and reuse, and constructing multiple channel weights using an attention mechanism, includes: The test set is input into the target dense convolutional network, and the test set passes through multiple dense blocks of the target dense convolutional network to obtain enhanced features; The enhanced features are iteratively input into the low-level feature extraction layer and the high-level feature extraction layer of the target dense convolutional network until low-level features and high-level features are obtained. The low-level features and the high-level features are then integrated to output a feature map containing the low-level features and the high-level features. The feature map is input into the channel attention module, which performs a global averaging operation on each channel of the feature map to obtain a channel descriptor. The channel descriptor is then input into a preset model, which outputs the channel weights for each channel.

[0055] Specifically, the step of inputting the feature map into a channel attention module, whereby the channel attention module performs a global averaging operation on each channel of the feature map to obtain a channel descriptor, and inputs the channel descriptor into a preset model to output the channel weights for each channel, includes: The feature map is input into the channel attention module, which compresses each channel of the feature map into a corresponding scalar value and constructs a channel descriptor based on all the scalar values. The channel descriptor is used to describe the global feature contribution value of each channel. The channel descriptor is input into a preset model, wherein the preset model includes two fully connected layers; The channel descriptor is reduced in dimensionality using the first fully connected layer of the preset model, and a non-linear activation function is introduced into the first fully connected layer to obtain a low-dimensional channel. The second fully connected layer of the preset model is used to perform dimensionality restoration processing on the low-dimensional channels, and a smoothing nonlinear function is introduced into the second fully connected layer to output the channel weights of each channel of the feature map.

[0056] Specifically, the step of multiplying the test set channel-by-channel according to all the channel weights to obtain multiple weighted feature maps, and then integrating all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result, includes: All the channel weights and the test set are input into the target dense convolutional network. The target dense convolutional network uses all the channel weights to perform weighted fusion of the feature values ​​of all channels of the test set to obtain the corresponding weighted feature map. All the weighted feature maps are input into the fully connected layer of the target dense convolutional network for feature integration, resulting in a fixed-dimensional fusion vector; Based on the fusion vector, target features are extracted from each target image in the test set, and all target features are normalized using a classification activation function to output the classification result for each target image.

[0057] The present invention also provides a storage medium (i.e., a computer-readable storage medium) wherein the storage medium stores a task classification program based on cardiomyopathy images, which, when executed by a processor, implements the steps of the task classification method based on cardiomyopathy images as described above.

[0058] In summary, this invention provides a task classification method, system, terminal, and storage medium based on cardiomyopathy images. The method includes: acquiring multiple cardiomyopathy mapping images; constructing pre-trained weights based on all the cardiomyopathy mapping images; preprocessing all the cardiomyopathy mapping images to obtain an input image set; dividing the input image set into a training set and a test set; inputting the pre-trained weights and the training set into a pre-constructed initial dense convolutional network for model optimization to obtain a target dense convolutional network; inputting the test set into the target dense convolutional network for continuous feature enhancement and feature reuse, and constructing multiple channel weights using an attention mechanism; multiplying the test set channel by channel based on all the channel weights to obtain multiple weighted feature maps; and integrating all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain a classification result. This invention enhances feature reuse through dense block connections of dense convolutional networks and focuses on the target region using an attention mechanism, improving the objectivity and effectiveness of feature extraction and avoiding the limitations of qualitative images.

[0059] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0060] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, optical disk, etc.

[0061] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A task classification method based on cardiomyopathy images, characterized in that, The task classification method based on cardiomyopathy images includes: Multiple cardiomyopathy mapping images are acquired. Based on all the cardiomyopathy mapping images, pre-trained weights are constructed, and all the cardiomyopathy mapping images are pre-processed to obtain an input image set. The input image set is divided into a training set and a test set. The pre-trained weights and the training set are input into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network. The test set is input into the target dense convolutional network for continuous feature enhancement and feature reuse, and multiple channel weights are constructed using an attention mechanism; Based on all the channel weights, the test set is multiplied channel by channel to obtain multiple weighted feature maps. All the weighted feature maps are then integrated through the fully connected layer of the target dense convolutional network to obtain the classification result.

2. The task classification method based on cardiomyopathy images according to claim 1, characterized in that, The step of acquiring multiple cardiomyopathy mapping images and constructing pre-trained weights based on all the cardiomyopathy mapping images specifically includes: Multiple cardiomyopathy images were acquired, and all of the cardiomyopathy images were quantitatively analyzed using magnetic resonance imaging (MRI) to obtain corresponding cardiomyopathy mapping images. The image set weights input by the user are obtained, and the image set weights are fine-tuned based on all the cardiomyopathy mapping images to obtain pre-trained weights.

3. The task classification method based on cardiomyopathy images according to claim 2, characterized in that, The preprocessing of all the cardiomyopathy mapping images to obtain the input image set specifically includes: Mask extraction is performed on each of the cardiomyopathy mapping images to obtain a first mask and a second mask corresponding to each cardiomyopathy mapping image, and a binary mask corresponding to each cardiomyopathy mapping image is constructed based on each pair of the first mask and the second mask; Based on each binary mask, focus is applied to each cardiomyopathy mapping image to obtain the corresponding focused region, and each focused region is normalized to obtain the corresponding normalized image. Calculate the mean and standard deviation of the RGB values ​​of all the normalized images, and standardize the mean and standard deviation according to a preset standard to obtain the input image set.

4. The task classification method based on cardiomyopathy images according to claim 3, characterized in that, The step of dividing the input image set into a training set and a test set, and inputting the pre-trained weights and the training set into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network specifically includes: The input image set is divided into a training set, a validation set, and a test set according to a preset ratio; Construct an initial dense convolutional network, input the pre-trained weights and the training set into the initial dense convolutional network, the initial dense convolutional network predicts the training set according to the pre-trained weights, and outputs training prediction labels; Based on the predicted labels from the training set and the true labels from the training set, a cross-entropy loss function is constructed, and the initial dense convolutional network is optimized using the cross-entropy loss function. The validation set is input into the optimized initial dense convolutional network, which outputs validation prediction labels. The validation prediction labels are then detected using the five-fold cross-validation method. If the detection result is satisfactory, the optimized initial dense convolutional network is defined as the target dense convolutional network.

5. The task classification method based on cardiomyopathy images according to claim 1, characterized in that, The process of inputting the test set into the target dense convolutional network for continuous feature enhancement and reuse, and constructing multiple channel weights using an attention mechanism, specifically includes: The test set is input into the target dense convolutional network, and the test set passes through multiple dense blocks of the target dense convolutional network to obtain enhanced features; The enhanced features are iteratively input into the low-level feature extraction layer and the high-level feature extraction layer of the target dense convolutional network until low-level features and high-level features are obtained. The low-level features and the high-level features are then integrated to output a feature map containing the low-level features and the high-level features. The feature map is input into the channel attention module, which performs a global averaging operation on each channel of the feature map to obtain a channel descriptor. The channel descriptor is then input into a preset model, which outputs the channel weights for each channel.

6. The task classification method based on cardiomyopathy images according to claim 5, characterized in that, The feature map is input into a channel attention module, which performs a global averaging operation on each channel of the feature map to obtain a channel descriptor. The channel descriptor is then input into a preset model, and the channel weights for each channel are output. Specifically, this includes: The feature map is input into the channel attention module, which compresses each channel of the feature map into a corresponding scalar value and constructs a channel descriptor based on all the scalar values. The channel descriptor is used to describe the global feature contribution value of each channel. The channel descriptor is input into a preset model, wherein the preset model includes two fully connected layers; The channel descriptor is reduced in dimensionality using the first fully connected layer of the preset model, and a non-linear activation function is introduced into the first fully connected layer to obtain a low-dimensional channel. The second fully connected layer of the preset model is used to perform dimensionality restoration processing on the low-dimensional channels, and a smoothing nonlinear function is introduced into the second fully connected layer to output the channel weights of each channel of the feature map.

7. The task classification method based on cardiomyopathy images according to claim 1, characterized in that, The step involves multiplying the test set channel-by-channel according to all the channel weights to obtain multiple weighted feature maps, and then integrating all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result. Specifically, this includes: All the channel weights and the test set are input into the target dense convolutional network. The target dense convolutional network uses all the channel weights to perform weighted fusion of the feature values ​​of all channels of the test set to obtain the corresponding weighted feature map. All the weighted feature maps are input into the fully connected layer of the target dense convolutional network for feature integration, resulting in a fixed-dimensional fusion vector; Based on the fusion vector, target features are extracted from each target image in the test set, and all target features are normalized using a classification activation function to output the classification result for each target image.

8. A task classification system based on cardiomyopathy images, characterized in that, The task classification system based on cardiomyopathy images includes: An image preprocessing module is used to acquire multiple cardiomyopathy mapping images, construct pre-trained weights based on all the cardiomyopathy mapping images, and preprocess all the cardiomyopathy mapping images to obtain an input image set; The model training module is used to divide the input image set into a training set and a test set, and input the pre-trained weights and the training set into the constructed initial dense convolutional network for model optimization to obtain the target dense convolutional network. The attention fusion module is used to input the test set into the target dense convolutional network for continuous feature enhancement and feature reuse, and to construct multiple channel weights using the attention mechanism; The result classification module is used to multiply the test set channel by channel according to all the channel weights to obtain multiple weighted feature maps, and integrate all the weighted feature maps through the fully connected layer of the target dense convolutional network to obtain the classification result.

9. A terminal, characterized in that, The terminal includes: a memory, a processor, and a task classification program based on cardiomyopathy images stored in the memory and executable on the processor, wherein the task classification program based on cardiomyopathy images, when executed by the processor, implements the steps of the task classification method based on cardiomyopathy images as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores a task classification program based on cardiomyopathy images, which, when executed by a processor, implements the steps of the task classification method based on cardiomyopathy images as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method for identifying blood pressure heart disease and hypertrophic cardiomyopathy based on deep learning

    CN116071330A