hi is there a way for mask by Polydensity?
Not exactly but Mask PeaksAndValleys is a good alternative.