In order to achieve fast and accurate segmentation of grayscale inhomogeneous images with complex structure, a level set method integrating local energy and gradient sensitivity is proposed, and the gradient-sensitive energy function is used to improve the local energy minimization level set method, and the level set is automatically initialized using the grayscale global information. The local energy function is defined by the local gray scale fitting function, which is the external driving energy of the level set, and is suitable for segmenting gray scale inhomogeneous images.