no. that’s dirt-cheap to calculate because it’s parallelizable in every way (SIMD, threading, GPU, …) and is already parallelized without you doing anything (SIMD, threading) or very little (GPU: UMat).
those neural networks emit masks, not contours, and calculating a contour from a mask is a little more complex.
moving away from masks also potentially forces you to spend that O(N^2) figuring out which goes with what, or coming up with further smart algorithms to make that lookup more efficient.
IoU is trivial in comparison.
also, “similarity” is usually the word to describe shape (i.e. shape matching/description) or any semantic content. since you consider IoU a valid solution, you seem to want to estimate overlap over time.