The rapid spread of invasive plants presents significant challenges for the management of grasslands. Uncrewed aerial vehicles (UAVs) offer a promising solution for fast and efficient monitoring, although the optimal methodologies require further refinement. The objective of this research was to establish a rapid, repeatable, and cost-effective computer-assisted method for extracting Pedicularis kansuensis (P. kansuensis), an invasive plant species. To achieve this goal, an investigation was conducted into how different backgrounds (swamp meadow, alpine steppe, land cover) impact the detection of plant invaders in the Bayanbuluk grassland in Xinjiang using Random Forest (RF), Support Vector Machine (SVM) and eXtreme Gradient Boosting (XGBoost) with three feature combinations: spectral band, vegetation index (VI), and spectral band + VI. The results indicate that all three feature combinations achieved an overall accuracy ranging from 0.77 to 0.95. Among the three models, XGBoost demonstrates the highest accuracy, followed by Random Forest (RF), while Support Vector Machine (SVM) exhibits the lowest accuracy. The most significant feature bands for the three field plots, as well as the invasive species and land cover, were concentrated at 750 nm, 550 nm, and 660 nm. It was found that the green band proved to be the most influential for improving invasive plant extraction while the red edge 750 nm band ranked highest for overall classification accuracy among these feature combinations. The results demonstrate that P. kansuensis is highly distinguishable from co-occurring native grass species, with accuracies ranging from 0.9 to 1, except for SVM with six spectral bands, indicating high spectral variability between its flowers and those of co-occurring native background species.