In order to solve the problem of small underwater target detection and recognition,the methods of sonar image filtering,image segmentation and target extraction based on side-scan sonar are studied. Conventional filtering methods are difficult to effectively remove the noise in the image,resulting in degradation of image quality. In this paper,the non-local means filter algorithm and GPU acceleration method are used to obtain better processing results of sonar images,and to meet the real-time requirement of small underwater target detection. At the same time,the expansion algorithm and Canny edge detection algorithm are combined to realize the effective distinction between true and false underwater targets.