20.03.2021 Views

Deep-Learning-with-PyTorch

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

432 CHAPTER 14 End-to-end nodule analysis, and where to go next

14.6 What we see when we diagnose

Following along with steps 3a, 3b, and 3c in figure 14.16, we now need to run the full

pipeline from the step 3a segmentation on the left to the step 3c malignancy model on

the right. The good news is that almost all of our code is in place already! We just need

to stitch it together: the moment has come to actually write and run our end-to-end

diagnosis script.

1. Nodule Candidate Generation

1a. Segmentation

n 1b. Grouping 1c. sample tuples

((...,(..., IRC),

...

(..., IRC))

2. Nodule and malignancy claSsification

2a. Nodule claSsification 2b. ROC/AUC Metrics 2c. fine-tuning malignancy model

3. End-to-end detection

3a. (..., IRC) 3b. Is nodule? 3c. is Malignant?

Figure 14.16

The end-to-end project we are implementing in this chapter, with a focus on end-to-end detection

We saw our first hints at handling the malignancy model back in the code in section

14.3.3. If we pass an argument --malignancy-path to the nodule_analysis call, it

runs the malignancy model found at this path and outputs the information. This

works for both a single scan and the --run-validation variant.

Be warned that the script will probably take a while to finish; even just the 89 CTs

in the validation set took about 25 minutes. 7

7

Most of the delay is from SciPy’s processing of the connected components. At the time of writing, we are not

aware of an accelerated implementation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!