Questions ?

How do I detect a water leak in a pipe using sensor ?

You don't (if by detect you mean locating a leak ) The sensors only tell you that there is water on the floor (or where-ever your sensor is). In other words it can tell you that there is a leak, but not where it is. The leak detector companies I have worked with usually hook a co2 canister up to the water line and then listen (with a very sensitive mic) for where the gas is escaping from the pipe if it's an underground leak. If above ground you follow the flow of water back to the leak.