Common detection approaches for recognizing small targets are ineffective due to inherent constraints in remote sensing image, including noise and a lack of specific information about small targets. This paper presents a new model for improving the detection accuracy of small targets in remote sensing images. The initial modifications to the feature extraction stage and introducing an architecture attention mechanism. Furthermore, a transformer block is utilized to enhance the representation of the feature map. The discriminative information extraction is enhanced by employing a distinctive attention-guided bidirectional feature pyramid network. This is accomplished by carefully pulling properties from the superficial network using a dynamic and sparse attention technique. Furthermore, top-down pathways are used to improve feature integration into the subsequent network modules. A Rectified Intersection Over Union loss function is introduced to specifically handle the limitations of the loss function, hence enhancing the alignment between the detected and ground-truth bounding boxes in terms of maintaining consistent shapes. Empirical evaluations on the DIOR, VHR-10 and VisDrone2019 datasets provide empirical confirmation of Improved-YOLOv8s performance, with considerable increases in mean Average Precision (mAP) for small targets, overall mAP, model parameters, and Frames Per Second (FPS). The findings demonstrate the efficacy of the modifications made in our adaptation of the original YOLOv8s model. The application of these strategies significantly enhances the performance of the proposed algorithm in detecting small targets in remote sensing images. A comparative evaluation of the original YOLOv8s architecture indicates considerable improvements in recognition accuracy.