Locusts have always been among the important hazards affecting crop growth and the grassland ecological environment. Accurate and timely detection of locusts is crucial for effective control of insect development. Aiming at the problem of false detection and missed detection caused by locust occlusion and background similarity in complex field environments, this paper proposes a lightweight Attention-based Target Detection (ATD) model while constructing the dataset Real-Locust with the theme of Locusta migratoria ssp. manilensis. By introducing to attention mechanism and lightweight design, the model achieves a mean average precision (mAP) of 90.9% on the Real-Locust dataset, and the precision and recall rate are increased by 0.6% and 4.3%, respectively. At the same time, the number of parameters and computational complexity are reduced by 27.4% and 22.9%, showing that this provides an efficient solution for real-time monitoring of locusts.