Computer Vision Beyond the Basics
Glossary
114 terms from Computer Vision Beyond the Basics, in plain words, each with the chapter that teaches it.
A
- AGPL-3.0
- A copyleft open-source license that Ultralytics uses for its code and YOLO models. If you distribute software that includes it, or let people use it over a network, you must release your whole application's source under the same license. Kettle & Crane's shelf check is a web service, so this applies to it.
- Anchor
- A preset box of a given size and aspect ratio placed at each feature-map position. A detector like Faster R-CNN learns small offsets that nudge an anchor onto a real object.
- Anchor-free
- A detector that predicts boxes directly from each position, such as the distances to an object's four edges, without preset anchor boxes. FCOS and YOLO since YOLOv8 work this way.
- Apache 2.0
- A permissive open-source license that allows closed-source commercial use. It covers most RF-DETR model sizes, making them an alternative to AGPL-licensed YOLO code.
- argmax
- Tensor functions that return positions instead of values. `argmax` gives the position of the largest value, and `argsort` gives the positions that would sort the values (for example, boxes from highest score to lowest).
- Attention
- The key layer of a transformer: it lets every item in a sequence (such as an image patch) look at every other item and decide which ones matter to it.
- Augmentation
- Random, label-preserving changes to training photos, such as flips, crops and color shifts. For detection, any change that moves pixels must move the boxes the same way.
- Average precision (AP)
- The area under one class's precision-recall curve. A value of 1.0 means every object was found before any false alarm.
B
- Backbone
- The part of a detector that turns the photo into feature maps. It is usually a pretrained classification network such as ResNet-50 without its last layer.
- Background class
- Torchvision reserves label 0 for 'background', so real classes must start at 1. Starting your labels at 0 makes the model treat that class as background.
- batched_nms
- A torchvision function that runs non-maximum suppression separately within each class. This stops a strong 'bag' box from deleting an overlapping 'mug' box.
- Bounding box
- The smallest upright rectangle around an object, stored as four numbers. Detectors output one box per object along with a label and score.
- BSD license
- A permissive open-source license, used by torchvision's models, that allows closed-source commercial use. It is one way for Kettle & Crane to avoid AGPL requirements.
C
- Calibration
- In static quantization, running real photos through the model to measure each layer's range of values so they can be stored as 8-bit numbers. Ultralytics uses the validation photos for this.
- CLIP
- A model with two encoders that turn photos and sentences into vectors in the same space, trained so that a photo lies close to its caption. It enables classifying images with only written descriptions.
- CLS token
- An extra token added to a vision transformer's sequence that summarizes the whole image. Its embedding can be used as the image's feature vector.
- COCO
- A public dataset of about 118,000 everyday photos with boxes and masks for 80 classes. Its JSON label format (photos, annotations and categories, with XYWH boxes) is also called COCO.
- Collate function
- A function a PyTorch `DataLoader` uses to combine individual samples into a batch. For detection, a custom collate function keeps images and targets as tuples, because photos have different numbers of boxes and can't be stacked into one tensor.
- Confidence score
- A detector's 0-to-1 certainty for one box and its class.
- Copyleft
- A kind of license that requires derived or distributed software to be released under the same license terms. AGPL-3.0 is a copyleft license.
- Cosine similarity
- A measure of how alike two vectors are, from -1 to 1: the dot product after scaling both to length 1. CLIP uses it to compare a photo's embedding with each prompt's embedding.
- Count error
- How far each product count is from the true count, averaged. A photo is exactly right when all four product counts are off by 0.
- CVAT
- A free open-source labeling tool that runs online or on your own server, with review steps and video tools for teams. It exports COCO and YOLO labels.
- CXCYWH
- A box format giving center x, center y, width and height. YOLO and DETR models use it, and YOLO txt files store it normalized.
D
- Dataset and DataLoader
- PyTorch classes for feeding data to a model. A `Dataset` returns one sample, and a `DataLoader` batches and shuffles samples, here with a custom collate function for detection.
- Detect then segment
- A recipe where a detector finds boxes for your classes and SAM turns each box into a mask. It gives masks without anyone labeling masks.
- DETR
- A transformer detector that predicts a set of boxes and is trained to match each true object to exactly one prediction, so it needs no NMS. RT-DETR and RF-DETR are real-time descendants.
- Dice coefficient
- A mask score equal to twice the overlap divided by the two masks' sizes added; it is the F1 score of the pixels and is always at least the IoU. Dice loss (1 minus Dice) helps when objects are tiny.
- DINOv2
- Meta's models that learn image features from photos alone, with no labels. They are strong for image similarity and as frozen features, but they were trained to ignore color.
E
- Embedding
- A vector of numbers that stands for an input such as a photo or a sentence. Similar inputs get nearby vectors.
- Enterprise License
- A paid license Ultralytics sells for closed-source use of its code and models, as a way around the AGPL-3.0 requirements.
- Epoch
- One full pass through the training set during training. A model is usually trained for several epochs, for example 8 for a small Faster R-CNN or 20 for YOLO26n.
- Error analysis
- Sorting a system's mistakes by kind, such as missed, duplicate, wrong class or false box. At Kettle & Crane it revealed problems that a high mAP hid.
- Evaluation mode
- A torchvision detector has two modes. In training mode it takes images and targets and returns losses; in evaluation mode it takes a list of images and returns boxes, labels and scores.
F
- Facing
- One product-wide slot along a shelf. An empty facing is a slot with no product, which Sam wants flagged.
- False negative
- A true object that no prediction matched, so the detector missed it.
- False positive
- A predicted box that matches no true object, such as a duplicate on an already-matched object or a wrong-class box.
- Faster R-CNN
- A two-stage detector: a region proposal network suggests where objects might be, then a second stage classifies each proposal and refines its box.
- FCOS
- An anchor-free one-stage detector that predicts, at each position inside an object, the distances to its four edges.
- Feature extraction
- Keeping pretrained layers frozen (not updated) and training only the new head. For a detector this means setting `trainable_backbone_layers=0` so the backbone stays fixed, which makes training feasible on a CPU.
- Feature map
- A grid of numbers produced by a network where each position describes a patch of the photo.
- Feature pyramid network (FPN)
- The usual detector neck. It passes the meaning of coarse, late layers down to fine, early ones, so small objects are found on fine maps and large ones on coarse maps.
- Few-shot classification
- Classifying from a handful of labeled examples, for instance by averaging each class's embeddings into a center and giving each crop the class of the nearest center.
- Fine-tuning
- Starting from a pretrained model, replacing the part that names the classes, and training on your own photos. Teaching a COCO detector about Kettle & Crane's products is fine-tuning.
- Focal loss
- A loss used by RetinaNet that down-weights the thousands of easy background positions so training focuses on harder ones.
- Foundation model
- A large model pretrained on huge, broad data and reused for many tasks. CLIP, DINOv2 and SAM are examples.
- FrozenBatchNorm
- A BatchNorm layer whose statistics stay fixed. Pretrained detectors use it because batches of 2 to 8 photos are too small to estimate new statistics.
H
- Head
- The part of a detector that predicts a class score and a box at many positions. Detector families differ mainly in their heads.
- Hugging Face Hub
- The main model-sharing site; its `transformers` library wraps models in one-line `pipeline` objects for a task, such as image feature extraction or zero-shot object detection.
I
- Instance segmentation
- Giving each object its own true/false mask, along with its class and score. Unlike semantic segmentation, it separates two touching bags of decaf.
- INT8
- 8-bit whole numbers, used in quantization instead of 32-bit floats. This makes a model about four times smaller.
- IoU
- Overlap area divided by combined area of two boxes (or masks), from 0 to 1. It is the standard measure of how well a predicted box matches the true one, with 0.5 as the usual pass mark.
- iscrowd
- A COCO annotation field that is 1 when one label covers a crowd too dense to label singly. Such annotations are ignored when scoring.
K
- Keypoint detection
- A related task that finds named points on an object, such as joints on a body.
L
- Label Studio
- A free open-source labeling tool you install with pip and run locally in the browser. It exports COCO and YOLO labels and can show a model's boxes for people to correct.
- Letterboxing
- Padding a photo into a square, with gray bars, without stretching it. You must undo the padding and scale to map boxes back to the original photo.
M
- mAP
- Mean average precision: AP averaged over classes. mAP@0.5 matches boxes at IoU 0.5, and COCO's main score mAP@[.5:.95] also averages over ten IoU thresholds up to 0.95, rewarding tight boxes.
- Mask
- A grid the size of the photo with True where a pixel belongs to an object. Masks outline objects more precisely than boxes.
- Mask mAP
- The score for instance segmentation: box mAP, but matching predictions to true objects by mask IoU instead of box IoU.
- Mask R-CNN
- A Faster R-CNN with an extra mask head, so each detected box also gets a true/false mask. It is a standard instance segmentation model.
- Mean IoU (mIoU)
- IoU computed per class over the test set and then averaged. It is the usual score for semantic segmentation.
- Median
- The middle value of a sorted list. The shelf-check code uses the median product width to size a facing so one odd box doesn't skew it.
- Momentum
- SGD (stochastic gradient descent) updates weights from each batch's gradient; momentum smooths those updates using past steps. It is torchvision's usual optimizer choice for detectors.
- Mosaic
- An Ultralytics augmentation that stitches four training photos into one.
N
- Neck
- The part of a detector between the backbone and head that mixes feature maps of different sizes. The usual neck is an FPN.
- NMS IoU threshold
- The overlap above which NMS treats two boxes as duplicates. Too low merges neighboring products and undercounts; too high leaves duplicates and overcounts. It is different from the score threshold.
- Non-maximum suppression (NMS)
- A cleanup step that keeps the highest-scoring box and deletes remaining boxes whose IoU with it is above a threshold, since they are probably duplicates of the same object. Without it you would count one bag several times.
- Normalized box
- A box whose x values and widths are divided by the photo's width and y values and heights by its height, so every number is between 0 and 1. It survives resizing, but you need the photo's size to get pixels back.
O
- Object detection
- The task of finding what objects are where: the output is a list of boxes, each with a label and a score.
- Objectness
- A score for 'some object is here' (object versus background) that the region proposal network predicts for each anchor.
- OCR
- Optical character recognition: turning pictures of text into text, such as reading Kettle & Crane's delivery receipts.
- One-stage detector
- A detector that predicts classes and boxes at every position in one pass. SSD, RetinaNet, FCOS and YOLO are examples.
- OneCycleLR
- A learning-rate schedule that warms the rate up and then decays it. The warm-up keeps a random new head from wrecking pretrained layers early in training.
- ONNX
- A portable model file format; ONNX Runtime runs such files without PyTorch. Here it ran the YOLO model about twice as fast as PyTorch on a CPU.
- Open-vocabulary detection
- Finding boxes for any words you give, with no training. OWLv2, Grounding DINO and YOLOE are examples, useful for prototypes and pre-labels.
P
- Panoptic segmentation
- Combining semantic and instance segmentation: every pixel gets a class, and countable 'things' also get an object ID. Uncountable 'stuff' like wall and shelf has a class only.
- Pascal VOC
- A label format with one XML file per photo and XYXY pixel boxes.
- Patch
- A small square piece of an image, usually 16 × 16 pixels, that a vision transformer turns into a token.
- Pre-labeling
- Using a model's predictions as draft labels so people correct boxes rather than draw them, which roughly halves labeling time.
- Precision
- The share of predicted boxes that are hits (true positives).
- Precision-recall curve
- A plot of precision against recall as the score threshold sweeps from high to low. The area under it is average precision.
- Preprocessing and postprocessing
- The steps around an exported model that Ultralytics normally hides: before it, letterbox and scale to 0-1; after it, convert box format, pick the best class, threshold, run NMS and undo the letterbox.
- Prompt
- For SAM, a point or box that tells it which thing to outline. For CLIP, a sentence describing a class, such as 'a photo of a teal coffee bag'.
- pycocotools
- The official COCO scoring code, which torchmetrics uses to compute mAP.
Q
- Quantization
- Storing weights and activations with fewer bits, such as 8-bit INT8 instead of 32-bit floats. Models get four times smaller, but accuracy at strict IoU and speed on your hardware must be checked.
R
- Recall
- The share of true objects that the detector found.
- Region proposal network (RPN)
- The first stage of Faster R-CNN. At every feature-map position it scores anchors for 'is there some object here?' and nudges them onto objects, producing proposals for the second stage.
- Regular expression
- A text pattern used to pull fields out of text, such as item lines from OCR'd receipt text. Characters like `\d+` match digits and parentheses capture parts of the match.
- RetinaNet
- A one-stage detector that uses anchors and focal loss.
- RF-DETR
- A real-time DETR descendant from Roboflow; most sizes are Apache 2.0 licensed, making it an option for closed-source products.
- RoI Align
- The step in Faster R-CNN that cuts each proposal's area out of the feature map at a fixed size (7 × 7) so a small head can classify it and refine its box.
S
- SAM
- Meta's Segment Anything Model, which has no classes: you give it a prompt such as a point or box and it returns the mask of whatever is there.
- Score threshold
- The minimum confidence for keeping a box. Raising it favors precision and lowers recall, and it is separate from the NMS IoU threshold.
- Semantic segmentation
- Assigning a class to every pixel. It can't tell two touching decaf bags apart because they form one blob of decaf pixels.
- SSD
- A one-stage, anchor-based detector. SSDlite is a small, fast version suited to phones.
T
- Target
- The dictionary torchvision detectors expect for one training photo, with XYXY float `boxes` and int64 `labels`.
- Tesseract
- The classic free OCR engine, a separate program you install, with `pytesseract` as its Python wrapper. Its mistakes are plausible characters, so results need checking.
- Token
- A vector standing for one piece of input, such as an image patch in a vision transformer or a word in a language model.
- torchmetrics
- A library that computes model scores; its `MeanAveragePrecision` class computes COCO-style mAP using pycocotools.
- torchvision
- PyTorch's computer vision library. It provides pretrained detectors, `transforms.v2` augmentations and `ops` helpers such as `box_convert` (format conversion), `box_iou` and `nms`.
- Transformer
- A network design built from attention layers; it is the basis of today's language models, ViT, CLIP and DETR.
- True positive
- A predicted box that matches an unused true box of the same class at or above the IoU threshold.
- tv_tensors
- Tensors tagged as images, boxes or masks so `transforms.v2` treats them correctly. A plain, untagged box tensor passes through a flip unchanged, so the photo flips but the box doesn't.
- Two-stage detector
- A detector that proposes regions first and then classifies and refines them, like Faster R-CNN. It is accurate on small, crowded objects but slower.
U
- Ultralytics
- The company and Python package behind the YOLO models. It handles YOLO-format data, augmentation, training, validation and export in a few lines, under the AGPL-3.0 license.
V
- Vision transformer (ViT)
- A transformer that reads an image as a sequence of patches, usually 16 × 16 pixels, each turned into a token. It needs big pretraining, so it is used pretrained.
W
- Weights enum
- A torchvision object bundling a pretrained model's download address, matching preprocessing and metadata such as COCO mAP and size. `.DEFAULT` picks the best weights.
X
Y
- YAML
- A plain-text `key: value` settings format. A YAML file tells Ultralytics where the image folders are and lists the class names.
- YOLO
- A family of fast, anchor-free one-stage detection models, here run through Ultralytics. The name stands for 'You Only Look Once'.
- YOLO format
- A label format with one txt file per photo and one line per object: a class number from 0, then normalized center x, center y, width and height. Photos and labels sit in parallel folders listed in a YAML file.
- YOLO26
- Ultralytics' 2026 object detector family, in sizes n, s, m, l and x, with an optional NMS-free one-to-one head. Its smallest size, YOLO26n, is small enough to fine-tune on a CPU.
Z
- Zero-shot classification
- Classifying with written class descriptions and no training: write one sentence per class and pick the one closest to the image's embedding. Prompts that describe appearance work better than product names.