Image classification method based on spatial transformation network
By extracting and segmenting key regions from CT images and combining them with the ResNet-50 model of the spatial transformation network, the focus on cavity regions is dynamically adjusted, solving the problem of insufficient utilization of key regions in existing CT image analysis and achieving more efficient and accurate image analysis.
Patent Information
- Application Number
- CN202411663033.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-01-10
AI Technical Summary
Existing CT image analysis methods fail to fully utilize information from key areas, leading to increased computational burden and limited diagnostic accuracy and specificity. In particular, they are easily affected by the operator's subjective judgment when processing large-scale data.
By extracting and segmenting key regions from CT images, and using the ResNet-50 model of the spatial transformation network for image classification, combined with the ratio and similarity evaluation of foreground and background regions, the importance of attention is dynamically adjusted to achieve adaptive magnification and accurate identification of cavity regions.
It improves the accuracy and efficiency of image analysis, optimizes subsequent processing, ensures that key information is not missed, enhances the ability to identify highly important areas, and improves the accuracy and reliability of diagnosis.
Smart Images

Figure CN119295429A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical image processing, and in particular relates to a method based on computer vision and deep learning for identifying and evaluating the possibility of the existence of potential targets in the chest area from CT images. Background Art
[0002] Chest computed tomography (CT) is an indispensable tool in modern medical diagnosis, especially in analyzing and evaluating the internal structures of the chest cavity, such as the lungs, large blood vessels, etc., which is crucial for identifying pneumonia, tumors and other chest-related diseases. With the advancement of technology, the speed of CT scanning and the amount of data generated have increased dramatically, providing more detailed information for medical diagnosis, but it also brings huge challenges in data processing.
[0003] Traditional CT image analysis mainly relies on the experience and visual judgment of radiologists, which is not only time-consuming but also susceptible to operator fatigue and subjective judgment, especially when dealing with large-scale data. In order to improve the efficiency and accuracy of analysis, automated image processing technology, especially deep learning technology, has been widely studied and applied in the automatic analysis of CT images.
[0004] Although deep learning, especially convolutional neural networks (CNNs), has achieved remarkable results in the field of image recognition, most existing methods are directly applied to the entire image when processing CT images, without fully utilizing the key area information in the image. This method not only increases the computational burden, but also limits the accuracy and specificity of diagnosis.
[0005] The present invention proposes an image classification method based on a spatial transformer network. The method marks key chest regions by preprocessing CT images, and then uses the detailed features of these regions for in-depth analysis. In addition, by setting different thresholds and calculating the similarity between regions, the method can effectively evaluate the possibility of the existence of targets in key target regions in the image, thereby providing accurate input for subsequent deep learning model processing. In this way, the model can more centrally learn and identify target regions in the chest, thereby optimizing the overall performance and efficiency of medical image analysis. Summary of the invention
[0006] In view of the above-mentioned deficiencies of the prior art, the present invention proposes an image classification method based on a spatial transformation network, comprising the following steps:
[0007] Step 1: Extract key regions of the CT image to obtain the chest region and cavity region in the CT image;
[0008] Step 2: Determine the importance of the cavity area in the CT image;
[0009] Step 2.1: Segment the cavity region in the CT image;
[0010] Step 2.2: Calculate the number of pixels in the foreground area Afg and Bfg of the cavity area R and the cavity area L in the CT image, the average value of the number of pixels in the foreground area mean(Afg) and mean(Bfg), and the standard deviation of the number of pixels in the foreground area std(Afg) and std(Bfg); Calculate the mean value of the number of pixels in the background area Afb_avg and Bfb_avg of the cavity area R and the cavity area L in the CT image; Calculate the ratio of the foreground area to the background area ARfb and BRfb of the cavity area R and the cavity area L in the CT image;
[0011] Step 2.3: Evaluate the similarity S of the foreground region of the cavity region R and the cavity region L in the chest region of the CT image;
[0012] Step 2.4: Set the ratio threshold thr of the foreground area and the background area to judge the importance of attention;
[0013] Step 3: Based on the attention importance of CT images, the ResNet-50 model with integrated spatial transformer network is used for image classification.
[0014] Furthermore, 2. In step 1, key regions of the CT image are extracted, specifically: first, the contrast of the CT image is adjusted by equalizing histogram processing to improve image quality and highlight structural boundaries; next, the Canny edge detection algorithm is applied to identify edges in the image to distinguish internal structures of the chest cavity; then, connected component labeling is performed to identify all independent connected regions in the image; morphological operations are used to further smooth the connected regions, and small holes are eliminated and small breaks are connected by opening or closing operations to enhance the continuity and integrity of the regions; finally, template matching technology is used to perform feature matching and region alignment, and the similarity between regions is evaluated by cross-correlation or normalized cross-correlation coefficients, and the chest region and the cavity regions R and B inside it are located and marked to obtain the chest region and cavity region R and cavity region L in the CT image.
[0015] Furthermore, in step 2.1, the cavity area in the CT image is segmented, specifically: all pixels in the chest area of the CT image are segmented according to the regional segmentation threshold thdiv, and the pixel points whose pixel values are greater than the regional segmentation threshold thdiv are divided into the foreground area, and the pixel points whose pixel values are less than the regional segmentation threshold thdiv are divided into the background area.
[0016] Furthermore, in step 2.2, the ratios ARfb and BRfb of the foreground area and the background area of the cavity area R and the cavity area L in the CT image are calculated respectively, specifically: ARfb=Afg / Afb_avg, BRfb=Bfb / Bfb_avg.
[0017] Furthermore, the step 2.3, evaluating the similarity S of the foreground region of the cavity region R and the cavity region L in the chest region of the CT image, is specifically:
[0018] Where α is the sensitivity parameter;
[0019] Furthermore, in the step 2.4, a threshold value thr for the proportion of the foreground area and the background area is set to judge the importance of attention, specifically: when the proportions ARfb and BRfb of the foreground area and the background area of the cavity area R and the cavity area L are both greater than the proportion threshold thr, an importance judgment is made; when the proportions ARfb and BRfb of the foreground area and the background area of the cavity area R and the cavity area L are both less than the proportion threshold thr, an importance judgment is made; when the proportions ARfb and BRfb of the foreground area and the background area of the cavity area R are greater than the threshold thr, and the proportions BRfb of the foreground area and the background area of the cavity area L are less than the threshold thr, or when the proportions BRfb of the foreground area and the background area of the cavity area L are greater than the threshold thr, and the proportions ARfb of the foreground area and the background area of the cavity area R are less than the threshold thr, an importance judgment is made.
[0020] Further, the importance judgment is specifically as follows: setting a similarity threshold ths, when the similarity S is greater than the similarity threshold ths, the importance of the chest area of the CT image is judged to be medium, and the target importance of the cavity area R and the cavity B is medium-medium; when the similarity S is less than the similarity threshold ths, the importance of the chest area of the CT image is judged to be high, and then the proportion AR of the foreground area to the background area of the cavity area R and the cavity area L is compared. fb and BR fb The size of AR fb Greater than BR fb , the importance of cavity area R is high-high, and the importance of cavity area L is high-medium; when AR fb Smaller than BR fb, the importance of attention of cavity region L is high-high, and the importance of attention of cavity region R is high-medium; the second importance judgment is specifically as follows: setting a similarity threshold ths, when the similarity S is greater than the similarity threshold ths, it is judged that the importance of attention of the chest region of the CT image is low, and the importance of attention of cavity region R and cavity region L is low-low; when the similarity S is less than the similarity threshold ths, it is judged that the importance of attention of the chest region of the CT image is medium, and then the proportion AR of the foreground area and the background area of the cavity region R and the cavity region L is compared. fb and BR fb The size of AR fb Greater than BR fb , the importance of cavity area R is medium-medium, and the importance of cavity area L is medium-low; when AR fb Smaller than BR fb , the importance of attention to cavity area L is medium-medium, and the importance of attention to cavity area R is medium-low.
[0021] Furthermore, the third importance judgment is specifically: when the ratio ARfb of the foreground area and the background area of the cavity area R is greater than the threshold thr, and the ratio BRfb of the foreground area and the background area of the cavity area L is less than the threshold thr, then it is judged that the importance of attention to the chest area of the CT image is high, and the importance of attention to the cavity area R is high-high, and the importance of attention to the cavity area L is high-medium; when the ratio BRfb of the foreground area and the background area of the cavity area L is greater than the threshold thr, and the ratio ARfb of the foreground area and the background area of the cavity area R is less than the threshold thr, then it is judged that the importance of attention to the chest area of the CT image is high, and the importance of attention to the cavity area R is high-medium, and the importance of attention to the cavity area L is high-high.
[0022] Furthermore, in step 3, based on the importance of attention of the CT image, the ResNet-50 model with integrated spatial transformation network is used for image classification, specifically: first, the CT image obtained by key area extraction is input into the ResNet-50 model with integrated spatial transformation network, and then according to the importance of attention of the cavity area, the spatial transformation network module automatically adjusts the local magnification of the identified cavity areas R and L in the image through local affine transformation. The adjusted image is then transmitted to the subsequent layers of ResNet-50 for feature extraction, and finally the image is classified through the binary classification output layer of the model to determine whether there is a target.
[0023] Furthermore, according to the importance of the cavity area, the spatial transformation network module automatically adjusts the local magnification degree of the identified cavity areas R and L in the image through local affine transformation, specifically: when the importance of the cavity areas R and L is rated as "high-high", a local magnification of 1.3 times is performed; when it is rated as "high-medium", a local magnification of 1.2 times is performed; when it is rated as "medium-medium", a local magnification of 1.1 times is performed; and when it is rated as "medium-low", the original size is maintained without enlargement.
[0024] Compared with the traditional method, the present invention has the following advantages, thereby solving the corresponding technical problems:
[0025] 1. The present invention effectively distinguishes the cavity area in CT images by combining image processing technology with accurate region segmentation and foreground-background ratio analysis. In particular, by setting a ratio threshold, the importance of attention is automatically evaluated according to the ratio of the foreground and background areas of the cavity area, and then the criticality of the cavity area is graded. This method not only improves the accuracy of image analysis, but also optimizes the efficiency of subsequent processing procedures.
[0026] 2. Using the similarity formula, the similarity between different cavity regions can be accurately evaluated, which is extremely important for accurately judging the changes in key areas in the image. By calculating the foreground-background ratio of different cavity regions and comparing it with the set similarity threshold, this method can distinguish the attention level of each cavity region in detail, such as high-high, medium-medium, thereby providing support for more accurate medical diagnosis.
[0027] 3. The method of the present invention allows the evaluation of the importance of attention to be adjusted dynamically according to the real-time analysis results. This flexibility is particularly important for processing various medical images. For example, when a key change or abnormality is detected, the analysis strategy can be adjusted immediately to ensure that key information is not missed, which greatly helps improve the accuracy and reliability of diagnosis.
[0028] 4. The present invention integrates the spatial transformer network (STN) into the ResNet-50 model and combines it with the possibility of target existence in the cavity area, effectively realizing adaptive image area magnification based on the possibility of target existence. This method optimizes the model's attention to key cavity areas in CT images, and enhances the model's ability to identify high-importance areas by performing differentiated local magnification processing on cavity areas with different target existence possibility attributes. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flow chart of an image classification method based on a spatial transformer network; DETAILED DESCRIPTION
[0030] The following will clearly and completely describe the technical solution in the embodiment of the present invention in conjunction with the accompanying drawings in the embodiment of the present invention. The method includes the following steps:
[0031] Step 1: Extract key regions of the CT image to obtain the chest region and cavity region in the CT image;
[0032] Step 2: Determine the importance of the cavity area in the CT image;
[0033] Step 2.1: Segment the cavity region in the CT image;
[0034] Step 2.2: Calculate the number of pixels in the foreground area Afg and Bfg of the cavity area R and the cavity area L in the CT image, the average value of the number of pixels in the foreground area mean(Afg) and mean(Bfg), and the standard deviation of the number of pixels in the foreground area std(Afg) and std(Bfg); Calculate the mean value of the number of pixels in the background area Afb_avg and Bfb_avg of the cavity area R and the cavity area L in the CT image; Calculate the ratio of the foreground area to the background area ARfb and BRfb of the cavity area R and the cavity area L in the CT image;
[0035] Step 2.3: Evaluate the similarity S of the foreground region of the cavity region R and the cavity region L in the chest region of the CT image;
[0036] Step 2.4: Set the ratio threshold thr of the foreground area and the background area to judge the importance of attention;
[0037] Step 3: Based on the attention importance of CT images, the ResNet-50 model with integrated spatial transformer network is used for image classification.
[0038] Furthermore, 2. In step 1, key regions of the CT image are extracted, specifically: first, the contrast of the CT image is adjusted by equalizing histogram processing to improve image quality and highlight structural boundaries; next, the Canny edge detection algorithm is applied to identify edges in the image to distinguish internal structures of the chest cavity; then, connected component labeling is performed to identify all independent connected regions in the image; morphological operations are used to further smooth the connected regions, and small holes are eliminated and small breaks are connected by opening or closing operations to enhance the continuity and integrity of the regions; finally, template matching technology is used to perform feature matching and region alignment, and the similarity between regions is evaluated by cross-correlation or normalized cross-correlation coefficients, and the chest region and the cavity regions R and B inside it are located and marked to obtain the chest region and cavity region R and cavity region L in the CT image.
[0039] Furthermore, in step 2.1, the cavity area in the CT image is segmented, specifically: all pixels in the chest area of the CT image are segmented according to the regional segmentation threshold thdiv, and the pixel points whose pixel values are greater than the regional segmentation threshold thdiv are divided into the foreground area, and the pixel points whose pixel values are less than the regional segmentation threshold thdiv are divided into the background area.
[0040] Furthermore, in step 2.2, the ratios ARfb and BRfb of the foreground area and the background area of the cavity area R and the cavity area L in the CT image are calculated respectively, specifically: ARfb=Afg / Afb_avg, BRfb=Bfb / Bfb_avg.
[0041] Furthermore, the step 2.3, evaluating the similarity S of the foreground region of the cavity region R and the cavity region L in the chest region of the CT image, is specifically:
[0042] Where α is the sensitivity parameter;
[0043] Furthermore, in the step 2.4, a threshold value thr for the proportion of the foreground area and the background area is set to judge the importance of attention, specifically: when the proportions ARfb and BRfb of the foreground area and the background area of the cavity area R and the cavity area L are both greater than the proportion threshold thr, an importance judgment is made; when the proportions ARfb and BRfb of the foreground area and the background area of the cavity area R and the cavity area L are both less than the proportion threshold thr, an importance judgment is made; when the proportions ARfb and BRfb of the foreground area and the background area of the cavity area R are greater than the threshold thr, and the proportions BRfb of the foreground area and the background area of the cavity area L are less than the threshold thr, or when the proportions BRfb of the foreground area and the background area of the cavity area L are greater than the threshold thr, and the proportions ARfb of the foreground area and the background area of the cavity area R are less than the threshold thr, an importance judgment is made.
[0044] Further, the importance judgment is specifically as follows: setting a similarity threshold ths, when the similarity S is greater than the similarity threshold ths, the importance of the chest area of the CT image is judged to be medium, and the target importance of the cavity area R and the cavity B is medium-medium; when the similarity S is less than the similarity threshold ths, the importance of the chest area of the CT image is judged to be high, and then the proportion AR of the foreground area to the background area of the cavity area R and the cavity area L is compared. fb and BR fb The size of AR fb Greater than BR fb , the importance of cavity area R is high-high, and the importance of cavity area L is high-medium; when AR fb Smaller than BRfb , the importance of attention of cavity region L is high-high, and the importance of attention of cavity region R is high-medium; the second importance judgment is specifically as follows: setting a similarity threshold ths, when the similarity S is greater than the similarity threshold ths, it is judged that the importance of attention of the chest region of the CT image is low, and the importance of attention of cavity region R and cavity region L is low-low; when the similarity S is less than the similarity threshold ths, it is judged that the importance of attention of the chest region of the CT image is medium, and then the proportion AR of the foreground area and the background area of the cavity region R and the cavity region L is compared. fb and BR fb The size of AR fb Greater than BR fb , the importance of cavity area R is medium-medium, and the importance of cavity area L is medium-low; when AR fb Smaller than BR fb , the importance of attention to cavity area L is medium-medium, and the importance of attention to cavity area R is medium-low.
[0045] Furthermore, the third importance judgment is specifically: when the ratio ARfb of the foreground area and the background area of the cavity area R is greater than the threshold thr, and the ratio BRfb of the foreground area and the background area of the cavity area L is less than the threshold thr, then it is judged that the importance of attention to the chest area of the CT image is high, and the importance of attention to the cavity area R is high-high, and the importance of attention to the cavity area L is high-medium; when the ratio BRfb of the foreground area and the background area of the cavity area L is greater than the threshold thr, and the ratio ARfb of the foreground area and the background area of the cavity area R is less than the threshold thr, then it is judged that the importance of attention to the chest area of the CT image is high, and the importance of attention to the cavity area R is high-medium, and the importance of attention to the cavity area L is high-high.
[0046] Furthermore, in step 3, based on the importance of attention of the CT image, the ResNet-50 model with integrated spatial transformation network is used for image classification, specifically: first, the CT image obtained by key area extraction is input into the ResNet-50 model with integrated spatial transformation network, and then according to the importance of attention of the cavity area, the spatial transformation network module automatically adjusts the local magnification of the identified cavity areas R and L in the image through local affine transformation. The adjusted image is then transmitted to the subsequent layers of ResNet-50 for feature extraction, and finally the image is classified through the binary classification output layer of the model to determine whether there is a target.
[0047] Furthermore, according to the importance of the cavity area, the spatial transformation network module automatically adjusts the local magnification degree of the identified cavity areas R and L in the image through local affine transformation, specifically: when the importance of the cavity areas R and L is rated as "high-high", a local magnification of 1.3 times is performed; when it is rated as "high-medium", a local magnification of 1.2 times is performed; when it is rated as "medium-medium", a local magnification of 1.1 times is performed; and when it is rated as "medium-low", the original size is maintained without enlargement.
[0048] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
Claims
1. An image classification method based on a spatial transformer network comprises the following steps: Step 1: Extract key regions of the CT image to obtain the chest region and cavity region in the CT image; Step 2: Determine the importance of the cavity area in the CT image; Step 2.1: Segment the cavity region in the CT image; Step 2.2: Calculate the number of pixels A in the foreground area of the cavity area R and the cavity area L in the CT image respectively fg , B fg , the average number of pixels in the foreground area mean(A fg ) and mean(B fg ), the standard deviation of the number of pixels in the foreground area std(A fg ) and std(B fg ); Calculate the mean value A of the number of background pixels in the cavity area R and the cavity area L in the CT image respectively fb _avg, B fb _avg; Calculate the ratio of the foreground area to the background area AR of the cavity area R and the cavity area L in the CT image respectively fb and BR fb ; Step 2.3: Evaluate the similarity S of the foreground region of the cavity region R and the cavity region L in the chest region of the CT image; Step 2.4: Set the ratio threshold thr of the foreground area and the background area to judge the importance of attention; Step 3: Based on the attention importance of CT images, the ResNet-50 model with integrated spatial transformer network is used for image classification.
2. The image classification method based on a spatial transformer network as claimed in claim 1, characterized in that: In the step 1, key regions of the CT image are extracted, specifically: first, the contrast of the CT image is adjusted by equalizing histogram processing to improve the image quality and highlight the structural boundaries; next, the Canny edge detection algorithm is applied to identify the edges in the image to distinguish the internal structure of the chest cavity; then, connected component labeling is performed to identify all independent connected regions in the image; morphological operations are used to further smooth the connected regions, and small holes are eliminated and small breaks are connected by opening or closing operations to enhance the continuity and integrity of the regions; finally, template matching technology is used to perform feature matching and region alignment, and the similarity between regions is evaluated by cross-correlation or normalized cross-correlation coefficients, and the chest region and the cavity regions R and B inside it are located and marked to obtain the chest region and the cavity region R and the cavity region L in the CT image.
3. The image classification method based on spatial transformer network according to claim 1, characterized in that: In the step 2.1, the cavity area in the CT image is segmented, specifically: all pixels in the chest area of the CT image are segmented according to the regional segmentation threshold thdiv, and the pixel points whose pixel values are greater than the regional segmentation threshold thdiv are divided into the foreground area, and the pixel points whose pixel values are less than the regional segmentation threshold thdiv are divided into the background area.
4. The image classification method based on a spatial transformer network as claimed in claim 1, characterized in that: In step 2.2, the ratio AR of the foreground area to the background area of the cavity area R and the cavity area L in the CT image is calculated respectively. fb and BR fb , specifically: AR fb =A fg / A fb _avg, BR fb =B fb / B fb _avg.
5. The image classification method based on spatial transformation network according to claim 1, characterized in that: The step 2.3, evaluating the similarity S of the foreground area of the cavity area R and the cavity area L in the chest area of the CT image, is specifically: Where α is the sensitivity parameter.
6. The image classification method based on a spatial transformer network as claimed in claim 1, characterized in that: In step 2.4, a threshold thr of the ratio of the foreground area to the background area is set to judge the importance of attention, specifically: when the ratio of the foreground area to the background area of the cavity area R and the cavity area L is AR fb and BR fb are greater than the ratio threshold thr, an importance judgment is performed; when the ratio of the foreground area to the background area of the cavity area R and the cavity area L is AR fb and BR fb are all less than the proportion threshold thr, the second importance judgment is performed; when the proportion of the foreground area to the background area of the cavity area R is AR fb is greater than the threshold thr, and the ratio of the foreground area to the background area of the cavity area L is BR fb is less than the threshold thr, or when the ratio of the foreground area to the background area of the cavity area L is BR fb is greater than the threshold thr, and the ratio of the foreground area to the background area of the cavity area R is AR fb If it is less than the threshold thr, the third importance judgment is performed.
7. The image classification method based on a spatial transformer network as claimed in claim 6, characterized in that: The importance judgment is specifically as follows: setting a similarity threshold ths, when the similarity S is greater than the similarity threshold ths, it is judged that the importance of the chest area of the CT image is medium, and the importance of the target attention of the cavity area R and the cavity B are both medium-medium; When the similarity S is less than the similarity threshold ths, the chest area of the CT image is judged to be of high importance, and then the ratio AR of the foreground area to the background area of the cavity area R and the cavity area L is compared. fb and BR fb The size of AR fb Greater than BR fb , the importance of cavity area R is high-high, and the importance of cavity area L is high-medium; when AR fb Smaller than BR fb , the importance of the cavity region L is high-high, and the importance of the cavity region R is high-medium; the second importance judgment is specifically: setting a similarity threshold ths, when the similarity S is greater than the similarity threshold ths, it is judged that the importance of the chest region of the CT image is low, and the importance of the cavity region R and the cavity region L is low-low; When the similarity S is less than the similarity threshold ths, the chest area of the CT image is judged to be of medium importance, and then the ratio of the foreground area to the background area of the cavity area R and the cavity area L is compared. fb and BR fb The size of AR fb Greater than BR fb , the importance of cavity area R is medium-medium, and the importance of cavity area L is medium-low; when AR fb Smaller than BR fb , the importance of attention to cavity area L is medium-medium, and the importance of attention to cavity area R is medium-low.
8. The image classification method based on spatial transformation network according to claim 6, characterized in that: The third importance judgment is specifically: when the ratio of the foreground area to the background area of the cavity area R is AR fb is greater than the threshold thr, and the ratio of the foreground area to the background area of the cavity area L is BR fb Less than threshold thr , then the importance of the chest area of the CT image is judged to be high, and the importance of the cavity area R is high-high, and the importance of the cavity area L is high-medium; when the ratio of the foreground area to the background area of the cavity area L is BR fb is greater than the threshold thr, and the ratio of the foreground area to the background area of the cavity area R is AR fb If it is less than the threshold thr, it is judged that the importance of the chest area of the CT image is high, the importance of the cavity area R is high-medium, and the importance of the cavity area L is high-high.
9. The image classification method based on spatial transformer network according to claim 1, characterized in that: In the step 3, based on the importance of attention of the CT image, the ResNet-50 model of the integrated spatial transformation network is used for image classification, specifically: first, the CT image obtained by extracting the key area is input into the ResNet-50 model of the integrated spatial transformation network, and then according to the importance of attention of the cavity area, the spatial transformation network module automatically adjusts the local magnification of the identified cavity areas R and L in the image through local affine transformation. The adjusted image is then transmitted to the subsequent layer of ResNet-50 for feature extraction, and finally the image is classified through the binary classification output layer of the model to determine whether there is a target.
10. The image classification method based on spatial transformation network according to claim 9, characterized in that: Secondly, according to the importance of the cavity area, the spatial transformation network module automatically adjusts the local magnification degree of the identified cavity areas R and L in the image through local affine transformation, specifically: when the importance of the cavity areas R and L is rated as "high-high", a local magnification of 1.3 times is performed; when it is rated as "high-medium", a local magnification of 1.2 times is performed; when it is rated as "medium-medium", a local magnification of 1.1 times is performed; and when it is rated as "medium-low", the original size is maintained without enlargement.