This study introduces a Convolutional Neural Network with an Attention Mechanism (CNN+AM), utilizing the Squeeze-and-Excitation (SE) block, to classify critical ship components: generators, engines, and oil-water separators (OWS). The SE block enhances the model's ability to focus on discriminative features, thereby improving classification performance. To overcome the limitation of the original dataset, which contained only 199 images, extensive data augmentation techniques were applied, expanding the dataset to 2,648 images. The augmented dataset was divided into training (70%), validation (15%), and testing (15%) sets to ensure reliable evaluation. Experimental results show that the CNN-AM achieved an accuracy of 72.39%, surpassing the baseline CNN model with 68.16%. These findings confirm that the attention mechanism significantly improves generalization and the ability to differentiate visually similar classes. Furthermore, the integration of interpretability tools, such as Gradient-weighted Class Activation Mapping (Grad-CAM), provides visual explanations of model predictions, increasing trust and reliability for safety-critical maritime applications. The proposed approach demonstrates strong potential for real-time ship component monitoring, offering meaningful contributions to predictive maintenance and operational safety within the maritime industry.