Multiscale Attention-Based Whistle Segmentation for Biomimetic Communication
This paper proposes a deep learning-based segmentation model for biomimetic underwater acoustic communication systems, capable of extracting dolphin whistle signals from underwater acoustic data containing diverse noise sources while reducing contour discontinuity. The proposed model is based on a U-Net architecture and incorporates the Convolutional Block Attention Module (CBAM) and the Multi-Scale Combining Spatial Attention Module (MSC-SAM) to capture whistle features at multiple resolutions. CBAM is applied to skip connections to emphasize meaningful channels and spatial information related to whistle contours. In addition, MSC-SAM is designed to integrate spatial attention maps generated at each resolution, thereby reducing whistle contour discontinuity that occurs during the segmentation process. The proposed model is evaluated using acoustic data collected by the National Oceanic and Atmospheric Administration (NOAA) and compared with existing models, including U-Net, ResU-Net, U-Net++, FPN, PSPNet, DeepLabv3+, and MA-Net. Experimental results show that the proposed model achieves improved segmentation performance in terms of pixel accuracy, IoU, and Dice score. For the proposed whistle-level evaluation criteria, namely Discontinuous Whistles and Missed Whistles, the proposed model reduces discontinuous whistles and missed detections by 65.6% and 61.1%, respectively, relative to U-Net.
- Research Article
31
- 10.3390/s21237949
- Nov 28, 2021
- Sensors (Basel, Switzerland)
Attention mechanisms have demonstrated great potential in improving the performance of deep convolutional neural networks (CNNs). However, many existing methods dedicate to developing channel or spatial attention modules for CNNs with lots of parameters, and complex attention modules inevitably affect the performance of CNNs. During our experiments of embedding Convolutional Block Attention Module (CBAM) in light-weight model YOLOv5s, CBAM does influence the speed and increase model complexity while reduce the average precision, but Squeeze-and-Excitation (SE) has a positive impact in the model as part of CBAM. To replace the spatial attention module in CBAM and offer a suitable scheme of channel and spatial attention modules, this paper proposes one Spatio-temporal Sharpening Attention Mechanism (SSAM), which sequentially infers intermediate maps along channel attention module and Sharpening Spatial Attention (SSA) module. By introducing sharpening filter in spatial attention module, we propose SSA module with low complexity. We try to find a scheme to combine our SSA module with SE module or Efficient Channel Attention (ECA) module and show best improvement in models such as YOLOv5s and YOLOv3-tiny. Therefore, we perform various replacement experiments and offer one best scheme that is to embed channel attention modules in backbone and neck of the model and integrate SSAM into YOLO head. We verify the positive effect of our SSAM on two general object detection datasets VOC2012 and MS COCO2017. One for obtaining a suitable scheme and the other for proving the versatility of our method in complex scenes. Experimental results on the two datasets show obvious promotion in terms of average precision and detection performance, which demonstrates the usefulness of our SSAM in light-weight YOLO models. Furthermore, visualization results also show the advantage of enhancing positioning ability with our SSAM.
- Research Article
22
- 10.1016/j.oregeorev.2023.105861
- Dec 31, 2023
- Ore Geology Reviews
3D mineral prospectivity modeling in the Sanshandao goldfield, China using the convolutional neural network with attention mechanism
- Research Article
37
- 10.3390/diagnostics13111861
- May 26, 2023
- Diagnostics
Sensor-based human activity recognition with wearable devices has captured the attention of researchers in the last decade. The possibility of collecting large sets of data from various sensors in different body parts, automatic feature extraction, and aiming to recognize more complex activities have led to a rapid increase in the use of deep learning models in the field. More recently, using attention-based models for dynamically fine-tuning the model features and, in turn, improving the model performance has been investigated. However, the impact of using channel, spatial, or combined attention methods of the convolutional block attention module (CBAM) on the high-performing DeepConvLSTM model, a hybrid model proposed for sensor-based human activity recognition, has yet to be studied. Additionally, since wearables have limited resources, analysing the parameter requirements of attention modules can serve as an indicator for optimizing resource consumption. In this study, we explored the performance of CBAM on the DeepConvLSTM architecture both in terms of recognition performance and the number of additional parameters required by attention modules. In this direction, the effect of channel and spatial attention, individually and in combination, were examined. To evaluate the model performance, the Pamap2 dataset containing 12 daily activities and the Opportunity dataset with its 18 micro activities were utilized. The results showed that the performance for Opportunity increased from 0.74 to 0.77 in the macro f1-score owing to spatial attention, while for Pamap2, the performance increased from 0.95 to 0.96 owing to the channel attention applied to DeepConvLSTM with a negligible number of additional parameters. Moreover, when the activity-based results were analysed, it was observed that the attention mechanism increased the performance of the activities with the worst performance in the baseline model without attention. We present a comparison with related studies that use the same datasets and show that we could achieve higher scores on both datasets by combining CBAM and DeepConvLSTM.
- Research Article
- 10.3390/diagnostics16060875
- Mar 16, 2026
- Diagnostics (Basel, Switzerland)
Background: The generation of synthetic CT images from MRI scans represents a crucial step toward enabling MRI-only clinical workflows and supporting multi-modal integration in medical imaging, particularly in radiotherapy planning. Despite significant advancements in deep learning models, many current methods still struggle to reconstruct high-density structures, especially bone, and exhibit limited accuracy in density values. This shortcoming is largely attributed to the passage of excessive or noisy features through skip connections in the traditional U-Net architecture, which degrade the quality of information transmitted to the decoder, negatively impacting the clarity of anatomical boundaries and the pixel-wise accuracy of the resulting synthetic image. Methods: In this work, we propose an enhanced 3D U-Net architecture in which the Convolutional Block Attention Module (CBAM) is systematically integrated within each skip connection. The CBAM sequentially applies channel and spatial attention to adaptively reweight encoder feature maps before fusion with the decoder, thereby emphasizing anatomically relevant structures while suppressing irrelevant feature propagation. The model was trained and evaluated on the SynthRAD2023 (Task 1-Brain) MRI-CT dataset. To rigorously assess the contribution of the attention mechanism, a dedicated ablation study was conducted comparing three variants: 3D U-Net with Squeeze-and-Excitation (SE), Coordinate Attention (CA), and the proposed CBAM module. Performance was evaluated using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), and Normalized Cross-Correlation (NCC). Results: The ablation study demonstrated that the CBAM-enhanced model consistently outperformed both SE- and CA-based variants across all quantitative metrics. Specifically, the proposed method achieved an MAE of 38.2±5.4 HU and an RMSE of 51.0±12.0 HU, representing the lowest reconstruction errors among the evaluated models. In addition, it obtained a PSNR of 29.45±2.10 dB, SSIM of 0.940±0.031, and NCC of 0.967±0.015, indicating superior structural preservation and strong voxel-wise correspondence between synthesized and reference CT volumes. These results confirm that the sequential integration of channel and spatial attention provides a statistically and practically meaningful improvement for high-fidelity MRI-to-CT synthesis. Conclusions: Generating high-resolution brain CT images from brain MRI scans using a 3D U-Net network enhanced with a CBAM module can contribute to supporting the clinical workflow by providing additional diagnostic data without the need for extra radiological examinations, thereby enhancing diagnostic efficiency and reducing radiation exposure. This technique helps reduce patient exposure to radiation and improves accessibility in resource-limited settings. Furthermore, this method is valuable for retrospective studies, surgical planning, and image-guided therapy, where complete multi-modal data may not always be available.
- Conference Article
5
- 10.1109/ieeeconf44664.2019.9048981
- Nov 1, 2019
Utilizing channel-wise spatial attention mechanisms to emphasize special parts of an input image is an effective method to improve the performance of convolutional neural networks (CNNs). There are multiple effective implementations of attention mechanism. One is adding squeeze-and-excitation (SE) blocks to the CNN structure that selectively emphasize the most informative channels and suppress the relatively less informative channels by taking advantage of channel dependence. Another method is adding convolutional block attention module (CBAM) to implement both channel-wise and spatial attention mechanisms to select important pixels of the feature maps while emphasizing informative channels. In this paper, we propose an encoder-decoder architecture based on the idea of letting the channel-wise and spatial attention blocks share the same latent space representation. Instead of separating the channel-wise and spatial attention modules into two independent parts in CBAM, we combine them into one encoder-decoder architecture with two outputs. To evaluate the performance of the proposed algorithm, we apply it to different CNN architectures and test it on image classification and semantic segmentation. Through comparing the resulting structure equipped with MEDA blocks against other attention module, we show that the proposed method achieves better performance across different test scenarios.
- Research Article
62
- 10.3390/agriculture13010011
- Dec 21, 2022
- Agriculture
Seeds are the most fundamental and significant production tool in agriculture. They play a critical role in boosting the output and revenue of agriculture. To achieve rapid identification and protection of maize seeds, 3938 images of 11 different types of maize seeds were collected for the experiment, along with a combination of germ and non-germ surface datasets. The training set, validation set, and test set were randomly divided by a ratio of 7:2:1. The experiment introduced the CBAM (Convolutional Block Attention Module) attention mechanism into MobileNetV2, improving the CBAM by replacing the cascade connection with a parallel connection, thus building an advanced mixed attention module, I_CBAM, and establishing a new model, I_CBAM_MobileNetV2. The proposed I_CBAM_MobileNetV2 achieved an accuracy of 98.21%, which was 4.88% higher than that of MobileNetV2. Compared to Xception, MobileNetV3, DenseNet121, E-AlexNet, and ResNet50, the accuracy was increased by 9.24%, 6.42%, 3.85%, 3.59%, and 2.57%, respectively. Gradient-Weighted Class Activation Mapping (Grad-CAM) network visualization demonstrates that I_CBAM_MobileNetV2 focuses more on distinguishing features in maize seed images, thereby boosting the accuracy of the model. Furthermore, the model is only 25.1 MB, making it suitable for portable deployment on mobile terminals. This study provides effective strategies and experimental methods for identifying maize seed varieties using deep learning technology. This research provides technical assistance for the non-destructive detection and automatic identification of maize seed varieties.
- Preprint Article
- 10.5194/egusphere-egu25-1772
- Mar 18, 2025
With the continuous development of deep learning technologies, fault prediction techniques based on various neural networks have been evolving. The deep learning modules based on U-Net residual networks have shown significant advantages in both learning efficiency and effectiveness. In this paper, we propose a deep learning model that integrates a 3D U-Net residual architecture, Convolutional Block Attention Module (CBAM), and Multi-scale Enhanced Global Attention (MEGA) module for automatic seismic fault detection and segmentation. This model can effectively handle complex 3D seismic data, fully exploiting both spatial and channel information, significantly improving the prediction accuracy for small faults, while only slightly increasing the computational cost.Firstly, the model uses the 3D U-Net as the backbone framework, where the residual blocks (BasicRes) extract features through multiple convolution layers. The CBAM module is incorporated to apply attention weighting, enhancing the model's ability to focus on critical information. The CBAM module combines channel attention and spatial attention, effectively adjusting the importance of feature maps from different dimensions, enabling the model to identify potential fault features in complex seismic data.Secondly, the MEGA module is introduced into the model, which further improves the model's feature representation ability by fusing multi-scale features and applying a global attention mechanism. By weighting global information, the MEGA module helps the model better capture key seismic fault features during feature fusion. This design allows the model to focus not only on local details but also to fully utilize the global contextual information in 3D data, thereby enhancing the accuracy of fault detection.After validation, the model achieved promising results in seismic fault detection tasks, automatically identifying and segmenting fault structures in seismic data. The accuracy was improved from 80% with the original 3D U-Net residual network to 85%-87%. This provides strong support for applications such as seismic exploration and subsurface imaging.Keywords: Seismic Fault Detection, 3D U-Net, Convolutional Block Attention Module (CBAM), Multi-scale Enhanced Global Attention (MEGA), Deep Learning
- Conference Article
- 10.4043/4903-ms
- May 6, 1985
The National Ocean Service, a component of the National Oceanic and Atmospheric Administration, has a new program for providing ocean products and services to the Nation. The key objectives in this program are six-fold:provide ocean products and services that are more responsive to the needs of users,modernize the instrumentation systems needed to collect, process, and disseminate ocean information,increase cooperation with other government agencies and the private sector,improve the efficiency of NOAA's fleet of research and survey ships,survey the U.S. Exclusive Economic Zone, anddetermine the baseline status and trends in the ocean environment. INTRODUCTION The National Oceanic and Atmospheric Administration (NOAA) is part of the U. S. Department of Commerce and is the leading Federal agency in the oceanic and atmospheric sciences. Other agencies are involved in the Earth sciences, such as the U. S. Department of the Interior, or are regulatory in nature, such as the Environmental Protection Agency, but NOAA is the one Federal agency charged specifically with analyzing and predicting the actions of the oceanic and atmospheric components of the Earth's environment. To a large degree, oceanic and atmospheric information, in a myriad of forms and formats, is the main product of the agencies that make up NOAA. The importance of this global, integrated air-sea approach to providing oceanic and atmospheric information products and services from marine maps and charts to weather forecasts--is reflected in the NOAA line offices:National Ocean ServiceNational Weather ServiceNational Marine Fisheries ServicesNational Environmental Satellite, Data, and Information ServiceOffice of Oceanic and Atmospheric Research. Midway through the Reagan Administration's first term, NOAA line offices were reorganized to consolidate programs as part of the Administration's general Government-wide belt tightening, which of course is continuing into the Administration's second term. The idea has been for NOAA to grow leaner but stronger. In this reorganization of NOAA programs, the main thrust of the work of the Weather Service and the Marine Fisheries Service has remained the same. The Office of Oceanic and Atmospheric Research continues to provide research support to the other NOAA components. A trimmed down Environmental Data and Information Service merged with the National Environmental Satellite Service to become today's National Environmental Satellite, Data, and Information Service. The former National Ocean Survey pulled in NOAA's responsibilities under the Coastal Zone Management Act, reorganized some of its major programs, and changed its name to the National Ocean Service. This change from Ocean Survey to Ocean Service was more than just a name change; it gives a clue to other changes and new directions for NOAA in general and for NOAA's programs of ocean services in particular. What is being done throughout NOAA is to emphasize "service," to make NOAA products and services more responsive to the needs of users.
- Dissertation
- 10.58837/chula.the.2023.97
- Jan 1, 2023
Automatic liver tumor segmentation is a highly important application for diagnosing and treating liver tumors. Due to the diversity of tumor shape and intensity alteration, it has become an extremely challenging procedure. Automatic liver tumor segmentation has the potential to establish a diagnostic standard for providing important radiological information to physicians. Recently, deep convolutional neural networks have shown numerous benefits in feature extraction and learning in terms of medical image segmentation. However, the model can be inconsistent in imitating visual attention as well as awareness of radiological expertise for tumor recognition and segmentation tasks due to multi-layer dense feature stacking. Attention mechanisms for optimized feature selection have evolved to bridge that gap in visual attention capabilities. In this research, we propose a novel network called Multi Attention Network (MANet) as a fusion of attention techniques to learn and emphasize significant features while suppressing irrelevant features for liver tumor segmentation. The proposed deep learning network is based on the U-Net architecture. Furthermore, the encoder has a residual mechanism. The convolutional block attention module (CBAM) has been divided into channel attention and spatial attention modules to be implemented in the encoder and decoder separately. The spatial attention mechanism in Attention U-Net has been integrated into the proposed network to capture low-level features to combine with high-level ones. The constructed deep learning architecture is trained and evaluated using multiple evaluation metrics using the publically available MICCAI 2017 Liver Tumor Segmentation (LiTS17) dataset and 3DIRCADb dataset. MANet produced promising results when compared to state-of-the-art methods with relatively low parameter overhead.
- Conference Article
- 10.54941/ahfe1004024
- Jan 1, 2023
- AHFE international
Human-computer interaction has seen a paradigm shift from textual or display-based control towards more intuitive control such as voice, gesture and mimicry. Particularly, speech recognition has attracted a lot of attention because it is the most prominent mode of communication. However, performance of speech recognition systems varies significantly according to sources of background noise, types of talkers and listener's hearing ability. Therefore, lip recognition technology which detects spoken words by tracking speaker's lip movements comes into being. It provides an alternative way for scenes with high background noise and people with hearing impaired problems. Also, lip reading technology has widespread application in public safety analysis, animation lip synthesis, identity authentication and other fields. Traditionally, most work in lipreading was based on hand-engineered features, that were usually modeled by HMM-based pipeline. Recently, deep learning methods are deployed either for extracting 'deep' features or for building end-to-end architectures. In this paper, we propose a neural network architecture combining convolutional Neural Network (CNN) and Recurrent Neural Network (RNN) with a plug-in attention mechanism. The model consists of five parts: (1). Input: We use Dlib library for detecting 68 landmarks of the face, crop the lip area and extract 29 consecutive frames from the video sequence. The frames go through a simple C3D network for generic feature extraction. (2). CNN: with neural networks becoming deeper and deeper, computation complexity increases significantly as well, which motivated the appearance of the lightweight model architecture design. Then a lightweight CNN named ShuffleNet pre-trained on ImageNet dataset is used in our method to perform spatial downsampling of a single image. The ShuffleNet mainly uses two new operations, namely, pointwise group convolution and channel shuffle, which greatly reduce the computational cost without affecting recognition accuracy. (3) CBAM: In the field of image processing, a feature map contains a variety of important information. The traditional convolutional neural network performs convolution in the same way on all channels but importance of information varies greatly depending on different channels. To improve the performance of convolutional neural networks for feature extraction, we utilize an attention mechanism named Convolutional Block Attention Module (CBAM), which is a simple and effective attention module for feedforward convolutional neural networks and contains two independent sub-modules, namely, Channel Attention Module (CAM) and Spatial Attention Module (SAM), which perform Channel and Spatial Attention respectively. (4) RNN: The traditional Recurrent Neural Network (RNN) is mainly used to process sequential data, but with the extension of the RNN network, it may be unable to connect to all related information which may cause key information loss. It cannot solve the long-distance dependence problem and the performance may drop significantly. Due to this shortcoming of the traditional RNN network, we select the GRU network in this paper, which is a variant of the LSTM. It has a simpler structure and better performance than the LSTM neural network. (5) Outputs: Lastly, we pass the result of the backend to SoftMax for classifying the final word. In our experiment, we compare several model architectures and find that our model achieves a comparable accuracy to the current state-of-the-art model at a lower computational cost.
- Research Article
17
- 10.3390/sym16080952
- Jul 25, 2024
- Symmetry
In recent years, attention mechanisms have shown great potential in various computer vision tasks. However, most existing methods focus on developing more complex attention modules for better performance, which inevitably increases the complexity of the model. To overcome performance and complexity tradeoffs, this paper proposes efficient spatial and channel attention (ESCA), a symmetric, comprehensive, and efficient attention module. By analyzing squeeze-and-excitation (SE), convolutional block attention module (CBAM), coordinate attention (CA), and efficient channel attention (ECA) modules, we abandon the dimension-reduction operation of SE module, verify the negative impact of global max pooling (GMP) on the model, and apply a local cross-channel interaction strategy without dimension reduction to learn attention. We not only care about the channel features of the image, we also care about the spatial location of the target on the image, and we take into account the effectiveness of channel attention, so we designed the symmetric ESCA module. The ESCA module is effective, as demonstrated by its application in the ResNet-50 classification benchmark. With 26.26 M parameters and 8.545 G FLOPs, it introduces a mere 0.14% increment in FLOPs while achieving over 6.33% improvement in Top-1 accuracy and exceeding 3.25% gain in Top-5 accuracy. We perform image classification and object detection tasks on ResNet, MobileNet, YOLO, and other architectures on popular datasets such as Mini ImageNet, CIFAR-10, and VOC 2007. Experiments show that ESCA can achieve great improvement in model accuracy at a very small cost, and it performs well among similar models.
- Research Article
11
- 10.1016/j.bspc.2022.104344
- Nov 7, 2022
- Biomedical Signal Processing and Control
A combination of simple and dilated convolution with attention mechanism in a feature pyramid network to segment leukocytes from blood smear images
- Conference Article
5
- 10.1109/igarss.2007.4423732
- Jan 1, 2007
The National Oceanic and Atmospheric Administration (NOAA) is responsible for archiving and disseminating environmental data collected by a variety of ground and space-based observing systems. Integrating data management across NOAA represents a significant change in NOAA business practices that will require evolution of the management structures and approaches used in NOAA for data management. Historically, and dissemination activities have been implemented in dedicated stovepipe systems, each focusing on the needs of a particular data collection and its associated user community. Exponential data volume growth, increasing data diversity, user requirements for common and consistent access methods across data types, and the need for economic efficiency are driving a consolidation of the information technology (IT) systems that support NOAA archives. The Comprehensive Large Array-data Stewardship (CLASS) is a result of this consolidation; CLASS is the enterprise IT solution in support of NOAA archives. Against this backdrop, the meaning of archive is itself changing as the challenges of long-term digital preservation are better understood. It is no longer sufficient to simply preserve bits. Instead, information content is the target of preservation, with bits simply providing a medium for representing information. The ISO standard Reference Model for an Open Archival Information System (OAIS-RM) provides a conceptual framework that describes the responsibilities and activities of organizations attempting to preserve digital information. Applying the OAIS-RM to NOAA's efforts provides the means to identify high-level responsibilities, delegate roles to various NOAA organizational components, and describe the means by which these entities work together to fulfill requirements. At the highest level, NOAA archives maintain and apply information- and user-specific knowledge while CLASS provides IT capabilities in support of activities. Together, the archives and CLASS provide the necessary ingredients to fulfill NOAA's mission. Currently, CLASS holds POES, DMSP, GOES, and MetOp data. Planned future campaigns include NPP, NPOESS, EOS MODIS, NEXRAD, and model and in-situ data. To ensure the preservation of these data, CLASS has implemented a multiple site distributed system that replicates data and metadata holdings automatically. Additionally, CLASS supports the deployment of points of presence that allow the co-location of key CLASS capabilities with high-volume or otherwise critical data producers or consumers to mitigate economic constraints or meet quality-of-service requirements. Among the key challenges facing CLASS are: massive increases in data volumes, the extraordinary diversity of NOAA data, evolving user needs and requirements, and the ever-changing technology environment. CLASS must address all of these challenges - and more - at the same time it ensures the safeguarding and availability of its current holdings. CLASS is evolving toward a service-oriented architecture that provides the flexibility, scalability, and generality necessary to accommodate the vast amount of change in its environment and at the same time provide interoperability with other systems and systems of systems necessary to support NOAA's position in the environmental data arena. Adoption of standards is critical to NOAA's success, and CLASS is working with NOAA's Global Earth Observation Integrated Data Environment (GEO-IDE) project to identify standards that will ensure CLASS'S interoperability with other NOAA systems. The lack of broad, uniform utilization of IT standards that adequately meet NOAA's data integration needs is arguably the most acute factor contributing to the weakness of data integration today. GEO-IDE will ultimately ensure that key NOAA systems, including CLASS, are interoperable within NOAA, with US-Global Earth Observation (US-GEO), and ultimately with US-Global Earth Observation (GEOSS). In addition to its work with GEO-IDE, CLASS is also developing pilots for geospatial capabilities, and dissemination standards to facilitate interoperability and meet user needs. This paper will present the guiding principles and lessons learned while developing CLASS to date. We will discuss our challenges, accomplishments, and future work, as well as how CLASS aligns with NOAA's strategic goals.
- Research Article
192
- 10.1109/jstars.2022.3198517
- Jan 1, 2022
- IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing
Change detection methods play an indispensable role in remote sensing. Some change detection methods have obtained a fairly good performance by introducing attention mechanism on the basis of the convolutional neural network (CNN), but identifying intricate changes remains difficult. In response to these problems, this article proposes a new model for detecting changes in remote sensing, namely, MTCNet, which combines the advantages of multi-scale Transformer with the convolutional block attention module (CBAM) to improve the detection quality of different remote sensing images. On the basis of traditional convolutions, the Transformer module is introduced to extract bitemporal image features by modeling contextual information. Based on the Transformer module, a multi-scale module is designed to form a multi-scale Transformer, which can obtain features at different scales in bitemporal images, thereby identifying the changes we are interested in. Based on the multiscale Transformer module, the CBAM is introduced. The CBAM is split into a spatial attention module (SAM) and a channel attention module (CAM), which are applied to the front and back ends of the multi-scale Transformer respectively. Spatial information and channel information of feature maps are modeled separately. In this article, the validity and efficiency of the method are verified by a large number of experiments on the LEVIR-CD dataset and the WHU-CD dataset.
- Research Article
2
- 10.54097/hset.v38i.5806
- Mar 16, 2023
- Highlights in Science, Engineering and Technology
Fruit image classification has significant potential value in agricultural harvesting and commercial fruit trading. However, the wide variety of fruits and their complex and diverse properties make the fruit image classification using computer vision techniques with high accuracy still challenging. This paper aims to introduce attention mechanism into the convolutional neural networks to improve the models' accuracy for the classification and explore the impact of the convolutional block attention module (CBAM) implementation before and after convolution layers on model performance. Firstly a 16-layer CNN model called BasicCNN was built. Secondly, two models named BasicCNN+CBAM_v1 and BasicCNN+CBAM_v2 were built by adding CBAM layers before the first convolution layer and after the convolution layers of the BasicCNN. Then a test set was created called Real-world, containing more diverse fruit images than another open-source dataset, Fruit360, that was also used in this research. Lastly, the three network models were trained and evaluated using two datasets, Fruits 360 and Real-world. Among the tests on the Real-world test set, the accuracy of BasicCNN(16.67%) was much lower than that of BasicCNN+CBAM_v1(48.89%) and BasicCNN+CBAM_v2(46.73%). Moreover, BasicCNN+CBAM_v1 also achieved the highest accuracy on Fruit360 datasets. The results show that the CNN model obtains a performance improvement when the CBAM is added and that implementing the attention mechanism before the convolution also allows the model to achieve better performance.