15 Using segmentation to find suspected nodules
This chapter covers
- Modifying the data to be used for a 2D segmentation problem
- Performing segmentation with Segment Anything
- Understanding mask prediction using Segformer
- Fine-tuning a segmentation model
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 that determines whether CT scan candidates are nodules or not nodules.
However, we are still operating in a somewhat artificial environment since we require hand-annotated nodule candidate information (our annotations.csv
and candidates.csv
files) to load the candidates into our classifier. How can we automatically determine which parts of a CT scan are nodule candidates? This is the question we will address in this chapter.
As we explained at the start, our project uses multiple steps to solve the problem of locating possible nodules and identifying as nodules or not. This is a common approach among practitioners, while in deep learning research there is a tendency to demonstrate the ability of individual models to solve complex problems in an end-to-end fashion. The multistage project design we use in this book gives us a good excuse to introduce new concepts step by step.