HaCI (Harmonic Contour Integration) is a compact, fully distributed edge-detection system for RGB images, designed around biologically inspired contrast processing and contour integration. It first compares each pixel with its eight neighbors using a learned luminance-and-chroma metric, normalizing contrast by local energy. It then pools these signals into orientation-specific responses on a sparse grid. A contour-support stage boosts edges that continue along a plausible curved path, bridges gaps supported from both sides, and suppresses texture through same-orientation and flank inhibition. Finally, the system projects cell-level contour strength back onto the image with learned, orientation-aligned kernels and applies non-maximum suppression to produce an edge map.
The supplied model was trained on 300 BRIND images and evaluated on 200 test images using the Berkeley boundary benchmark. Its thinned output reaches ODS 0.7179, OIS 0.7402, and AP 0.7651; the unthinned soft map has ODS 0.7158 and AP 0.6723. On an Apple M4, inference takes 36 ms at 481×321, 201 ms at 1280×720, and 459 ms at 1920×1080. The public Python repository includes pretrained weights, training and evaluation tools, diagnostics, and scripts for BRIND, BIPED, and NYUDv2 datasets. It supports CPU, CUDA, and Apple Silicon acceleration, with a Metal implementation for the rendering step on MPS.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.