The present disclosure relates to a method and a system for image segmentation, the technique includes: obtaining a lung image and a lung model based on a plurality of chest image samples in a training set pre-processing a lung image acquiring a binary image of boundaries of the lung image performing the generalized Hough transform on the binary image to locate initial boundaries of the lung image and obtain a Hough location aligning the lung model to Hough location to obtain an alignment result applying dynamic programming algorithm to the alignment result to obtain a segmentation result and transforming the segmentation result back to the original coordinate system.