Jun 2026 – present
CUDA · C++ · PyTorch
Morphottention
Attention for PyTorch with the dot product replaced by a morphological operation. The forward and backward passes are Flash-attention-style CUDA kernels, so the full attention matrix is never stored. It works with autograd, and a standard ViT can use it without other changes.
Jun 2026 – present
PyTorch · CUDA · C++
serron
Differentiable erosion, dilation and the operators built from them, plus learnable morphological layers, for PyTorch. With flat structuring elements the CUDA kernels run a separable van Herk–Gil–Werman scan, so forward and backward cost O(1) per pixel at any window size. Eroding an 8×3×512×512 batch with a 127×127 window takes 0.25 ms on an H100. Plain PyTorch needs 81 ms, CuPy 2.0 ms.
Mar 2026 – present
Research · PyTorch
Lesion Segmentation in Dermoscopic Images Using FCN with Mathematical Morphology Enhancements
Plain FCNs segment skin lesions with fragmented masks and lose thin structures. We added learnable morphology to fix that: differentiable morphological layers inside the network, a boundary-aware loss, and morphological post-processing. On ISIC2018-T1 a stripped-down FCN with these changes reaches a Dice of 0.9070. That beats the original challenge submissions, later FCN methods and several larger U-Net and Transformer models, at a fraction of their compute. I led the team of five and wrote the morphological layers, the loss, preprocessing and evaluation.
Paper awaiting publication · code on acceptance