20.03.2021 Views

Deep-Learning-with-PyTorch

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

246 CHAPTER 9 Using PyTorch to fight cancer

0

100

200

index 522 row 267 col 367

600

600

500

500

400

400

300

300

300

400

200

100

200

100

500

0 100 200 300 400 500

0

0

100 200 300 400 500

0

0

100 200 300 400 500

Figure 9.5 A CT scan with approximately 1,000 structures that look like tumors to the untrained eye. Exactly one

has been identified as a nodule when reviewed by a human specialist. The rest are normal anatomical structures

like blood vessels, lesions, and other non-problematic lumps.

You might have seen elsewhere that end-to-end approaches for detection and classification

of objects are very successful in general vision tasks. TorchVision includes endto-end

models like Fast R-CNN/Mask R-CNN, but these are typically trained on

hundreds of thousands of images, and those datasets aren’t constrained by the number

of samples from rare classes. The project architecture we will use has the benefit of

working well with a more modest amount of data. So while it’s certainly theoretically

possible to just throw an arbitrarily large amount of data at a neural network until it

learns the specifics of the proverbial lost needle, as well as how to ignore the hay, it’s

going to be practically prohibitive to collect enough data and wait for a long enough

time to train the network properly. That won’t be the best approach since the results are

poor, and most readers won’t have access to the compute resources to pull it off at all.

To come up with the best solution, we could investigate proven model designs that

can better integrate data in an end-to-end manner. 3 These complicated designs are

capable of producing high-quality results, but they’re not the best because understanding

the design decisions behind them requires having mastered fundamental concepts

first. That makes these advanced models poor candidates to use while teaching

those same fundamentals!

That’s not to say that our multistep design is the best approach, either, but that’s

because “best” is only relative to the criteria we chose to evaluate approaches. There are

many “best” approaches, just as there are many goals we could have in mind as we work

on a project. Our self-contained, multistep approach has some disadvantages as well.

Recall the GAN game from chapter 2. There, we had two networks cooperating to

produce convincing forgeries of old master artists. The artist would produce a candidate

work, and the scholar would critique it, giving the artist feedback on how to

3 For example, Retina U-Net (https://arxiv.org/pdf/1811.08661.pdf) and FishNet (http://mng.bz/K240).

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

Saved successfully!

Ooh no, something went wrong!