Cracking is a common pavement distress that would cause further severe problems if not repaired timely, which means that it is important to accurately extract the information of pavement cracks through detection and segmentation. Automated pavement crack detection and segmentation using deep learning are more efficient and accurate than conventional methods, which could be further improved. While many existing studies have utilized deep learning in pavement crack segmentation, which segments cracks from non-crack regions, few studies have taken the exact pavement crack detection into account, which identifies cracks in the images from other objects. A two-step pavement crack detection and segmentation method based on convolutional neural network was proposed in this paper. An automated pavement crack detection algorithm was developed using the modified You Only Look Once 3rd version in the first step. The proposed crack segmentation method in the second step was based on the modified U-Net, whose encoder was replaced with a pre-trained ResNet-34 and the upsample part was added with spatial and channel squeeze and excitation (SCSE) modules. Proposed method combines pavement crack detection and segmentation together, so that the detected cracks from the first step are segmented in the second step to improve the accuracy. A dataset of pavement crack images in different circumstances were also built for the study. The F1 score of proposed crack detection and segmentation methods are 90.58% and 95.75%, respectively, which are higher than other state-of-the-art methods. Compared with existing one-step pavement crack detection or segmentation methods, proposed two-step method showed advantages of accuracy.