In this study, we proposed a YOLOv8-based Multi-Level Multi-Head Attention mechanism utilizing EO and IR cameras to enable rapid and accurate detection of vessels of various sizes in maritime environments. The proposed method integrates the Scale-Sensitive Cross Attention module and the Self-Attention module, with a particular focus on enhancing small object detection performance in low-resolution IR imagery. By leveraging a multi-level attention mechanism, the model effectively improves detection performance for both small and large objects, outperforming the baseline YOLOv8 model. To further optimize the performance of IR cameras, we introduced a color palette preprocessing technique and identified the optimal palette through a comparative analysis. Experimental results demonstrated that the Average Precision increased from 85.3 to 88.2 in EO camera images and from 68.2 to 73 in IR camera images when the Black Hot palette was applied. The Black Hot palette, in particular, provided high luminance contrast, effectively addressing the single-channel and low-resolution limitations of IR imagery, and significantly improved small object detection performance. The proposed technique shows strong potential for enhancing vessel detection performance under diverse environmental conditions and is anticipated to make a practical contribution to real-time maritime monitoring systems. Furthermore, by delivering high reliability and efficiency in data-constrained environments, this method demonstrates promising scalability for applications in various object detection domains.