As a boundary of two water masses with different properties, oceanic fronts have important influences on many fields such as fishery, marine military and environmental protection. How to quickly and accurately implement automatic detection and identification of ocean front is of great scientific significance for ocean monitoring and forecasting. In this paper, the deep learning image segmentation network is combined with the method of extracting frontal features, and the detection models of frontal area and frontal line are established by using U-Net architecture. Meanwhile, the residual unit is used to improve the feature extraction network in the processes of encoding and decoding. The results show that the deep learning frontal detection model can accurately extract the features of frontal area and frontal line. The Dice coefficients reach 0.92 and 0.97 respectively, achieving a good detection performance. In this paper, the model is trained by the sample data of different frontal thresholds. The comparison results show that the accuracy of model is significantly improved after the threshold of sample set is reduced.