All images are synthetic: a 320×200 gray image with a smooth background, 3–12 non-overlapping bright shapes (circle, rectangle, triangle) and Gaussian sensor noise. No photographs or people are involved, and the exact ground truth is known.
The detector is a classical pipeline, not a neural network:
1. mean filter g = (1/9) Σ 3×3 neighbours
2. Otsu T = argmax_t w0(t)·w1(t)·[μ0(t) − μ1(t)]²
3. mask b(x,y) = [ g(x,y) > T ]
4. connected components (4-neighbour, BFS)
5. features per blob: area A, bounding box w×h,
fill = A / (w·h)
6. class: fill > 0.90 rectangle
0.65 … 0.90 circle (π/4 = 0.785)
fill < 0.65 triangle (1/2)
Detections are scored against the ground truth with the intersection over union IoU = |A∩B| / |A∪B|; a detection is a true positive when IoU ≥ 0.5 (greedy one-to-one matching). precision = TP/(TP+FP), recall = TP/(TP+FN), F1 = 2PR/(P+R).
Gaussian noise of σ per pixel is reduced by the 3×3 mean to σ/3; once the object contrast approaches a few σ the threshold starts to cut speckles and holes into blobs, so precision and recall drop. That is exactly the failure mode you can provoke with the sliders.
Simplifications: fill ratio is a crude shape feature (a rotated square or a squashed ellipse would be misclassified); objects never overlap or rotate; real detectors learn features with convolutional networks from many labelled photographs. Here the numbers show how detection quality depends on signal-to-noise, not how a CNN works.