TExcelTAD
Home › Computer Vision: Images to Detection, Segmentation & Tracking › Image Annotation: Tasks, Guidelines and Quality

Image Annotation: Tasks, Guidelines and Quality

A model can only learn what its labels say, and a test set can only measure what its labels say. In computer vision the labels are expensive (a polygon around one car takes longer than a whole page of text classification), they are ambiguous (where does a partly hidden bicycle end?), and they come in a different shape for every task. This lesson is about deciding what to label, writing the rules that make two annotators produce the same label, and measuring whether they did. The general ideas of ground truth and label noise are in ground truth and annotations and label quality; here they are made concrete for images, with boxes and IoU instead of class labels and kappa.

One image, six kinds of label

image label"square,triangle" boxx1 y1 x2 y2 polygonvertex list maskpixels per object topleftright keypointsnamed points t1t2t3id 7 track idsame idevery frame left to right: more information per object, more seconds per object
Label type What the annotator produces Used for Typical stored form
image label one class per image classification a folder per class, or a CSV file,label
multi-label a set of classes per image ("dog", "grass", "ball") tagging, retrieval a 0/1 vector per image
box an axis-aligned rectangle + class per object detection, tracking VOC XML, COCO JSON, YOLO txt (box formats)
polygon the outline as vertices + class per object instance segmentation COCO segmentation lists, YOLO-seg txt
mask a class (semantic) or an object id (instance) per pixel segmentation PNG label maps, RLE (masks and RLE)
keypoints named points with a visibility flag pose, faces, landmarks COCO keypoints triplets x, y, v
track id the same id on the same object in every frame multi-object tracking, re-identification MOT text files, CVAT/COCO-video JSON

Multi-label and multi-class are different problems, not two names for one: a multi-class label says "exactly one of these", a multi-label set says "any number of these", and the model, the loss and the metrics differ (ground truth and annotations has the details). The richer the label, the more tasks it serves: a mask gives you the box for free (the smallest rectangle around its pixels), and a box gives you the image label. The reverse needs new annotation work, which is why the first design question is which is the cheapest label that answers the product question and the second is will we need the richer one in six months.

Guidelines: rules that make labels repeatable

Two careful people looking at the same street photo will still draw different boxes, unless a written guideline settles the cases they will disagree on. A good guideline is short, has a picture for every rule, and is updated whenever annotators ask the same question twice. The questions it must answer for boxes and masks:

  • Class list and definitions. What exactly is a "car"? Do vans count, pickup trucks, a car on a billboard, a toy car, a reflection in a window? Write the edge cases down with an example image each.
  • Tightness. Box edges touch the outermost visible pixels of the object, not the shadow, not a margin. For masks: is the hair part of the person, is the bicycle's wheel interior part of the bicycle?
  • Occlusion. A partly hidden object gets a box around its visible part (the COCO convention) or around its estimated full extent (some driving datasets annotate amodal boxes). Pick one and say so; mixing both in one dataset is a classic source of noise. Many formats add an occluded flag or a visibility level.
  • Truncation. An object cut by the image border is boxed up to the border. Pascal VOC records this with truncated = 1.
  • Crowds. A dense group where individual objects cannot be separated (a stadium audience, a pile of apples) gets one region marked iscrowd = 1 in COCO. During evaluation, detections inside a crowd region are ignored rather than counted as false positives.
  • Ignore regions and "difficult". Areas nobody can label reliably (far away, very blurred, behind glass) are marked as ignore regions, or the objects as difficult = 1 (Pascal VOC). Evaluation skips them, so the model is neither rewarded nor punished there.
  • Minimum size. Below some size (say 8 pixels in the shorter side) annotators disagree on whether there is an object at all. Either label everything you can see and record the size, or set a minimum and mark smaller ones as ignore.
  • Keypoints and tracks: visibility codes (COCO: 0 not labelled, 1 labelled but not visible, 2 visible), which side is "left" (the person's left, not the viewer's), and when a track id ends (the object leaves the frame for how many frames?).

Annotation tools implement these rules as attributes and shortcuts. Widely used open-source examples are CVAT and Label Studio; commercial platforms add workforce management. They are named here as examples, not recommendations: what matters is that the tool exports a documented format, keeps the guideline version with each label, and supports review. Most tools also offer model-assisted labelling: a model pre-draws boxes and the annotator corrects them, which is several times faster but biases the labels toward what the model already does (annotators accept slightly wrong boxes). Choosing which images to send to annotators is active learning.

Measuring agreement between annotators

For class labels, agreement is measured with Cohen's kappa (label quality). For boxes there is a geometric part as well: two annotators may agree that there is a car and still draw different rectangles. The natural measure is the intersection over union of their two boxes, the same IoU detectors are scored with (detection metrics):

IoU(A,B)=area(A∩B)area(A)+area(B)−area(A∩B)\text{IoU}(A, B) = \frac{\text{area}(A \cap B)}{\text{area}(A) + \text{area}(B) - \text{area}(A \cap B)}

To compare two annotators on an image, match their boxes one to one (the pairing with the largest total IoU, found with the Hungarian algorithm), keep pairs with IoU of at least 0.5, and then report:

  • how many objects each found, and how many were found by only one of them (a missed object for the other),
  • the mean IoU of the matched pairs (box precision),
  • the share of matched pairs with the same class (class agreement).

The example simulates two annotators on 50 generated scenes. make_scene (the course's generator) draws non-touching squares, circles and triangles and returns their exact boxes, which plays the role of the unknowable truth. Annotator A is careful (box edges jitter by 3% of the object size, misses 2% of objects, picks a wrong class 1% of the time); annotator B is rushed (8%, 8%, 5%).

python · try it yourself
import numpy as np, cv2
from scipy.optimize import linear_sum_assignment

CLASSES = ["square", "circle", "triangle"]

def make_scene(rng, size=64, max_objects=3):
    """Noisy grey background with 1..max_objects shapes that do not touch.
    Returns RGB uint8 image, boxes (n, 4) as [x1, y1, x2, y2] with x2, y2 exclusive,
    labels (n,) indices into CLASSES, masks (n, size, size) bool."""
    img = rng.normal(110, 12, (size, size, 3)).clip(0, 255).astype(np.uint8)
    n = int(rng.integers(1, max_objects + 1))
    boxes, labels, masks = [], [], []
    for _ in range(100):
        if len(boxes) == n:
            break
        s = int(rng.integers(12, 25)); x = int(rng.integers(0, size - s)); y = int(rng.integers(0, size - s))
        if any(x < b[2] + 2 and b[0] < x + s + 2 and y < b[3] + 2 and b[1] < y + s + 2 for b in boxes):
            continue
        c = int(rng.integers(0, 3)); m = np.zeros((size, size), np.uint8)
        if c == 0:
            cv2.rectangle(m, (x, y), (x + s - 1, y + s - 1), 1, -1)
        elif c == 1:
            cv2.circle(m, (x + s // 2, y + s // 2), s // 2, 1, -1)
        else:
            cv2.fillPoly(m, [np.array([[x + s // 2, y], [x, y + s - 1], [x + s - 1, y + s - 1]], np.int32)], 1)
        img[m > 0] = rng.integers(0, 256, 3)
        ys, xs = np.nonzero(m)
        boxes.append([int(xs.min()), int(ys.min()), int(xs.max()) + 1, int(ys.max()) + 1])
        labels.append(c); masks.append(m > 0)
    return img, np.array(boxes).reshape(-1, 4), np.array(labels), np.array(masks)

def iou(a, b):
    """IoU matrix between boxes a (n, 4) and b (m, 4), [x1, y1, x2, y2]."""
    a, b = np.asarray(a, float)[:, None], np.asarray(b, float)[None]
    w = (np.minimum(a[..., 2], b[..., 2]) - np.maximum(a[..., 0], b[..., 0])).clip(0)
    h = (np.minimum(a[..., 3], b[..., 3]) - np.maximum(a[..., 1], b[..., 1])).clip(0)
    inter = w * h
    area = lambda z: (z[..., 2] - z[..., 0]) * (z[..., 3] - z[..., 1])
    return inter / (area(a) + area(b) - inter)

def annotate(rng, boxes, labels, jitter, p_miss, p_wrong):
    """A simulated annotator: noisy edges, some objects missed, some classes wrong."""
    out_b, out_l = [], []
    for b, l in zip(boxes, labels):
        if rng.random() < p_miss:
            continue
        w, h = b[2] - b[0], b[3] - b[1]
        out_b.append(np.round(b + rng.normal(0, jitter, 4) * [w, h, w, h]).clip(0, 64))
        out_l.append(int(rng.integers(0, 3)) if rng.random() < p_wrong else int(l))
    return np.array(out_b).reshape(-1, 4), np.array(out_l, int)

def match(b1, b2, thr=0.5):
    """One-to-one matching with the largest total IoU; pairs below thr do not count."""
    if len(b1) == 0 or len(b2) == 0:
        return []
    m = iou(b1, b2)
    rows, cols = linear_sum_assignment(-m)
    return [(r, c, m[r, c]) for r, c in zip(rows, cols) if m[r, c] >= thr]

def compare(name, pairs_of_annotations):
    n1 = n2 = 0; ious, same = [], []
    for (b1, l1), (b2, l2) in pairs_of_annotations:
        n1 += len(b1); n2 += len(b2)
        for r, c, v in match(b1, b2):
            ious.append(v); same.append(l1[r] == l2[c])
    ious = np.array(ious)
    print(f"{name:10s} boxes {n1:3d} vs {n2:3d} | matched {len(ious):3d} | mean IoU {ious.mean():.3f} | "
          f"IoU >= 0.75: {(ious >= 0.75).mean():.2f} | same class {np.mean(same):.3f}")

rng = np.random.default_rng(0)
truth = [make_scene(rng)[1:3] for _ in range(50)]
A = [annotate(rng, b, l, 0.03, 0.02, 0.01) for b, l in truth]
B = [annotate(rng, b, l, 0.08, 0.08, 0.05) for b, l in truth]
print("objects in the 50 scenes:", sum(len(b) for b, _ in truth))
compare("A vs truth", zip(A, truth))
compare("B vs truth", zip(B, truth))
compare("A vs B", zip(A, B))
objects in the 50 scenes: 94
A vs truth boxes  92 vs  94 | matched  92 | mean IoU 0.940 | IoU >= 0.75: 1.00 | same class 0.978
B vs truth boxes  80 vs  94 | matched  80 | mean IoU 0.807 | IoU >= 0.75: 0.78 | same class 0.963
A vs B     boxes  92 vs  80 | matched  78 | mean IoU 0.788 | IoU >= 0.75: 0.64 | same class 0.962

The 50 scenes hold 94 objects. Against the truth, careful A found 92 with mean IoU 0.940; rushed B found only 80 with mean IoU 0.807, and 0.78 of its boxes reach IoU 0.75. Those two rows are what you would love to know and never can: in a real project there is no truth file, only annotators. The last row is what you can measure: A and B agree on 78 objects, with mean IoU 0.788, below either annotator against the truth, because the disagreement contains both people's errors. That is the useful reading of inter-annotator agreement: it is a lower bound on label quality, and roughly a ceiling on how well a model can be shown to do on these labels. If two humans only agree on boxes at IoU 0.8 on average, a detector scored at IoU 0.9 (part of COCO's 0.5:0.95 range) is being graded on noise.

Note: Agreement also says where the guideline is weak. Sort the disagreements by class, size and attribute (occluded, truncated, small): if most of them are small objects, the minimum-size rule needs work, not the annotators.

Consensus from several annotators

When labels matter (the test set, a medical dataset), each image is labelled by several people and the labels are merged. For boxes, a simple and robust consensus is:

  1. pool the boxes of all annotators and group the ones that overlap (IoU at least 0.5, at most one box per annotator per group),
  2. keep a group only if a majority of annotators drew it,
  3. take the coordinate-wise median of the boxes (one wild box cannot drag it, unlike the mean),
  4. take the majority class, and send groups with no majority or a low agreement IoU to a reviewer.

The example adds a third annotator, C, as rushed as B, and compares each annotator and the consensus with the truth.

python · try it yourself
import numpy as np, cv2
from scipy.optimize import linear_sum_assignment

CLASSES = ["square", "circle", "triangle"]

def make_scene(rng, size=64, max_objects=3):
    """Noisy grey background with 1..max_objects shapes that do not touch.
    Returns RGB uint8 image, boxes (n, 4) as [x1, y1, x2, y2] with x2, y2 exclusive,
    labels (n,) indices into CLASSES, masks (n, size, size) bool."""
    img = rng.normal(110, 12, (size, size, 3)).clip(0, 255).astype(np.uint8)
    n = int(rng.integers(1, max_objects + 1))
    boxes, labels, masks = [], [], []
    for _ in range(100):
        if len(boxes) == n:
            break
        s = int(rng.integers(12, 25)); x = int(rng.integers(0, size - s)); y = int(rng.integers(0, size - s))
        if any(x < b[2] + 2 and b[0] < x + s + 2 and y < b[3] + 2 and b[1] < y + s + 2 for b in boxes):
            continue
        c = int(rng.integers(0, 3)); m = np.zeros((size, size), np.uint8)
        if c == 0:
            cv2.rectangle(m, (x, y), (x + s - 1, y + s - 1), 1, -1)
        elif c == 1:
            cv2.circle(m, (x + s // 2, y + s // 2), s // 2, 1, -1)
        else:
            cv2.fillPoly(m, [np.array([[x + s // 2, y], [x, y + s - 1], [x + s - 1, y + s - 1]], np.int32)], 1)
        img[m > 0] = rng.integers(0, 256, 3)
        ys, xs = np.nonzero(m)
        boxes.append([int(xs.min()), int(ys.min()), int(xs.max()) + 1, int(ys.max()) + 1])
        labels.append(c); masks.append(m > 0)
    return img, np.array(boxes).reshape(-1, 4), np.array(labels), np.array(masks)

def iou(a, b):
    a, b = np.asarray(a, float)[:, None], np.asarray(b, float)[None]
    w = (np.minimum(a[..., 2], b[..., 2]) - np.maximum(a[..., 0], b[..., 0])).clip(0)
    h = (np.minimum(a[..., 3], b[..., 3]) - np.maximum(a[..., 1], b[..., 1])).clip(0)
    inter = w * h
    area = lambda z: (z[..., 2] - z[..., 0]) * (z[..., 3] - z[..., 1])
    return inter / (area(a) + area(b) - inter)

def annotate(rng, boxes, labels, jitter, p_miss, p_wrong):
    out_b, out_l = [], []
    for b, l in zip(boxes, labels):
        if rng.random() < p_miss:
            continue
        w, h = b[2] - b[0], b[3] - b[1]
        out_b.append(np.round(b + rng.normal(0, jitter, 4) * [w, h, w, h]).clip(0, 64))
        out_l.append(int(rng.integers(0, 3)) if rng.random() < p_wrong else int(l))
    return np.array(out_b).reshape(-1, 4), np.array(out_l, int)

def match(b1, b2, thr=0.5):
    if len(b1) == 0 or len(b2) == 0:
        return []
    m = iou(b1, b2)
    rows, cols = linear_sum_assignment(-m)
    return [(r, c, m[r, c]) for r, c in zip(rows, cols) if m[r, c] >= thr]

def consensus(annotations, thr=0.5):
    """Group boxes of several annotators, keep majority groups, median box, majority class."""
    pool = [(k, b, l) for k, (bs, ls) in enumerate(annotations) for b, l in zip(bs, ls)]
    used = [False] * len(pool); boxes, labels, review = [], [], 0
    for i, (k, b, l) in enumerate(pool):
        if used[i]:
            continue
        group = [i]; used[i] = True
        for other in range(len(annotations)):        # best unused box of each other annotator
            if other == k:
                continue
            cand = [j for j, (k2, _, _) in enumerate(pool) if k2 == other and not used[j]]
            if cand:
                v = iou([b], [pool[j][1] for j in cand])[0]
                if v.max() >= thr:
                    j = cand[int(v.argmax())]; group.append(j); used[j] = True
        if len(group) * 2 <= len(annotations):     # no majority: drop
            continue
        votes = np.bincount([pool[j][2] for j in group], minlength=3)
        boxes.append(np.median([pool[j][1] for j in group], axis=0))
        labels.append(int(votes.argmax()))
        review += int(votes.max() * 2 <= len(group))   # no class majority: send to a reviewer
    return np.array(boxes).reshape(-1, 4), np.array(labels, int), review

def score(name, annotations, truth):
    found = n = wrong = 0; ious = []
    for (b, l), (tb, tl) in zip(annotations, truth):
        n += len(tb)
        for r, c, v in match(b, tb):
            found += 1; ious.append(v); wrong += int(l[r] != tl[c])
    print(f"{name:10s} objects found {found}/{n} | mean IoU {np.mean(ious):.3f} | wrong class {wrong}")

rng = np.random.default_rng(0)
truth = [make_scene(rng)[1:3] for _ in range(50)]
A = [annotate(rng, b, l, 0.03, 0.02, 0.01) for b, l in truth]
B = [annotate(rng, b, l, 0.08, 0.08, 0.05) for b, l in truth]
C = [annotate(rng, b, l, 0.08, 0.08, 0.05) for b, l in truth]
for name, ann in [("A", A), ("B", B), ("C", C)]:
    score(name, ann, truth)
merged = [consensus([a, b, c]) for a, b, c in zip(A, B, C)]
score("consensus", [(b, l) for b, l, _ in merged], truth)
print("groups sent to review:", sum(r for _, _, r in merged))
print("consensus of B and C only:")
score("  B + C", [consensus([b, c])[:2] for b, c in zip(B, C)], truth)
A          objects found 92/94 | mean IoU 0.940 | wrong class 2
B          objects found 80/94 | mean IoU 0.807 | wrong class 3
C          objects found 90/94 | mean IoU 0.793 | wrong class 2
consensus  objects found 94/94 | mean IoU 0.913 | wrong class 3
groups sent to review: 3
consensus of B and C only:
  B + C    objects found 75/94 | mean IoU 0.852 | wrong class 2

The consensus of three people found all 94 objects (no single annotator did) with mean IoU 0.913, far better than the rushed B (0.807) and C (0.793) and close to the careful A (0.940), at three times the cost. It still has 3 class errors, and 3 groups had no class majority (three different votes, or two votes that disagree): those are exactly the ones to send to a reviewer instead of trusting the vote. The last line is a trap worth seeing: with only two annotators, a strict majority needs both, so every object one of them missed is dropped, and B + C keeps only 75 of 94 objects (its higher IoU, 0.852, comes from keeping only the easy objects both saw). Two annotators can tell you that they disagree, not who is right; real pipelines use two plus a reviewer for the disagreements, or three.

Automatic checks before anyone trains

Many label errors are mechanical and can be found by code before a human looks: boxes outside the image, empty or negative boxes, boxes smaller than the guideline's minimum, the same object labelled twice, class ids that are not in the category list. Run such checks on every delivery from the annotation tool. The example audits a small hand-written COCO-style annotation list for a 64 x 64 image (the COCO JSON layout itself is in box formats):

python · try it yourself
import numpy as np

categories = {1: "square", 2: "circle", 3: "triangle"}
W, H, MIN_SIDE = 64, 64, 4
annotations = [                                   # COCO style: bbox = [x, y, width, height]
    {"id": 1, "category_id": 1, "bbox": [32, 9, 24, 24]},
    {"id": 2, "category_id": 2, "bbox": [28, 1, 13, 13]},
    {"id": 3, "category_id": 2, "bbox": [28, 2, 13, 12]},     # same circle drawn twice
    {"id": 4, "category_id": 3, "bbox": [50, 40, 20, 10]},    # runs past the right border
    {"id": 5, "category_id": 1, "bbox": [10, 50, 0, 6]},      # zero width
    {"id": 6, "category_id": 3, "bbox": [5, 5, 3, 3]},        # smaller than the minimum
    {"id": 7, "category_id": 9, "bbox": [12, 30, 10, 10]},    # unknown category
]

def to_xyxy(b):
    x, y, w, h = b
    return np.array([x, y, x + w, y + h], float)

def iou1(a, b):
    w = max(0.0, min(a[2], b[2]) - max(a[0], b[0])); h = max(0.0, min(a[3], b[3]) - max(a[1], b[1]))
    inter = w * h
    return inter / ((a[2] - a[0]) * (a[3] - a[1]) + (b[2] - b[0]) * (b[3] - b[1]) - inter)

problems = []
for a in annotations:
    x1, y1, x2, y2 = to_xyxy(a["bbox"]); w, h = a["bbox"][2], a["bbox"][3]
    if a["category_id"] not in categories:
        problems.append((a["id"], f"unknown category_id {a['category_id']}"))
    if w <= 0 or h <= 0:
        problems.append((a["id"], "empty box")); continue
    if x1 < 0 or y1 < 0 or x2 > W or y2 > H:
        problems.append((a["id"], f"outside the {W} x {H} image (x2={x2:.0f}, y2={y2:.0f})"))
    if min(w, h) < MIN_SIDE:
        problems.append((a["id"], f"shorter side {min(w, h)} px < minimum {MIN_SIDE}"))
for i, a in enumerate(annotations):
    for b in annotations[i + 1:]:
        if a["category_id"] == b["category_id"] and min(a["bbox"][2:] + b["bbox"][2:]) > 0:
            v = iou1(to_xyxy(a["bbox"]), to_xyxy(b["bbox"]))
            if v > 0.8:
                problems.append((b["id"], f"duplicate of {a['id']} (IoU {v:.2f})"))
for ann_id, msg in sorted(problems):
    print(f"annotation {ann_id}: {msg}")
print(f"{len({p[0] for p in problems})} of {len(annotations)} annotations need attention")
annotation 3: duplicate of 2 (IoU 0.92)
annotation 4: outside the 64 x 64 image (x2=70, y2=50)
annotation 5: empty box
annotation 6: shorter side 3 px < minimum 4
annotation 7: unknown category_id 9
5 of 7 annotations need attention

Five of the seven annotations are flagged, each for one mechanical reason; only annotations 1 and 2 pass. What code cannot find, people must: a box around the wrong object, a missed object, a class that is plausible but wrong. The standard tools are a review pass on a random sample (say 5% of images, with the error rate reported per annotator and per class), and a model-based audit: train a model, then look first at the training and test labels the model disagrees with most confidently (label quality does this for classes; for boxes, list ground-truth boxes no prediction matches and high-score predictions no ground truth matches). Fixing test-set labels changes your measured score, so record the label version with every reported number.

What labels cost

Label cost decides the size of the dataset you can afford, so estimate it before choosing the task. Times vary a lot with the tool, the image and the guideline; these are the orders of magnitude reported in the literature (worth re-measuring on a pilot batch of your own images):

Label type Reported time Source of the figure
image label (one class) about 1 to a few seconds per image common crowdsourcing practice
box, drawn corner to corner about 35 s per high-quality box (ImageNet/ILSVRC figure) quoted by Papadopoulos et al., "Extreme clicking", 2017
box, by clicking the four extreme points about 7 s per box same paper
polygon per object (COCO) about 80 s per object Lin et al., Microsoft COCO paper, 2014
full-image fine segmentation (Cityscapes) about 1.5 hours per image Cordts et al., Cityscapes paper, 2016

With these numbers, 10,000 images with 5 objects each cost about 14 hours as image labels, about 100 hours as extreme-click boxes and over 1,000 hours as polygons. Ways to pay less: label only what the task needs, pre-label with a model and correct, label a smart subset first (active learning), and reuse annotations across tasks (masks give boxes for free). Ways to not pay less: skipping the guideline, skipping the review of the test set.

Note: Images of people are personal data. Annotation often happens at an outside vendor, so the images leave your organisation: you need a legal basis and a contract that covers it, blurring of faces and licence plates where the task allows, and no more access than the job needs (privacy, consent and licensing).

Pitfalls

  • No written guideline, or a guideline that changes without a version number: labels from week 1 and week 6 then mean different things.
  • Mixing conventions in one dataset: visible-part and full-extent boxes for occluded objects, or the viewer's left and the person's left for keypoints.
  • Judging annotators against each other without a third opinion. Two people disagreeing tells you that one is wrong, not which.
  • Pre-labelling without auditing. Annotators accept the model's near-misses, so the labels inherit the model's errors and your evaluation flatters that model.
  • Ignoring the hard cases (crowds, tiny objects) silently instead of marking them iscrowd or ignore: the model is then punished at test time for detecting objects that are "not labelled".
  • Reviewing only the training set. Label errors in the test set make every model comparison noisy; the test set deserves the most careful labels.
  • Losing the link to the data version: which image file, which guideline, which annotator. You need it for every audit later (dataset layouts).

Practice

  1. Two annotators boxed the same car as [10, 10, 50, 40] and [12, 10, 50, 44] ([x1, y1, x2, y2]). Compute their IoU.
  2. Your detection test set has many partly hidden pedestrians. Half the boxes cover the visible part, half the estimated full body. What will you see in the detector's evaluation, and what do you do?
  3. In the consensus example, why is the median better than the mean for merging three boxes?
Answer
  1. Areas: 40⋅30=120040 \cdot 30 = 1200 and 38⋅34=129238 \cdot 34 = 1292. Intersection [12, 10, 50, 40]: 38⋅30=114038 \cdot 30 = 1140. IoU =1140/(1200+1292−1140)=1140/1352≈0.843= 1140 / (1200 + 1292 - 1140) = 1140 / 1352 \approx 0.843.
  2. The detector learns one convention (or a blur of both), so many correct detections have IoU below the threshold with boxes of the other convention: false positives and false negatives at the same time, mostly on occluded people. Choose one convention, write it in the guideline with pictures, and re-annotate (at least the test set), adding an occlusion attribute so you can report recall per occlusion level.
  3. One careless box (an edge 10 pixels off) moves the mean by a third of the error but does not move the median of three at all as long as the other two agree. The median of each coordinate is robust to one outlier.

Test yourself

A product only needs to know whether an image contains a dog. Which annotation should you buy first?

  1. Instance masks for every dog
  2. Boxes for every dog
  3. One image-level label (dog / no dog), unless a richer label will be needed later
  4. Keypoints on every dog

Two annotators' boxes agree with mean IoU 0.80. What does that suggest about evaluating a detector on their labels at IoU 0.9?

  1. Nothing; IoU between annotators is unrelated
  2. The 0.9 threshold mostly measures label noise: even a perfect detector could not reliably reach it against these boxes
  3. The detector will score higher than the annotators
  4. The labels must be deleted

What does iscrowd = 1 on a COCO annotation mean during evaluation?

  1. The object is very large
  2. The region is a group of objects labelled together; detections matched to it are ignored instead of counted as false positives
  3. The annotation is a duplicate
  4. The image contains people

With two annotators and a strict majority rule for consensus, what happens to an object one of them missed?

  1. It is kept with the other's box
  2. It is dropped, because one vote out of two is not a majority; use a third annotator or a reviewer
  3. It gets the mean box
  4. It is labelled as a crowd