Extracting dense rotating objects accurately from remote sensing images is an emerging task in object detection. To increase the applicability of existing algorithms in the above tasks, an optimized anchor-free network optimized by a dual attention mechanism (DAM) and gate multiscale feature fusion (GMFF) is designed. The DAM module is composed of two attention mechanisms with different functions. This part can enhance the backbone network's ability to extract and model information at different levels and reduce the accuracy loss caused by object density changes in the image. The GMFF module uses the gating structure to realize adaptive transmission and integration of multiscale information. Through this module, the useless information in features will be filtered, and the key information will be retained. Several experiments are designed to verify the feasibility of the algorithm. Compared with the baseline model, adding DAM and GMFF to the dense rotating object extraction task in remote sensing images improves the model accuracy by 3.5% and 2.1%, respectively, while adding two modules simultaneously, and the accuracy increases from 79.1% to 84.3%. In conventional object extraction tasks, such as dataset for object detection in aerial images and HRSC2016, our method has the highest accuracy compared to other similar algorithms, with 76.5% and 90.3%, respectively.