VISION STARTER / Latent Space / https://mlblogg.com/courses/vision-starter/

Tested with Python 3.12.13 on macOS arm64, CPU only.
Create an isolated Python 3.12 environment; install requirements.txt.
Run: python verify_cv.py

cv_components.py: explicit connectivity, label maps, area/centroid/box
measurements, complete-component selection and size distribution fixtures.
cv_filters.py: 3x3 weighted neighborhoods, reference correlation, replicated
borders, OpenCV smoothing and signed Sobel derivatives.
cv_channels.py: RGB planes, axis reductions, pixel selection, straight-alpha
linear-light compositing over opaque backgrounds, sRGB display conversions.
cv_arrays.py: pixel/channel, range, and NCHW layout examples.
cv_masks.py: independent synthetic target, threshold, closing/opening.
cv_metrics.py: binary IoU/Dice and boundary-center HD/HD95 reference.
verify_cv.py: numerical contracts and independent SciPy comparisons.
verification.txt: captured output from the checked environment.

Every function is typed. Array shape/dtype conventions are in docstrings.
No dataset downloads or neural-network dependencies are needed.

Distances: 2D inner boundary centers, four-neighbor cross erosion, outside
background, Euclidean distance with (row,column) spacing. HD95 is the maximum
of directional 95th percentiles, NumPy method='linear'. Both empty: overlap 1,
distance 0; exactly one empty: overlap 0, distance infinity. Do not silently
average infinities away. Pairwise backend is deliberately limited to small
examples (at most 2 million boundary pairs); not a 3D surface metric engine.

All six figures are exact synthetic experiments, not measured model quality.
Browser visualizations are recordings of selected runs. They sample larger
arrays honestly and omit library internals; Python does not run in the page.
