            F.conv3d(
                F.pad(x, list(self.padding)[::-1], mode='replicate'),
                self.kernel.repeat(CH, 1, 1, 1, 1).to(x.device, x.dtype),
                stride=1,
                groups=CH,
            )
            .view(B, CH, -1, D, H, W)
            .max(dim=2, keepdim=False)[0]
        )
        mask = x > max_non_center
        if mask_only:
            return mask