Right now I am using Images.jl only for image filtering on CPU within extract_edges. I do not use label_components because it is broken for one-dimensional arrays and does not support "neighbors wrapping" required for Torus() topology. The same reason I have my own distance_transform. Maybe it's worth a while to investigate if DSP.jl can work with arrays on GPU and remove a dependency on Images.jl?