CAENet: Contrast adaptively enhanced network for medical image segmentation based on a differentiable pooling function