There’s a relatively obvious constraint to check here: compositing the layers back together should produce a (near) identical image. Would it not be preferable to throw an error if the model fails to faithfully segment the image?