We present a segmentation process for detecting localized corrosion on rust-removed metallic surface based on a deep learning algorithm. In the proposed process, first the corrosion images are enhanced by a preprocessing technique, then a patch extraction process is used to collect the image set to train the deep learning model, which is used to segment the target image later. Finally, the segmentation result is improved by a postprocessing method. The performance of the segmentation process is verified with classification indicators and the receiver operating characteristic curve. The results show that the proposed method is effective in identifying localized corrosion from the metallic background, which can provide an accurate quantitative analysis tool to study the corrosion behavior.