02Chapter 2: Measuring box overlap with IoUEvery stage of an object detector has to answer one question: how well does this box match that box? Intersection over Union (IoU) is the standard answer. This chapter defines IoU, implements it, and covers its edge cases and limits. Later chapters use it for anchor matching, non-maximum suppression5 min read
03Chapter 3: Backbones turn pixels into feature mapsThis chapter assumes you know how convolutional layers work, what a stride is, and how to read a tensor shape such as (C, H, W). Every detector in this tutorial starts from the same step. A network called the backbone converts the image into a grid of feature vectors. Anchors, proposals, and DETR'5 min read
04Chapter 4: Anchors: reference boxes at every locationThis chapter assumes you know what a feature map is, how IoU is computed (covered earlier), and basic NumPy. You will learn what anchors are, how to generate them, and where the design breaks down.4 min read
05Chapter 5: Predicting offsets instead of raw coordinatesThis chapter assumes you know how anchors work (the previous chapter), how a convolutional head produces per-location outputs, and what a regression loss is. It covers why detectors predict small corrections to an anchor instead of absolute box coordinates, how those corrections are defined, and whe5 min read
06Chapter 6: Two-stage detection: from R-CNN to Faster R-CNNThis chapter assumes you know how a CNN backbone produces a feature map, how anchors and box offsets work (the previous two chapters), and the basics of classification versus regression losses. It builds on those ideas to show how two-stage detectors work.6 min read
07Chapter 7: Deciding which anchors are positivesThis chapter assumes you know IoU, how anchors tile a feature map, and how box offsets are encoded and decoded. It also assumes you are comfortable with NumPy and with classification and regression losses.5 min read
08Chapter 8: Classification and box losses, and focal lossThis chapter assumes you know binary cross-entropy, how gradient descent uses a loss, and how anchors are matched to ground truth. The previous chapters covered anchors, box encoding, and positive/negative assignment. Here we turn those assignments into a training signal.4 min read
09Chapter 9: Removing duplicates with non-maximum suppressionThis chapter assumes you can read basic Python, and that you know what IoU is and how anchors produce many candidate boxes per object. The previous chapters covered both. Here you will see why detectors emit duplicates, how non-maximum suppression (NMS) removes them, and where the procedure fails.5 min read
10Chapter 10: Single-stage detectors: SSD, RetinaNet and YOLOThis chapter assumes you know how a CNN backbone produces feature maps, what anchors are, how box offsets are encoded and decoded, and how IoU and non-maximum suppression (NMS) work. Two-stage detectors were covered earlier. Here we look at detectors that skip the proposal step.6 min read
11Chapter 11: Feature pyramids for objects of different sizesThis chapter assumes you know how a CNN backbone produces feature maps at several strides, what anchors are, and how single-stage detectors such as RetinaNet use them. It explains why one feature map is a poor basis for detecting objects of very different sizes, and how the Feature Pyramid Network (5 min read
12Chapter 12: Anchor-free detection: FCOS and CenterNetThis chapter assumes you know how anchors are matched to ground truth, how focal loss works, and how non-maximum suppression (NMS) removes duplicates. You should also be comfortable with feature pyramids and NumPy.5 min read
13Chapter 13: Evaluating detectors with AP and mAPThis chapter assumes you know how IoU is computed, what NMS does, and how a detector produces scored boxes with class labels. It also assumes basic NumPy. Here you will learn how a set of scored boxes becomes a single number such as "AP 42.0", and which details change that number.4 min read
14Chapter 14: Attention as the building block of DETRDETR replaces anchors and non-maximum suppression with a transformer. This chapter covers the one operation that transformer is built from, attention, and where DETR uses it. We assume you know what a backbone feature map is, and that you can read NumPy matrix code. Prior knowledge of Transformers i6 min read
15Chapter 15: One-to-one matching with the Hungarian algorithmThis chapter assumes you know what DETR's object queries are (from the previous chapters), how IoU works, and the basics of cross-entropy and L1 losses. You should also be comfortable with NumPy arrays. After it, you should be able to build a matching cost matrix, solve it with SciPy, and explain wh5 min read
16Chapter 16: DETR: object queries and set predictionDETR (DEtection TRansformer, Carion et al., 2020) treats detection as predicting a set of objects directly. Earlier chapters covered anchors, label assignment by IoU, and non-maximum suppression (NMS). DETR removes all three and replaces them with a Transformer and one-to-one matching.5 min read
17Chapter 17: Deformable DETR and other fixes for DETR's weaknessesThis chapter assumes you know how DETR works: a CNN backbone, a transformer encoder and decoder, a fixed set of object queries, and Hungarian matching during training. You should also know self-attention and cross-attention. Here you will see why the original DETR trains slowly and misses small obje6 min read