Underwater target detection is mainly achieved through two methods: optical imaging and sonar scanning. Compared to optical imaging, sonar target detection has the characteristics of strong penetration and long scanning distance, which makes it more suitable for tasks such as deep sea, turbid water, and long-distance target detection. However, currently, sonar image detection still faces the following challenges: 1) difficulty in obtaining underwater sonar images and scarcity of existing open-source sonar datasets; 2) the quality of sonar image is poor, which is limited by environmental noise interference, sonar equipment and related signal processing technology; 3) compared to optical images, sonar images are more difficult to detect small targets; and 4) due to the influence of underwater terrain, debris, and the degree of self decay. There are significant differences in the distribution of targets in sonar images, and different types of sonar (such as side scan sonar, forward view sonar, and so on) have significant differences in visual presentation. Therefore, our letter proposes an underwater target detection framework based on improved ScEMA-YOLOv8 and conducts comparative experiments on data enhancement and transfer learning. Experimental results have shown that the improved model achieves 98.4% and 97.6% mAP@0.5 and it can also achieve high precision and meet the requirements of real-time.