liveBook · Manning

Chapter 11: Neural networks for image classification and object detection

What you will learn in chapter 11 of Math and Architectures of Deep Learning

This introduction distinguishes image classification from object detection, explains why CNNs replaced hand-crafted vision features, and previews the chapter’s deep-learning architectures and applications.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction distinguishes image classification from object detection, explains why CNNs replaced hand-crafted vision features, and previews the chapter’s deep-learning architectures and applications.

Key terms: image classification, object detection, computer vision, bounding box, (xtl, ytl), (xbr, ybr), convolutional neural networks, CNNs, hand-crafted image features, feature learning

11.1 CNNs for image classification: LeNet

Introduces LeNet as a multi-convolutional-layer network that classifies resized MNIST digit images into one of ten classes.

Key terms: MNIST data set, training set, test set, image classification, label, LeNet, convolutional layer, 5 × 5 kernel, stride, feature map

11.1.1 PyTorch- Implementing LeNet for image classification on MNIST

11.2 Toward deeper neural networks

This section explains why deeper convolutional networks are needed for complex image classification and how stacks of small convolutions increase expressiveness while matching a larger receptive field with fewer parameters.

Key terms: expressive power, nonlinearity, learnable parameters, convolutional layers, receptive field, feature map, 5 × 5 convolution, 3 × 3 convolution, stride, zero padding

11.2.1 VGG (Visual Geometry Group) Net

This section explains VGG’s small-filter deep CNN design, its use of ReLU, and how its configurable convolutional backbone and classifier can be implemented in PyTorch.

Key terms: VGG, 3 × 3 convolution filters, receptive field, ReLU, expressive power, parameters, conv block, max pool layer, same padding, stride

11.2.2 Inception: Network-in-network paradigm

This section explains how Inception_v1 processes image features at multiple scales while controlling computation through parallel branches and 1×1 dimensionality reduction.

Key terms: Inception module, kernel size, scale, 1 × 1 convolution, 3 × 3 convolution, 5 × 5 convolution, naive Inception block, dimensionality reduction, input channels, output features

11.2.3 ResNet: Why stacking layers to add depth does not scale

This section explains why simply stacking more layers can worsen a network and how ResNet residual blocks and skip connections make very deep CNNs practical.

Key terms: degradation problem, training error, test error, overfitting, vanishing gradients, exploding gradients, residual learning, residual, identity function, shortcut connection

11.2.4 PyTorch Lightning

This section shows how PyTorch Lightning organizes and automates end-to-end LeNet training and inference for MNIST while leaving model research logic under the developer’s control.

Key terms: PyTorch Lightning, boilerplate code, research logic, multi-GPU training, floating-point 16, TPU, DataModule, LightningDataModule, LightningModule, Trainer

11.3 Object detection: A brief history

This section distinguishes object detection from image classification and introduces the region-based classification idea behind R-CNN.

Key terms: image classification, object detection/localization problem, object categories, bounding-box coordinates, region-based CNN, R-CNN, regions, image classifier deep neural network, confidence

11.3.1 R-CNN

This section explains the original R-CNN object-detection pipeline, from proposing candidate regions through CNN feature extraction to classification and box refinement.

Key terms: R-CNN, selective search, regions of interest, region proposals, feature extraction, classification, fixed-sized inputs, warped, deep convolution neural network, ground-truth (GT) class

11.3.2 Fast R-CNN

This section explains how Fast R-CNN makes R-CNN object detection much faster and more end-to-end by sharing CNN feature extraction across region proposals and jointly performing classification and bounding-box regression.

Key terms: R-CNN, region proposal, forward pass, selective search, SVM, bounding-box regressor, Fast R-CNN, RoI pooling, region of interest, RoI

11.3.3 Faster R-CNN

This section introduces Faster R-CNN as an object detector that replaces CPU-based selective search with a learned region proposal network while sharing convolutional features with Fast R-CNN processing.

Key terms: Fast R-CNN, selective search, region proposals, CPU, Faster R-CNN, FRCNN, near-real-time object detectors, region proposal network, RPN, R-CNN module

11.4 Faster R-CNN: A deep dive

This section introduces the end-to-end Faster R-CNN architecture, tracing how an input image becomes object classes and bounding boxes.

Key terms: Faster R-CNN, convolutional backbone, feature maps, region proposal network, RPN, regions of interest, softmax probability estimates, K object classes, background class, bounding-box coordinates

11.4.1 Convolutional backbone

This subsection explains how Faster R-CNN uses a modified VGG-16 convolutional backbone to produce shared lower-resolution feature maps for its detection modules.

Key terms: FRCNN, VGG-16, convolutional backbone, RPN, R-CNN, conv5, feature map, max pooling, spatial size, conv block

11.4.2 Region proposal network

This section explains how a Faster R-CNN region proposal network generates, trains, and filters anchor-based object proposals for an image.

Key terms: region proposal network, RPN, convolutional feature map, anchor, objectness, box-regression layer, anchor configurations, scale, aspect ratio, sliding window

11.4.3 Fast R-CNN

This section explains how the Fast R-CNN stage turns RPN proposals into object classes and refined bounding boxes using RoI pooling, supervised training, and class-specific post-processing.

Key terms: RoI pooling, conv feature map, RoI, subsampling factor, max pooling, RoIAlign, FC layers, classifier, regressor, softmax

11.4.4 Training the Faster R-CNN

This section explains why Faster R-CNN trains its RPN and Fast R-CNN components with a shared convolutional backbone, comparing alternate optimization with faster approximate joint training.

Key terms: RPN, Fast R-CNN, convolutional layers, convolutional backbone, shared convolutional layers, alternate optimization, AltOpt, region proposals, initialize, approximate joint training

11.4.5 Other object-detection paradigms

This section compares YOLO, SSD, and FPN as object-detection paradigms in terms of their architectures and speed–accuracy trade-offs relative to Faster R-CNN.

Key terms: YOLO, single-stage detector, bounding boxes, class probabilities, full image, two-stage detector, SSD, single-stage network, default bounding boxes, anchors

11.5 Summary

This summary recaps CNN architectures for increasingly capable image classification and the two-stage Faster R-CNN pipeline for object detection and localization.

Where this is used later

Concepts explained in this chapter

← Chapter 10: Convolutions in neural networks Chapter 12: Manifolds, homeomorphism, and neural networks →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.