This project examines the segmentation of tumor patches within whole-slide images (WSI) and presents the findings from 3 different modeling approaches; CNN and ResNet as binary classifiers, and U-net architecture for segmentation tasks. While the U-net design creates a binary mask characterizing the tumor locations, the CNN architecture provides a binary output showing the presence or absence of tumors in a specific patch.
Figure 1: Block Schema of The Proposed Pipeline.
Given the high-resolution nature of WSI images, they are typically too large to be directly input into a model. Consequently, the proposed pipeline is as shown in the Figure , WSIs are divided into smaller images (256x256 pixels) called patches, along with corresponding mask images that indicate the viable tumor area. These mask patches serve as the ground truth for tumor regions. The generated patches are then given to an AI Model to be trained. The AI architecture used in this project can be U-net for pixel-wise classification, CNN and ResNet for patch-wise classification. The results of both models are then evaluated using several metrics such as IoU and F1-score.
Patches that have less than 80% cancerous area are considered Partially tumorous.
Figure 2.0: Patched Image Examples.
Figure 2.1: WSI Image.
In the training dataset, there is a noticeable imbalance between the number of noncancerous patches and cancerous ones. This imbalance may adversely affect the training process, as the model may become biased towards the majority class (noncancerous patches) and might not perform well in identifying the minority class (cancerous patches). This issue could lead to a higher false-negative rate, which is not desirable in medical applications where accurate detection of cancerous regions is crucial. To mitigate the effects of this class imbalance, several techniques is used for both pixel-wise segmentation and patch-wise classification tasks.
The CNN and U-Net models were trained on 2 different amount of data: 20 WSIs and 45 WSIs. In this case, it is an expected result that the success will increase with the increase in the number of data. However, the increase in the amount of data made the test and train processes more recourse consuming in terms of time and hardware.
Figure 3.0: Results of CNN trained on 20 WSI (Partially Tumorous patches labeled as Tumorous)
Figure 3.1: Results of CNN trained on 20 WSI (Partially Tumorous patches labeled as Non-Tumorous)
Figure 3.2: Results of CNN trained on 45 WSI (Partially Tumorous patches labeled as Tumorous)
It has been observed that training the models on WSIs with a balanced distribution give better performance. The reason for this is that the models trained on unbalanced distributions have a chance to overfit, resulting in bad performance.
Different distributions and data size were tested to find the best performing model. As shown in the Figure 3.3 and Figure 3.5 when training U-net on only cancerous data the model becomes overfitted towards cancerous data resulting in 0 accuracy on benign data. Also, Figure 3.5 shows that when training U-Net on 45 WSIs with 50% benign and 50% malignant data the model becomes biased towards benign data. This can be because of the huge amount of benign patches in the 45 WSIs. It is crucial for U-net to balance the data used for training in order to get satisfying results.
Figure 3.3: Results of U-Net trained on 20 Whole Slide Images (WSIs).
Figure 3.4: Over all results of the U-net trained on 20 WSI
Figure 3.5: Results of U-Net trained on 45 Whole Slide Images (WSIs).
Figure 3.6: Over all results of the models trained on 45 WSI
Figure 4.0: Example results of the trained models Model 1*: Best performing U-Net model trained on 20 WSI Model 2*: Best performing U-Net model trained on 45 WSI
Figure 4.1: Segmentation of Training_phase_2_048
Figure 4.2: Segmentation of Training_phase_2_050
Muhannad Tuameh - muhannadtumah@gmail.com
Emre Arslanoğlu - emrears1965@gmail.com
Project Link: https://github.com/muhannad125/cancer_segmentation