13 Using segmentation to find suspected nodules

 

This chapter covers

  • Segmenting data with a pixel-to-pixel model
  • Performing segmentation with U-Net
  • Understanding mask prediction using Dice loss
  • Evaluating a segmentation model’s performance

In the last four chapters, we have accomplished a lot. We’ve learned about CT scans and lung tumors, datasets and data loaders, and metrics and monitoring. We have also applied many of the things we learned in part 1, and we have a working classifier. We are still operating in a somewhat artificial environment, however, since we require hand-annotated nodule candidate information to load into our classifier. We don’t have a good way to create that input automatically. Just feeding the entire CT into our model--that is, plugging in overlapping 32 × 32 × 32 patches of data--would result in 31 × 31 × 7 = 6,727 patches per CT, or about 10 times the number of annotated samples we have. We’d need to overlap the edges; our classifier expects the nodule candidate to be centered, and even then the inconsistent positioning would probably present issues.

13.1 Adding a second model to our project

13.2 Various types of segmentation

13.3 Semantic segmentation: Per-pixel classification

13.3.1 The U-Net architecture

13.4 Updating the model for segmentation

13.4.1 Adapting an off-the-shelf model to our project

13.5 Updating the dataset for segmentation

13.5.1 U-Net has very specific input size requirements

13.5.2 U-Net trade-offs for 3D vs. 2D data

13.5.3 Building the ground truth data

13.5.4 Implementing Luna2dSegmentationDataset

13.5.5 Designing our training and validation data

13.5.6 Implementing TrainingLuna2dSegmentationDataset

13.5.7 Augmenting on the GPU

13.6 Updating the training script for segmentation

13.6.2 Using the Adam optimizer