A method of detecting defects in a pipe wall comprising - emitting ultrasonic signals from the interior of the pipe towards its wall; - receiving backscattered signals from the wall, a multitude of signals being emitted and received, having their main directions distributed within a plane perpendicular to the pipe axis; - processing the multitude of emitted and received signals, characterized in that said processing uses an imaging process based on transmission times between emission and reception of the emitted and backscattered signals, the imaging process forming a two-dimensional image as a function of position in said plane, wherein said processing comprises a. processing the combination of emitted and received signals to form a first backscatter image using a sound speed model defining values of the sound speed as a function of spatial location, the sound speed model initially including only a sound speed corresponding to a sound speed in the liquid within the pipe; b. determining a position of the pipe's inner surface from the first backscatter image; c. updating the sound speed model, including in the model the sound speed in the pipe wall bounded by the pipe's inner surface in the first backscatter image; d. processing the combination of emitted and received signals to form a second backscatter image using the updated sound speed model. - emitting ultrasonic signals from the interior of the pipe towards its wall; - receiving backscattered signals from the wall, a multitude of signals being emitted and received, having their main directions distributed within a plane perpendicular to the pipe axis; - processing the multitude of emitted and received signals, characterized in that said processing uses an imaging process based on transmission times between emission and reception of the emitted and backscattered signals, the imaging process forming a two-dimensional image as a function of position in said plane, wherein said processing comprises a. processing the combination of emitted and received signals to form a first backscatter image using a sound speed model defining values of the sound speed as a function of spatial location, the sound speed model initially including only a sound speed corresponding to a sound speed in the liquid within the pipe; b. determining a position of the pipe's inner surface from the first backscatter image; c. updating the sound speed model, including in the model the sound speed in the pipe wall bounded by the pipe's inner surface in the first backscatter image; d. processing the combination of emitted and received signals to form a second backscatter image using the updated sound speed model. a. processing the combination of emitted and received signals to form a first backscatter image using a sound speed model defining values of the sound speed as a function of spatial location, the sound speed model initially including only a sound speed corresponding to a sound speed in the liquid within the pipe; b. determining a position of the pipe's inner surface from the first backscatter image; c. updating the sound speed model, including in the model the sound speed in the pipe wall bounded by the pipe's inner surface in the first backscatter image; d. processing the combination of emitted and received signals to form a second backscatter image using the updated sound speed model.