It is crucial to accurately and rapidly extract dispersion curves of surface waves from ambient noise recordings for inverting the subsurface shear (S) wave velocity structures. Conventional manual picking methods are labor-intensive and affected by subjective factors related to seismologists. The existing deep learning methods can automatically and efficiently extract dispersion curves from dispersion spectrograms with a single branch. However, extracting dispersion curves from phase-velocity dispersion spectrograms with multiple branches remains challenging due to complex label-making processes and extensive label-preparation times. Notably, phase velocities typically display a positive correlation with periods and are slightly higher than group velocities. Given the significance of this empirical relationship, we present an intelligent surface-wave dispersion curves extraction method based on U-net++ and density clustering algorithm. Initially, guided by domain knowledge that dispersion curves are smooth, a global searching method is employed to automatically label group-velocity dispersion curves from group-velocity dispersion spectrograms. Subsequently, the group-velocity dispersion curves undergo transformation into probability images of the curves using a Gaussian function. The U-net++ then nonlinearly converts group-velocity dispersion spectrograms into probability images of group-velocity dispersion curves within a high-dimensional space. Following this, the Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm is applied to obtain multi-mode phase-velocity dispersion curves from phase-velocity dispersion spectrograms. We then remove invalid dispersion values in the multi-mode phase-velocity dispersion curves based on the empirical relationship between phase and group velocities, ultimately obtaining the phase-velocity dispersion curve corresponding to the group-velocity dispersion curve. Our proposed method has been tested using synthetic data and 3D real-world data collected near Lake Chao in Anhui Province. The test results show that our approach effectively extracts both group-velocity and phase-velocity dispersion curves. Inverted S-wave velocity structures based on extracted dispersion curves in real-world data can characterize the Tan-Lu fault zone, demonstrating the effectiveness of our proposed method.