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 by 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. The gradient-sensitive term automatically determines the driving direction of the level set based on the image characteristics, and its external energy function accelerates the motion of the zero level set toward the target boundary, while the internal energy function drives the zero level set. The external energy function accelerates the zero level set toward the target boundary, while the internal energy function drives the zero level set away from the flat region. The method improves the speed and stability of level set evolution; it can extract weak edges by adjusting the sensitivity of level sets to different intensity edges; and it does not require interactive operation. The experimental results show that the method is fast, accurate and robust in segmenting grayscale inhomogeneous images.