Ultrasound imaging is commonly used to identify and study peripheral nerves, but image quality issues such as noise, low contrast, and unclear structures make accurate analysis difficult. To address this, a deep learning-based approach is proposed that combines preprocessing, segmentation, and classification. CLAHE and SRAD are first applied to improve image quality by enhancing contrast and reducing noise. Then, an Attention U-Net model is used to detect the nerve region by focusing on important areas while reducing background interference. The detected region is extracted and passed to an EfficientNet-B0 model for classification. The system is trained and tested on the Kaggle ultrasound nerve dataset with around 5,600 images. The results show improved Dice score, IoU, and classification accuracy compared to existing methods, indicating that the proposed method provides a reliable and efficient solution for automated ultrasound nerve analysis.
Introduction
This study focuses on the automatic detection and classification of nerves in ultrasound images, which is important for medical procedures such as anesthesia administration, pain management, and surgical guidance. Although ultrasound imaging is widely used because it is real-time, portable, and cost-effective, nerve identification remains challenging due to speckle noise, low contrast, shadows, and variations in nerve appearance among patients. Traditionally, nerve detection is performed manually by experts, making the process time-consuming and subject to human variability.
To address these challenges, the authors propose a deep learning-based pipeline consisting of four stages: image preprocessing, nerve segmentation, region-of-interest (ROI) extraction, and classification. The system is trained and evaluated using the Kaggle Ultrasound Nerve Segmentation dataset, which contains approximately 5,600 annotated ultrasound images of the brachial plexus nerve region.
The preprocessing stage combines Contrast Limited Adaptive Histogram Equalization (CLAHE) and Speckle Reducing Anisotropic Diffusion (SRAD) to enhance image contrast and reduce noise while preserving important nerve boundaries. For segmentation, the model employs Attention U-Net, which uses attention gates to focus on relevant nerve regions and suppress background information. After segmentation, the nerve-containing ROI is extracted from the image and passed to an EfficientNet-B0 classifier, which automatically learns discriminative features and performs binary classification.
The models are implemented using TensorFlow and Keras, with data augmentation techniques such as rotation, flipping, brightness adjustment, and elastic deformation used to improve generalization. Attention U-Net is trained using a combination of Dice loss and binary cross-entropy, while EfficientNet-B0 is optimized using the Adam optimizer.
Experimental results show that the proposed method significantly outperforms traditional approaches. The Attention U-Net achieves a Dice coefficient of 0.88 and an Intersection over Union (IoU) score of 0.81, compared to the standard U-Net’s Dice score of 0.71 and IoU of 0.63. The EfficientNet-B0 classifier achieves an overall classification accuracy of 95%, surpassing earlier models such as HPyS-Net (91.8%).
Compared with existing methods, the proposed system provides more accurate nerve boundary detection, better handling of small and irregularly shaped nerves, and greater robustness due to its two-stage segmentation-and-classification strategy. The study concludes that combining advanced preprocessing techniques with Attention U-Net and EfficientNet-B0 creates a reliable and efficient framework for automated ultrasound nerve analysis, making it suitable for practical clinical applications.
Conclusion
In this work, a deep learning system is developed to automatically find and classify nerves in ultrasound images. Earlier Methods like HPyS-Net [1] used manually designed features, which limited their performance. To solve these problems, this system uses four steps: CLAHE–SRAD preprocessing [5][6], Attention U-Net for segmentation [3], ROI extraction, and EfficientNet-B0 for classification [4]. This helps reduce noise, improve contrast, and handle differences in nerve shapes.
The use of attention in the U-Net model helps the system focus better on the nerve region, giving better results than the normal U-Net model [2]. The system achieves a Dice score of 0.88, IoU of 0.81, and accuracy of 0.95 on the Kaggle dataset [7]. Since it learns features directly from the data instead of using manual features like GLCM, LOOP, and LVP, it works better and can handle different cases more easily.
In the future, this work can be improved by using 3D ultrasound data, adding explainable AI methods to understand how the model makes decisions, and testing the system in real hospitals. It can also be extended to identify different types of structures, such as nerves and arteries.
References
[1] V. Ramaswamy, S. Ponnada, J. Kotti, S. Nagarajan, N. V. Kumar, and S. K. Krishnamoorthy, \"Pyramid SpinalNet-based nerve structure segmentation and classification using ultrasound nerve image,\" Knowledge-Based Systems, vol. 330, p. 114705, 2025.
[2] O. Ronneberger, P. Fischer, and T. Brox, \"U-Net: Convolutional Networks for Biomedical Image Segmentation,\" in Medical Image Computing and Computer-Assisted Intervention (MICCAI), 2015, pp. 234-241.
[3] O. Oktay et al., \"Attention U-Net: Learning Where to Look for the Pancreas,\" in Proceedings of Medical Imaging with Deep Learning (MIDL), 2018.
[4] M. Tan and Q. V. Le, \"EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks,\" in Proceedings of ICML, 2019.
[5] S. M. Yu and S. T. Acton, \"Speckle Reducing Anisotropic Diffusion,\" IEEE Transactions on Image Processing, vol. 11, no. 11, pp. 1260-1270, 2002.
[6] K. Zuiderveld, \"Contrast Limited Adaptive Histogram Equalization,\" in Graphics Gems IV, Academic Press, 1994, pp. 474-485.
[7] Kaggle, \"Ultrasound Nerve Segmentation Dataset,\" Available: https://www.kaggle.com/c/ultrasound-nerve-segmentation, accessed 2024.
[8] J. Long, E. Shelhamer, and T. Darrell, \"Fully Convolutional Networks for Semantic Segmentation,\" in Proceedings of CVPR, 2015.
[9] C. A. Jimenez-Castano et al., \"Random Fourier Features-based Deep Learning Improvement with Class Activation Interpretability for Nerve Structure Segmentation,\" Sensors, vol. 21, no. 22, p. 7741, 2021.
[10] R. Ranjbarzadeh et al., \"Nerve optic segmentation in CT images using a deep learning model and a texture descriptor,\" Complex and Intelligent Systems, vol. 8, no. 4, pp. 3543-3557, 2022.
[11] G. Smerilli et al., \"Development of a convolutional neural network for the identification and measurement of the median nerve on ultrasound images,\" Arthritis Research and Therapy, vol. 24, no. 1, p. 38, 2022.
[12] M. Di Cosmo et al., \"A deep learning approach to median nerve evaluation in ultrasound images of carpal tunnel inlet,\" Medical and Biological Engineering and Computing, vol. 60, no. 11, pp. 3255-3264, 2022.
[13] A. Huang, L. Jiang, J. Zhang, and Q. Wang, \"Attention-VGG16-UNet: a novel deep learning approach for automatic segmentation of the median nerve in ultrasound images,\" Quantitative Imaging in Medicine and Surgery, vol. 12, no. 6, pp. 3138-3150, 2022.
[14] T. Michael and I. C. Obagbuwa, \"Nerve segmentation of ultrasound images Bayesian U-Net models,\" International Journal of Intelligent Systems, 2024.
[15] C. L. Yeh et al., \"Real-time automated segmentation of median nerve in dynamic ultrasonography using deep learning,\" Ultrasound in Medicine and Biology, vol. 49, no. 5, pp. 1129-1136, 2023.
[16] R. R. Selvaraju et al., \"Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization,\" in Proceedings of ICCV, 2017.
[17] D. Han, J. Kim, and J. Kim, \"Deep Pyramidal Residual Networks,\" in Proceedings of CVPR, pp. 5927-5935, 2017.
[18] A. Colonna and F. Scarpa, \"Improving corneal nerve segmentation using tolerance Dice loss function,\" Signal, Image and Video Processing, vol. 18, pp. 1069-1077, 2023.
[19] F. Balsiger et al., \"Segmentation of peripheral nerves from magnetic resonance neurography: a fully-automatic deep learning-based approach,\" Frontiers in Neurology, vol. 9, p. 777, 2018.
[20] K. He, X. Zhang, S. Ren, and J. Sun, \"Deep Residual Learning for Image Recognition,\" in Proceedings of CVPR, 2016, pp. 770-778.
[21] A. Vaswani et al., \"Attention Is All You Need,\" in Advances in Neural Information Processing Systems (NeurIPS), 2017.
[22] R. Castro et al., \"U-Net vs. TransUNet: performance comparison in medical image segmentation,\" in International Conference on Applied Technologies, Springer, 2022.
[23] J. Chen et al., \"TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation,\" arXiv preprint arXiv:2102.04306, 2021.
[24] F. Jin, P. Fieguth, L. Winger, and E. Jernigan, \"Adaptive Wiener filtering of noisy images and image sequences,\" in Proceedings of ICIP, 2003.
[25] N. Zulpe and V. Pawar, \"GLCM textural features for brain tumor classification,\" International Journal of Computer Science Issues, vol. 9, no. 3, p. 354, 2012.