Underwater target detection based on sonars is an important research subject. Due to the low quality,low contrast and blurred edges of sonar images,the recognition method based on feature extraction cannot meet the current requirements in terms of accuracy and speed. In view of this,this paper introduces YOLOv3 based on convolutional neural network(CNN)into the target recognition task of sonar images. First,the images are preprocessed by dynamic brightness distribution and median filtering to establish a data set,then the YOLOv3 model is trained and tested,and finally the false detection rate is reduced through eliminating false targets according to the unchanged location of the static target. The test results showed that compared with the existing feature recognition algorithm,this algorithm has higher efficiency and lower false detection rate.