A deep learning model named Cracklab for pixel level segmentation and measurement of concrete cracks is proposed. Cracklab excels at handling cracks at image edges and enhances scale adaptability, and it reduces physical occupation and increases efficiency by pruning. A crack database containing 685 images collected from complex scenes is established, with resolution ranging from 1024 to 2048 pixels. During training, focal loss is used to improve the recognition effect of complex background images. The results show that our method is more effective and accurate in detecting and quantifying cracks. Cracklab performed better in inference and comparative experiments, with mIoU at least 0.114 ahead and detection speeds 3.9 times faster compared to works that did not include pruning and scale adaptation. The proposed improved medial axis transform method has an error of 2.09 pixels at the maximum crack width, which is 19.6% lower than another work using distance transform method.