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.

Updating the dataset for segmentation

369

convolutions, in order to use information across slices. The memory usage of a straightforward

implementation would be considerably greater: that is, we would have to chop

up the CT scan. Also, the fact that pixel spacing in the Z direction is much larger than

in-plane makes a nodule less likely to be present across many slices. These considerations

make a fully 3D approach less attractive for our purposes. Instead, we’ll adapt

our 3D data to be segmented a slice at a time, providing adjacent slices for context (for

example, detecting that a bright lump is indeed a blood vessel gets much easier alongside

neighboring slices). Since we’re sticking with presenting the data in 2D, we’ll use

channels to represent the adjacent slices. Our treatment of the third dimension is similar

to how we applied a fully connected model to images in chapter 7: the model will

have to relearn the adjacency relationships we’re throwing away along the axial direction,

but that’s not difficult for the model to accomplish, especially with the limited

number of slices given for context owing to the small size of the target structures.

13.5 Updating the dataset for segmentation

Our source data for this chapter remains unchanged: we’re consuming CT scans and

annotation data about them. But our model expects input and will produce output of

a different form than we had previously. As we hint at in step 2B of figure 13.9, our

previous dataset produced 3D data, but we need to produce 2D data now.

The original U-Net implementation did not use padded convolutions, which

means while the output segmentation map was smaller than the input, every pixel of

that output had a fully populated receptive field. None of the input pixels that fed

1. Segmentation

UNet

2. Update:

2a. Model

T/F

2b. Dataset

t

3. Results

2c. Training

Figure 13.9 The outline of this chapter, with a focus on the changes needed for our

segmentation dataset

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

Saved successfully!

Ooh no, something went wrong!