Automatic segmentation of vertebrae in spinal x-ray images is crucial for clinical diagnosis, case analysis, and surgical planning of spinal lesions. However, due to the inherent characteristics of x-ray images, including low contrast, high noise, and uneven grey scale, it remains a critical and challenging problem in computer-aided spine image analysis and disease diagnosis applications. In this paper, a Multiscale Feature Enhancement Network (MFENet), is proposed for segmenting whole spinal x-ray images, to aid doctors in diagnosing spinal-related diseases. To enhance feature extraction, the network incorporates a Dual-branch Feature Extraction Module (DFEM) and a Semantic Aggregation Module (SAM). The DFEM has a parallel dual-branch structure. The upper branch utilizes multiscale convolutional kernels to extract features from images. Employing convolutional kernels of different sizes helps capture details and structural information at different scales. The lower branch incorporates attention mechanisms to further optimize feature representation. By modeling the feature maps spatially and across channels, the network becomes more focused on key feature regions and suppresses task-irrelevant information. The SAM leverages contextual semantic information to compensate for details lost during pooling and convolution operations. It integrates high-level feature information from different scales to reduce segmentation result discontinuity. In addition, a hybrid loss function is employed to enhance the network's feature extraction capability. In this study, we conducted a multitude of experiments utilizing dataset provided by the Spine Surgery Department of Henan Provincial People's Hospital. The experimental results indicate that our proposed MFENet demonstrates superior segmentation performance in spinal segmentation on x-ray images compared to other advanced methods, achieving 92.61±0.431 for MIoU, 92.42±0.329 for DSC, and 99.51±0.037 for Global_accuracy. Our model is able to more effectively learn and extract global contextual semantic information, significantly improving spinal segmentation performance, further aiding doctors in analyzing patient conditions.