Target detection from UAV perspective has been a very hot task in recent years. Due to the flying height of the UAV, the detection targets in the photographs are dense and small in scale, resulting in little available information and difficulty in feature extraction. And the prediction bias of small targets can have a large negative impact on the calculation of losses. So for better use of UAV, YOLO-HLFE is designed on the basis of YOLOv7. The coordinate attention mechanism is added to the MP downsampling structure to comprise MPFE downsampling structure, which makes full use of the location information of the target and enhances the feature extraction capability of the network. The complete intersection over union (CIOU) of YOLOv7 is combined with the Normalized Gaussian Wasserstein Distance loss (NWD) to constitute the CIOU-NWD loss to mitigate the prediction bias problem for small targets. In addition, in order to make the anchor point of the model closer to the target scale of the UAV perspective, the clustering method of the model is improved and the anchor point is re-clustered. In experiment using the sliced VisDrone2021-DET dataset and SeaDronesSeeV2 dataset, the mAP50 and mAP of YOLO-HLFE on sliced VisDrone2021-DET dataset reach 52.3% and 30.0%, which are 2.8% and 0.9% higher than the baseline, respectively.