Computer Vision with TensorFlow: CNNs, Detection, and Segmentation
Vision as Structured Tensor Computation
Convolutional priors
Convolution exploits locality and translation equivariance, making it a powerful inductive bias for images. In TensorFlow, convolutional models remain highly relevant for efficient feature extraction, detection backbones, and segmentation encoders, even in the era of transformer hybrids.
What property makes convolution especially suited to image data?
Convolution shares filters across spatial locations and captures local patterns efficiently.
Correct answer: It exploits local connectivity and shared weights
State one advantage of convolutional weight sharing.
The same kernel is reused across locations, lowering the number of learned parameters.
Correct answer: It reduces parameter count and improves sample efficiency.
Object Detection and Segmentation
Dense prediction tasks
Detection predicts bounding boxes and classes, while segmentation assigns labels at pixel or region level. These tasks require specialized losses, anchor or anchor-free strategies, and evaluation metrics such as intersection over union . Advanced pipelines often combine multi-scale features and postprocessing logic.
Vision task comparison
| Task | Output | Common metric |
|---|---|---|
| Classification | Single label or distribution | Top-1 / Top-5 accuracy |
| Detection | Boxes + classes | mAP |
| Segmentation | Pixel labels | mIoU |
Design note
Detection and segmentation often need carefully aligned augmentations so annotations remain correct after transforms.
Which metric is commonly associated with segmentation quality?
Mean intersection over union is a standard dense prediction metric.
Correct answer: mIoU
Why must image augmentations preserve label geometry?
Incorrect transforms can corrupt boxes, masks, or keypoints and break training.
Correct answer: Because transformed images and annotations must remain aligned for supervised learning.