Aiming at the problems of tiny targets, large target scale changes, and background information interference in target detection of UAV(Unmanned Aerial Vehicle) aerial images, a revised UAV target detection algorithm MCA-YOLOv7 based on YOLOv7 is proposed, and the algorithm advances from the following points: optimizing the FPN(Feature Pyramid Networks) structure to increase the small-target detection layer, and boosting the network's detection ability for small targets. To enhance the multi-scale feature extraction capability, the Efficient Multi-Scale Attention(EMA) is added. In order to reduce the complexity of the model and reduce the confusion of background information, the context aggregation block (CABlock) was introduced and improved, and an effective context aggregation block (ECABlock) was proposed. The loss function CIoU is enhanced and a new loss function FCIoU is proposed, which accelerates the convergence speed of the model, and obtains more accurate regression results. The experimental results demonstrate that the MCA-YOLOv7 model reduces the number of model parameters by 4.7 M and increases the average accuracy (