Breast pathological cell image detection method and system based on improved YOLOv7 model
By introducing the ASFF and CBAM modules into the YOLOv7 network, adaptively fusing feature maps at different levels and combining them with the attention mechanism, the problem of insufficient detection accuracy of the YOLOv7 algorithm in breast pathology section cell detection is solved, and efficient recognition of multi-scale cell targets is achieved, facilitating accurate early diagnosis of breast cancer.
Patent Information
- Application Number
- CN202510596467.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-09-23
AI Technical Summary
The traditional YOLOv7 algorithm has difficulty achieving ideal detection accuracy and recall rate in breast pathology section cell detection, especially when facing multi-scale cell targets, where there is a problem of insufficient detection accuracy.
ASFF and CBAM modules are added to the three branches of the YOLOv7 network respectively. By adaptively fusing feature maps of different levels and combining channel and spatial attention mechanisms, the detection ability of multi-scale cellular targets is enhanced.
It significantly improves the accuracy and efficiency of breast pathology section cell detection, especially the ability to identify tiny early cancer cells and larger normal breast tissue cells, thereby improving the accuracy and reliability of early diagnosis of breast cancer.
Smart Images

Figure CN120689271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of medical image processing and computer vision technology, and in particular to a breast pathological cell image detection method and system based on an improved YOLOv7 model. Background Art
[0002] Breast cancer is one of the most common malignant tumors in women worldwide, and its early diagnosis is crucial for improving patient survival. Traditional breast pathology biopsy and cell analysis relies primarily on manual interpretation by pathologists using optical microscopes. This method is not only time-consuming and labor-intensive, but also inefficient and subject to the influence of factors such as physician experience and fatigue, making it prone to missed detections and misdiagnosis, making it difficult to meet the needs of large-scale screening.
[0003] With the rapid development of deep learning technology, object detection algorithms based on convolutional neural networks (CNNs) have demonstrated significant advantages in the field of medical imaging, providing a new solution for cell detection in breast pathology slides. Among these, algorithms from the YOLO (You Only Look Once) family, such as YOLOv7, stand out among numerous object detection algorithms for their rapid detection speed and high real-time performance, and are widely used in various scenarios. However, the YOLOv7 algorithm still faces numerous challenges in the task of cell detection in breast pathology slides. In particular, the diverse morphology and size of cells in breast pathology slides, the complex background, and the lack of clear features of some pathological cells all hinder the YOLOv7 algorithm from achieving ideal detection accuracy and recall. Therefore, there is an urgent need to improve and optimize the YOLOv7 algorithm to enhance its performance in the task of cell detection in breast pathology slides.
[0004] Therefore, it is urgent to develop a breast pathological cell image detection method based on the improved YOLOv7 model to improve the accuracy and efficiency of breast cancer diagnosis. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a breast pathology cell image detection method and system based on an improved YOLOv7 model, which enhances the model's focus on key features, improves feature representation capabilities, and significantly enhances the detection capabilities of multi-scale cell targets such as tiny early cancer cells and larger normal breast tissue cells, thereby helping to improve the accuracy and efficiency of early diagnosis of breast diseases.
[0006] In a first aspect, the present invention provides a method for detecting breast pathological cell images based on an improved YOLOv7 model, the method comprising:
[0007] Step S1: collecting breast pathological slice images to generate a data set;
[0008] Step S2: label the cells in the dataset with boxes;
[0009] Step S3: Split the labeled data set into a training set and a validation set;
[0010] Step S4: Build a YOLOv7 network, add ASFF and CBAM modules to the three branches of the YOLOv7 network respectively, and obtain an improved YOLOv7 network;
[0011] Step S5: Input the training set into the improved YOLOv7 network for training and verification to obtain a high-precision breast pathology section cell detection model.
[0012] Furthermore, step S1 is specifically as follows: collecting pathological section images containing normal breast cells and breast cancer cells, performing preprocessing operations on the collected pathological section images, including denoising and contrast enhancement, and then uniformly cropping the images to a size of 640×640 pixels and saving them to meet the needs of subsequent model training and verification.
[0013] Furthermore, the step S2 specifically includes:
[0014] The pre-processed image is annotated to mark the location and category information of the cells, and a label is generated and saved. The category information includes normal cells and abnormal cells.
[0015] Furthermore, the step S3 specifically includes: performing data enhancement on the labeled data set, and dividing the data set into a training set and a validation set according to a 7:3 ratio.
[0016] Furthermore, the improved YOLOv7 network structure specifically includes: a backbone part and a head part, three ASFF modules are integrated into the three ELAN-H modules in the head part, and a CBAM module and a CBS module are connected after each ASFF module;
[0017] ASFF fuses two adjacent low-level features and gradually incorporates higher-level features into the fusion process. The CBAM module is introduced after the ASFF module to avoid large semantic gaps between non-adjacent levels. The ASFF module enhances the detection capability of multi-scale cell targets by adaptively fusing feature maps of different levels, improves the flexibility and accuracy of feature fusion, and enhances the generalization ability of the model. After the CBAM attention mechanism combines channel and spatial attention, it enhances the model's attention to key features and improves feature representation capabilities to adapt to dense cell target detection.
[0018] In a second aspect, the present invention provides a breast pathological cell image detection system based on an improved YOLOv7 model, the system comprising:
[0019] Data acquisition module, used to collect breast pathology slice images and generate data sets;
[0020] Data annotation module, used to perform box annotation on cells in the dataset;
[0021] The dataset splitting module is used to split the labeled dataset into training set and validation set;
[0022] The model building module is used to build the YOLOv7 network. The ASFF and CBAM modules are added to the three branches of the YOLOv7 network to obtain the improved YOLOv7 network.
[0023] The training module is used to input the training set into the improved YOLOv7 network for training and verification to obtain a high-precision breast pathology section cell detection model.
[0024] Furthermore, the data acquisition module is specifically used to collect pathological slice images containing normal breast cells and breast cancer cells, perform preprocessing operations on the collected pathological slice images, including denoising and contrast enhancement, and then uniformly crop the images to a size of 640×640 pixels and save them to meet the needs of subsequent model training and verification.
[0025] Furthermore, the data annotation module specifically includes:
[0026] The pre-processed image is annotated to mark the location and category information of the cells, and a label is generated and saved. The category information includes normal cells and abnormal cells.
[0027] Furthermore, the dataset segmentation module specifically includes: performing data enhancement on the labeled dataset, and segmenting the dataset into a training set and a validation set according to a 7:3 ratio.
[0028] Furthermore, the improved YOLOv7 network structure specifically includes: a backbone part and a head part, three ASFF modules are integrated into the three ELAN-H modules in the head part, and a CBAM module and a CBS module are connected after each ASFF module;
[0029] ASFF fuses two adjacent low-level features and gradually incorporates higher-level features into the fusion process. The CBAM module is introduced after the ASFF module to avoid large semantic gaps between non-adjacent levels. The ASFF module enhances the detection capability of multi-scale cell targets by adaptively fusing feature maps of different levels, improves the flexibility and accuracy of feature fusion, and enhances the generalization ability of the model. After the CBAM attention mechanism combines channel and spatial attention, it enhances the model's attention to key features and improves feature representation capabilities to adapt to dense cell target detection.
[0030] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0031] The model of the present invention uses ASFF to fuse adjacent low-level features and gradually incorporate higher-level features, and is followed by a CBAM module, which can effectively avoid the large semantic gap between non-adjacent levels of breast cell features. The ASFF module adaptively fuses feature maps of different levels, which not only enhances the detection capability of multi-scale breast cell targets, but also improves the flexibility and accuracy of feature fusion, thereby improving the generalization ability of the model. When detecting breast cells, it greatly enhances the detection capability of multi-scale cell targets such as tiny early cancer cells and larger normal breast tissue cells, and improves the accuracy of identifying various types of cells. At the same time, the CBAM attention mechanism is combined with channel and spatial attention to enhance the model's attention to key features while improving the feature representation capability. It performs particularly well in the detection of small and dense targets, improves the recognition accuracy of pathological cells such as breast cancer cells, facilitates accurate early diagnosis of breast cancer, and provides doctors with a more reliable diagnostic basis, thereby promoting the development of breast pathology detection technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0033] Figure 1 This is a flowchart of an execution method for detecting breast pathological cells in images based on an improved YOLOv7 model in Example 1 of the present invention;
[0034] Figure 2 Schematic diagram of the structure of a breast pathological cell image detection system based on an improved YOLOv7 model in Example 2 of the present invention;
[0035] Figure 3 Schematic diagram of the data set collected for the present invention.
[0036] Figure 4 Schematic diagram of the data set used in data annotation in the present invention.
[0037] Figure 5This is a schematic diagram of the network structure of the improved YOLOv7 of the present invention.
[0038] Figure 6 for Figure 5 Schematic diagram of the specific structure of some modules.
[0039] Figure 7 Schematic diagram of the structure of the CBAM attention mechanism of the present invention. DETAILED DESCRIPTION
[0040] The embodiments of the present application provide a breast pathology cell image detection method and system based on an improved YOLOv7 model. For breast pathology section cell detection, the improved YOLOv7 model is used to introduce multi-scale feature extraction and attention mechanisms to improve detection accuracy and robustness, making it suitable for early diagnosis of breast cancer.
[0041] The technical scheme in the embodiment of the present application, overall idea is as follows: because mammary cells are significantly different in form, size and distribution, normal epithelial cells and cancer cells are clearly distinguished in morphological structure, and cancer cells have features such as nuclear enlargement, irregular morphology, and abnormal nuclear-cytoplasmic ratio. If traditional YOLOv7 network is adopted, non-adjacent level features are directly fused, and key information can be lost due to the large semantic gap, which has a strong impact on detection accuracy. For this reason, the present invention designs a breast pathology cell image detection scheme based on improved YOLOv7 model, first collects breast pathology slice image data and performs pre-processing, then the cells obtained in the data set are frame-marked, including two categories of normal cells and abnormal cells, and a labeling file is generated. Then, the labeled data set is divided into training set and verification set after data enhancement. This paper improves the traditional YOLOv7 network by adding the ASFF multi-scale fusion module and the CBAM attention mechanism, adaptively fusing feature maps at different levels. When detecting breast cells, it greatly enhances the detection capability of multi-scale cell targets such as tiny early cancer cells and larger normal breast tissue cells, improves the accuracy of identifying various types of cells, and can effectively avoid the loss of key information due to large semantic gaps. At the same time, CBAM focuses on the unique features of cancer cells, enhances the feature representation capability, and further improves the recognition accuracy of cancer cells and other pathological cells, facilitating accurate early diagnosis of breast cancer.
[0042] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0043] Example 1
[0044] This embodiment provides a method for detecting breast pathological cell images based on an improved YOLOv7 model. Figure 1 As shown, the method includes:
[0045] Step S1: collecting breast pathological slice images to generate a data set;
[0046] Step S2: label the cells in the dataset with boxes;
[0047] Step S3: Split the labeled data set into a training set and a validation set;
[0048] Step S4: Build a YOLOv7 network, add ASFF and CBAM modules to the three branches of the YOLOv7 network respectively, and obtain an improved YOLOv7 network;
[0049] Step S5: Input the training set into the improved YOLOv7 network for training and verification to obtain a high-precision breast pathology section cell detection model.
[0050] Preferably, the step S1 is specifically as follows: collecting pathological slice images containing normal breast cells and breast cancer cells, performing preprocessing operations on the collected pathological slice images, specifically operations including denoising and contrast enhancement, and then uniformly cropping the images to a size of 640×640 pixels, such as Figure 3 As shown, it is saved to meet the needs of subsequent model training and verification.
[0051] Preferably, the step S2 specifically includes:
[0052] like Figure 4 As shown, the pre-processed image is annotated to mark the location and category information of the cells, and a label is generated and saved. The category information includes normal cells and abnormal cells.
[0053] Preferably, step S3 specifically includes: performing data augmentation on the labeled data set, dividing the data set into a training set and a validation set at a ratio of 7:3, wherein, in terms of data augmentation, the original breast pathology slice images are rotated, flipped, randomly cropped, etc., to expand the data set size and improve the generalization ability of the model.
[0054] Preferably, the improved YOLOv7 network structure specifically includes: a Backbone part and a Head part, three ASFF modules are integrated into the three ELAN-Hs in the Head part, and a CBAM module and a CBS module are connected after each ASFF module;
[0055] ASFF fuses two adjacent low-level features and gradually incorporates higher-level features into the fusion process. The CBAM module is introduced after the ASFF module to avoid large semantic gaps between non-adjacent levels. The ASFF module enhances the detection capability of multi-scale cell targets by adaptively fusing feature maps of different levels, improves the flexibility and accuracy of feature fusion, and enhances the generalization ability of the model. After the CBAM attention mechanism combines channel and spatial attention, Figure 7 As shown in the figure, the model's attention to key features is enhanced, and the feature representation ability is improved to adapt to dense cell target detection.
[0056] Specifically, the Backbone part of the improved YOLOv7 is the existing structure and does not change. Only the Head part is adjusted. The complete structure of the improved YOLOv7 is as follows: Figure 5 Shown and Figure 6 shown.
[0057] In the Backbone section ( Figure 5 (left part of the image): The input image first passes through a series of CBS modules and ELAN modules for feature extraction, and then passes through the MP module for downsampling to reduce the size of the feature map. After passing through multiple ELAN and MP modules, the feature map is output by the CBS module.
[0058] In the Neck part (such as Figure 5 Middle part): The feature map undergoes multi-scale feature fusion through the CAT, UP, and ELAN-H modules. The feature map is further processed by the SPPCSPC module and then fused with the feature map from Backbone through the CAT and UP modules. The fused feature map is further processed by the ELAN-H module.
[0059] In the head (right, within the red box), feature maps from the neck undergo adaptive spatial feature fusion via the ASFF module. The fused feature maps are further processed by the CBS and CBAM modules. Finally, the CBS module outputs feature maps of different scales, which are used for object detection at three different scales (1 / 8, 1 / 16, and 1 / 32).
[0060] Among them, CBS is a common basic building block in deep learning and a basic convolutional module used for feature extraction and stable training. ELAN is the abbreviation for Efficient Layer Aggregation Network, an efficient layer aggregation network structure for feature extraction and fusion. MP stands for Max Pooling, which is used for downsampling to reduce the size of feature maps. CAT stands for Concatenation, which concatenates feature maps from different sources in the channel dimension. UP stands for Upsampling, which is used to increase the size of feature maps. SPPC (Spatial Pyramid Pooling-CrossStage Partial Connections) is a network structure design used to improve the detection ability of object detection models for multi-scale objects. This structure achieves feature fusion and gradient optimization by combining spatial pyramid pooling (SPP) and cross-stage partial connections (CSP). ELAN-H is a variant of ELAN that includes more feature layer fusion operations. ELAN-H further enhances feature extraction capabilities through multi-layer feature concatenation and aggregation, making it particularly suitable for small object detection. ASFF stands for Adaptive Spatial Feature Fusion, an adaptive spatial feature fusion module for fusing features at different scales. CBAM stands for Convolutional Block Attention Module, an attention mechanism module for enhancing the representation capabilities of feature maps.
[0061] In order to fully verify the impact of the improved method on the network detection performance, the stochastic gradient descent (SGD) optimizer was uniformly used during the training process, and the initial learning rate was set to 0.01. At the same time, the cosine annealing learning rate adjustment strategy was used, and the learning rate was dynamically reduced during the training process to prevent the model from falling into a local optimal solution. Specifically, for example, the batch size of the training process was set to 16, and accelerated calculations were performed in the NVIDIA RTX 3090 GPU environment. As the training rounds progressed, it was observed that the loss function value continued to decrease. After training to 60 epochs, the loss curve of the model tended to be stable, and the detection accuracy no longer increased significantly, indicating that the model has basically converged. The verification results are as follows Figure 6 As shown in the figure, it can be seen that this method can accurately identify the location of cells and has strong robustness.
[0062] Based on the same inventive concept, this application also provides a system corresponding to the method in Example 1, see Example 2 for details.
[0063] Example 2
[0064] This embodiment provides a breast pathological cell image detection system based on an improved YOLOv7 model. Figure 2 As shown, the system includes:
[0065] Data acquisition module, used to collect breast pathology slice images and generate data sets;
[0066] Data annotation module, used to perform box annotation on cells in the dataset;
[0067] The dataset splitting module is used to split the labeled dataset into training set and validation set;
[0068] The model building module is used to build the YOLOv7 network. The ASFF and CBAM modules are added to the three branches of the YOLOv7 network to obtain the improved YOLOv7 network.
[0069] The training module is used to input the training set into the improved YOLOv7 network for training and verification to obtain a high-precision breast pathology section cell detection model.
[0070] Preferably, the data acquisition module is specifically configured to acquire pathological slice images containing normal breast cells and breast cancer cells, perform preprocessing operations on the acquired pathological slice images, including denoising and contrast enhancement, and then crop the images to a uniform size of 640×640 pixels, such as Figure 3 As shown, it is saved to meet the needs of subsequent model training and verification.
[0071] Preferably, the data annotation module specifically includes:
[0072] like Figure 4 As shown, the pre-processed image is annotated to mark the location and category information of the cells, and a label is generated and saved. The category information includes normal cells and abnormal cells.
[0073] Preferably, the dataset segmentation module specifically includes: performing data augmentation on the labeled dataset, dividing the dataset into a training set and a validation set at a ratio of 7:3. In terms of data augmentation, the original breast pathology slice images are rotated, flipped, randomly cropped, and other operations are performed to expand the dataset size and improve the generalization ability of the model.
[0074] Preferably, the improved YOLOv7 network structure specifically includes: a Backbone part and a Head part, three ASFF modules are integrated into the three ELAN-Hs in the Head part, and a CBAM module and a CBS module are connected after each ASFF module;
[0075] ASFF fuses two adjacent low-level features and gradually incorporates higher-level features into the fusion process. The CBAM module is introduced after the ASFF module to avoid large semantic gaps between non-adjacent levels. The ASFF module enhances the detection capability of multi-scale cell targets by adaptively fusing feature maps of different levels, improves the flexibility and accuracy of feature fusion, and enhances the generalization ability of the model. After the CBAM attention mechanism combines channel and spatial attention, Figure 7 As shown in the figure, the model focuses on key features and improves feature representation capabilities to adapt to dense cell target detection. Figure 7 The calculation process of the CBAM module is as follows:
[0076]
[0077] Among them, F represents the input feature, F' represents the output feature, and M C represents the channel attention mechanism, M S represents the spatial attention mechanism, Represents element-wise multiplication.
[0078] Specifically, the Backbone part of the improved YOLOv7 is the existing structure and does not change. Only the Head part is adjusted. The complete structure of the improved YOLOv7 is as follows: Figure 5 Shown and Figure 6 shown.
[0079] In the Backbone section ( Figure 5 (left part of the image): The input image first passes through a series of CBS modules and ELAN modules for feature extraction, and then passes through the MP module for downsampling to reduce the size of the feature map. After passing through multiple ELAN and MP modules, the feature map is output by the CBS module.
[0080] In the Neck part (such as Figure 5 Middle part): The feature map undergoes multi-scale feature fusion through the CAT, UP, and ELAN-H modules. The feature map is further processed by the SPPCSPC module and then fused with the feature map from Backbone through the CAT and UP modules. The fused feature map is further processed by the ELAN-H module.
[0081] In the head (right, within the red box), feature maps from the neck undergo adaptive spatial feature fusion via the ASFF module. The fused feature maps are further processed by the CBS and CBAM modules. Finally, the CBS module outputs feature maps of different scales, which are used for object detection at three different scales (1 / 8, 1 / 16, and 1 / 32).
[0082] Among them, CBS is a common basic building block in deep learning and a basic convolutional module used for feature extraction and stable training. ELAN is the abbreviation for Efficient Layer Aggregation Networks, an efficient layer aggregation network structure used for feature extraction and fusion. MP stands for Max Pooling, which is used for downsampling to reduce the size of feature maps. CAT stands for Concatenation, which concatenates feature maps from different sources in the channel dimension. UP stands for Upsampling, which is used to increase the size of feature maps. SPPC (Spatial Pyramid Pooling-CrossStage Partial Connections) is a network structure design used to improve the detection ability of object detection models for multi-scale objects. This structure achieves feature fusion and gradient optimization by combining spatial pyramid pooling (SPP) and cross-stage partial connections (CSP). ELAN-H is a variant of ELAN that includes more feature layer fusion operations. ELAN-H further enhances feature extraction capabilities through multi-layer feature concatenation and aggregation, making it particularly suitable for small object detection. ASFF stands for Adaptive Spatial Feature Fusion, an adaptive spatial feature fusion module for fusing features at different scales. CBAM stands for Convolutional Block Attention Module, an attention mechanism module for enhancing the representation capabilities of feature maps.
[0083] In order to fully verify the impact of the improved method on the network detection performance, the stochastic gradient descent (SGD) optimizer was uniformly used during the training process, and the initial learning rate was set to 0.01. At the same time, the cosine annealing learning rate adjustment strategy was used, and the learning rate was dynamically reduced during the training process to prevent the model from falling into a local optimal solution. Specifically, for example, the batch size of the training process was set to 16, and accelerated calculations were performed in the NVIDIA RTX 3090 GPU environment. As the training rounds progressed, it was observed that the loss function value continued to decrease. After training to 60 epochs, the loss curve of the model tended to be stable, and the detection accuracy no longer increased significantly, indicating that the model has basically converged. The verification results are as follows Figure 6 As shown in the figure, it can be seen that this method can accurately identify the location of cells and has strong robustness.
[0084] Since the system described in the second embodiment of the present invention is the system used to implement the method of the first embodiment of the present invention, those skilled in the art will be able to understand the specific structure and variations of the system based on the method described in the first embodiment of the present invention, and therefore will not be described in detail here. All systems used in the method of the first embodiment of the present invention fall within the scope of protection of the present invention.
[0085] The technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: The present invention utilizes YOLOv7 in conjunction with ASFF and CBAM to construct a breast pathology section cell detection model. This effectively avoids the problem of losing key information due to large semantic gaps during the fusion of features at non-adjacent levels, which seriously affects detection accuracy. It also improves the flexibility and accuracy of feature fusion, enabling the model to efficiently extract features and enhance generalization capabilities even for images of varying slice quality and cell density. Furthermore, because the importance of cell features varies across different regions of breast pathology sections, key features are crucial for determining whether cells are pathological. For example, when identifying cancer cells, CBAM can focus on features unique to cancer cells, enhancing feature representation capabilities and further improving the accuracy of identifying cancer cells and other pathological cells. This facilitates accurate early diagnosis of breast cancer and provides doctors with reliable diagnostic evidence at an earlier stage, allowing for timely intervention and improved prognosis.
[0086] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method for detecting breast pathological cells in images based on an improved YOLOv7 model, characterized by: The method comprises: Step S1: collecting breast pathological slice images to generate a data set; Step S2: label the cells in the dataset with boxes; Step S3: Split the labeled data set into a training set and a validation set; Step S4: Build a YOLOv7 network, add ASFF and CBAM modules to the three branches of the YOLOv7 network respectively, and obtain an improved YOLOv7 network; Step S5: Input the training set into the improved YOLOv7 network for training and verification to obtain a high-precision breast pathology section cell detection model.
2. A method for detecting breast pathological cells based on an improved YOLOv7 model according to claim 1, characterized in that: Step S1 specifically includes: collecting pathological slice images containing normal breast cells and breast cancer cells, performing preprocessing operations on the collected pathological slice images, including denoising and contrast enhancement, and then uniformly cropping the images to a size of 640×640 pixels and saving them to meet the needs of subsequent model training and verification.
3. A breast pathological cell image detection method based on an improved YOLOv7 model according to claim 1, characterized in that: The step S2 specifically includes: The pre-processed image is annotated to mark the location and category information of the cells, and a label is generated and saved. The category information includes normal cells and abnormal cells.
4. A method for detecting breast pathological cells based on an improved YOLOv7 model according to claim 1, characterized in that: The step S3 specifically includes: performing data augmentation on the labeled data set, and dividing the data set into a training set and a validation set in a ratio of 7:
3.
5. The method for detecting breast pathological cells based on an improved YOLOv7 model according to claim 1, wherein: The improved YOLOv7 network structure specifically includes a Backbone part and a Head part. Three ASFF modules are integrated into the three ELAN-H modules in the Head part, and a CBAM module and a CBS module are connected after each ASFF module. ASFF fuses two adjacent low-level features and gradually incorporates higher-level features into the fusion process. The CBAM module is introduced after the ASFF module to avoid large semantic gaps between non-adjacent levels. The ASFF module enhances the detection capability of multi-scale cell targets by adaptively fusing feature maps of different levels, improves the flexibility and accuracy of feature fusion, and enhances the generalization ability of the model. After the CBAM attention mechanism combines channel and spatial attention, it enhances the model's attention to key features and improves feature representation capabilities to adapt to dense cell target detection.
6. A breast pathological cell image detection system based on an improved YOLOv7 model, characterized by: The system comprises: Data acquisition module, used to collect breast pathology slice images and generate data sets; Data annotation module, used to perform box annotation on cells in the dataset; The dataset splitting module is used to split the labeled dataset into training set and validation set; The model building module is used to build the YOLOv7 network. The ASFF and CBAM modules are added to the three branches of the YOLOv7 network to obtain the improved YOLOv7 network. The training module is used to input the training set into the improved YOLOv7 network for training and verification to obtain a high-precision breast pathology section cell detection model.
7. The breast pathological cell image detection system based on the improved YOLOv7 model according to claim 6, characterized in that: The data acquisition module is specifically used to collect pathological slice images containing normal breast cells and breast cancer cells, perform preprocessing operations on the collected pathological slice images, including denoising and contrast enhancement, and then uniformly crop the images to a size of 640×640 pixels and save them to meet the needs of subsequent model training and verification.
8. The breast pathological cell image detection system based on the improved YOLOv7 model according to claim 6, characterized in that: The data annotation module specifically includes: The pre-processed image is annotated to mark the location and category information of the cells, and a label is generated and saved. The category information includes normal cells and abnormal cells.
9. The breast pathological cell image detection system based on the improved YOLOv7 model according to claim 6, characterized in that: The dataset segmentation module specifically includes: performing data enhancement on the labeled dataset and splitting the dataset into a training set and a validation set in a 7:3 ratio.
10. The breast pathological cell image detection system based on the improved YOLOv7 model according to claim 6, characterized in that: The improved YOLOv7 network structure specifically includes a Backbone part and a Head part. Three ASFF modules are integrated into the three ELAN-H modules in the Head part, and a CBAM module and a CBS module are connected after each ASFF module. ASFF fuses two adjacent low-level features and gradually incorporates higher-level features into the fusion process. The CBAM module is introduced after the ASFF module to avoid large semantic gaps between non-adjacent levels. The ASFF module enhances the detection capability of multi-scale cell targets by adaptively fusing feature maps of different levels, improves the flexibility and accuracy of feature fusion, and enhances the generalization ability of the model. After the CBAM attention mechanism combines channel and spatial attention, it enhances the model's attention to key features and improves feature representation capabilities to adapt to dense cell target detection.
Citation Information
Cited By
Digestive enteritis pathological section image adaptive feature processing method
CN120953150A
An Adaptive Feature Processing Method for Pathological Section Images of Gastroenteritis
CN120953150B
Medical image detection method based on cross-channel and cell density adaptive mechanism
CN121414749A