UAV images are characterized by small targets, difficult to identify in the background image, clustering and sparse distribution of targets, etc. Many researchers have proposed the clustering target detection method (ClusDet) for UAV images. However, due to the large differences in target scales and uneven distribution of targets in UAV images, showing long-tailed distribution, the traditional ClusDet algorithm tends to truncate large and medium targets in the process of clustering; in the detection process, the fixed-threshold NMS method in the ClusDet algorithm is difficult to adaptively detect targets of different sizes, clustering and mutual occlusion. To address the above problems, this paper proposes an adaptive clustered target detection algorithm based on UAV images under long-tail distribution. The method is divided into three sub-networks: the adaptive clustering sub-network, which outputs several segmented images of small target clustering regions by extracting potential small target clustering regions in UAV aerial images; the segmentation and filling sub-network, which fills the images with disproportionate aspect ratio for the output of the adaptive clustering network to keep the size of the images within the reasonable range required by the detection network; and the detection sub-network, which detects the targets within the reasonable range required by the detection network by introducing attention mechanism, using variable threshold NMS, and training using sample balancing strategy effectively improve the detection accuracy of targets in the clustered region. Trained in VisDrone 2019 dataset, the simulation results show that the UAV image adaptive clustering target detection method based on long-tailed distribution has a large improvement in the detection accuracy of small targets, and can effectively improve the detection accuracy of the model for targets in the aggregation region, while the model has good generalization ability.