Deep Learning-Based Classification of Common Lung Sounds via Auto-Detected Respiratory Cycles
Abstract
1. Introduction
2. Material and Methods
2.1. Data Acquisition
2.2. Time-Frequency Representations
2.2.1. Scalogram
2.2.2. Spectrogram
2.2.3. Mel-Spectrogram
2.2.4. Gammatonegram
2.3. Convolutional Neural Networks
2.4. Proposed Model
3. Results
4. Conclusions and Discussion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Roguin, A. Rene Theophile Hyacinthe Laënnec (1781–1826): The man behind the stethoscope. Clin. Med. Res. 2006, 4, 230–235. [Google Scholar] [CrossRef] [PubMed]
- Bohadana, A.; Izbicki, G.; Kraman, S.S. Fundamentals of lung auscultation. N. Engl. J. Med. 2014, 370, 2053. [Google Scholar] [CrossRef]
- Lehrer, S. Understanding Lung Sounds with Audio CD, 3rd ed.; WB Saunders: London, UK, 2008. [Google Scholar]
- Mangione, S.; Nieman, L.Z. Pulmonary auscultatory skills during training in internal medicine and family practice. Am. J. Respir. Crit. Care Med. 1999, 159, 1119–1124. [Google Scholar] [CrossRef]
- Kim, Y.; Hyon, Y.; Jung, S.S.; Lee, S.; Yoo, G.; Chung, C.; Ha, T. Respiratory sound classification for crackles, wheezes, and rhonchi in the clinical field using deep learning. Sci. Rep. 2021, 11, 17186. [Google Scholar] [CrossRef]
- Melbye, H.; Garcia-Marcos, L.; Brand, P.; Everard, M.; Priftis, K.; Pasterkamp, H. Wheezes, crackles and rhonchi: Simplifying description of lung sounds increases the agreement on their classification: A study of 12 physicians’ classification of lung sounds from video recordings. BMJ Open Respir. Res. 2016, 3, e000136. [Google Scholar] [CrossRef]
- Pratama, D.A.; Husni, N.L.; Prihatini, E.; Muslimin, S.; Homzah, O.F. Implementation of DSK TMS320C6416T module in modified stethoscope for lung sound detection. J. Phys. Conf. Ser. 2020, 1500, 012012. [Google Scholar] [CrossRef]
- Saqib, M.; Iftikhar, M.; Neha, F.; Karishma, F.; Mumtaz, H. Artificial intelligence in critical illness and its impact on patient care: A comprehensive review. Front. Med. 2023, 10, 1176192. [Google Scholar] [CrossRef] [PubMed]
- Acharya, J.; Basu, A. Deep neural network for respiratory sound classification in wearable devices enabled by patient specific model tuning. IEEE Trans. Biomed. Circuits Syst. 2020, 14, 535–544. [Google Scholar] [CrossRef] [PubMed]
- Nguyen, T.; Pernkopf, F. Lung sound classification using snapshot ensemble of convolutional neural networks. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 760–763. [Google Scholar] [CrossRef]
- Er, M.B. Akciğer Seslerinin Derin Öğrenme ile Sınıflandırılması. Gazi Üniversitesi Fen Bilimleri Dergisi Part C Tasarım ve Teknoloji 2020, 8, 830–844. [Google Scholar] [CrossRef]
- Demir, F.; Ismael, A.M.; Sengur, A. Classification of lung sounds with CNN model using parallel pooling structure. IEEE Access 2020, 8, 105376–105383. [Google Scholar] [CrossRef]
- Jung, S.-Y.; Liao, C.-H.; Wu, Y.-S.; Yuan, S.-M.; Sun, C.-T. Efficiently classifying lung sounds through depthwise separable CNN models with fused STFT and MFCC features. Diagnostics 2021, 11, 732. [Google Scholar] [CrossRef]
- Lang, R.; Fan, Y.; Liu, G.; Liu, G. Analysis of unlabeled lung sound samples using semi-supervised convolutional neural networks. Appl. Math. Comput. 2021, 411, 126511. [Google Scholar] [CrossRef]
- Gupta, S.; Agrawal, M.; Deepak, D. Gammatonegram based triple classification of lung sounds using deep convolutional neural network with transfer learning. Biomed. Signal Process. Control 2021, 70, 102947. [Google Scholar] [CrossRef]
- Tariq, Z.; Shah, S.K.; Lee, Y. Feature-based fusion using CNN for lung and heart sound classification. Sensors 2022, 22, 1521. [Google Scholar] [CrossRef]
- Petmezas, G.; Cheimariotis, G.-A.; Stefanopoulos, L.; Rocha, B.; Paiva, R.P.; Katsaggelos, A.K.; Maglaveras, N. Automated lung sound classification using a hybrid CNN-LSTM network and focal loss function. Sensors 2022, 22, 1232. [Google Scholar] [CrossRef]
- Pham Thi Viet, H.; Nguyen Thi Ngoc, H.; Tran Anh, V.; Hoang Quang, H. Classification of lung sounds using scalogram representation of sound segments and convolutional neural network. J. Med. Eng. Technol. 2022, 46, 270–279. [Google Scholar] [CrossRef] [PubMed]
- Engin, M.A.; Aras, S.; Gangal, A. Extraction of low-dimensional features for single-channel common lung sound classification. Med. Biol. Eng. Comput. 2022, 60, 1555–1568. [Google Scholar] [CrossRef] [PubMed]
- Yang, R.; Liu, Y.; Lv, K.; Huang, Y.; Sun, M.; Wu, Y.; Yue, Z.; Cao, P.; Yang, J. Respiratory sound classification by applying deep neural network with a blocking variable. SSRN Electron. J. 2022. [Google Scholar] [CrossRef]
- Cinyol, F.; Baysal, U.; Köksal, D.; Babaoğlu, E.; Ulaşlı, S.S. Incorporating support vector machine to the classification of respiratory sounds by Convolutional Neural Network. Biomed. Signal Process. Control 2023, 79, 104093. [Google Scholar] [CrossRef]
- Khan, R.; Khan, S.U.; Saeed, U.; Koo, I.-S. Auscultation-based pulmonary disease detection through parallel transformation and deep learning. Bioengineering 2024, 11, 586. [Google Scholar] [CrossRef]
- Wu, C.; Ye, N.; Jiang, J. Classification and recognition of lung sounds based on improved bi-ResNet model. IEEE Access 2024, 12, 73079–73094. [Google Scholar] [CrossRef]
- Zhang, W.; Liu, X. Decoding breath: Machine learning advancements in diagnosing pulmonary diseases via lung sound analysis. Sci. Eng. Lett. 2024, 12, 1–11. [Google Scholar]
- Rocha, B.M.; Filos, D.; Mendes, L.; Serbes, G.; Ulukaya, S.; Kahya, Y.P.; Jakovljevic, N.; Turukalo, T.L.; Vogiatzis, I.M.; Perantoni, E.; et al. An open access database for the evaluation of respiratory sound classification algorithms. Physiol. Meas. 2019, 40, 035001. [Google Scholar] [CrossRef]
- Owens, D. R.A.L.E. lung sounds 3.0. J. Hosp. Palliat. Nurs. 2023, 5, 139–141. [Google Scholar] [CrossRef]
- Aras, S.; Öztürk, M.; Gangal, A. Automatic detection of the respiratory cycle from recorded, single-channel sounds from lungs. Turk. J. Electr. Eng. Comput. Sci. 2018, 26, 11–22. [Google Scholar] [CrossRef]
- Hadjileontiadis, L.J. Lung sounds: An advanced signal processing perspective. Synth. Lect. Biomed. Eng. 2008, 3, 1–100. [Google Scholar] [CrossRef]
- Sarna, M.L.A.; Hossain, M.R.; Islam, M.A. Comparative analysis of STFT and Wavelet Transform in time-Frequency Analysis of non-Stationary Signals. Nov. J. 2004, 11, 72–78. [Google Scholar] [CrossRef]
- Ustubioglu, B.; Tahaoglu, G.; Ulutas, G. Detection of audio copy-move-forgery with novel feature matching on Mel spectrogram. Expert. Syst. Appl. 2023, 213, 118963. [Google Scholar] [CrossRef]
- Fedila, M.; Bengherabi, M.; Amrouche, A. Gammatone filterbank and symbiotic combination of amplitude and phase-based spectra for robust speaker verification under noisy conditions and compression artifacts. Multimed. Tools Appl. 2018, 77, 16721–16739. [Google Scholar] [CrossRef]
- Lecun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE Inst. Electr. Electron. Eng. 1998, 86, 2278–2324. [Google Scholar] [CrossRef]
- Chamberlain, D.; Kodgule, R.; Ganelin, D.; Miglani, V.; Fletcher, R.R. Application of semi-supervised deep learning to lung sound analysis. In Proceedings of the 2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA, 16–20 August 2016; pp. 804–807. [Google Scholar] [CrossRef]








| Sound Type | Number of Subjects | Number of Respiratory Cycles |
|---|---|---|
| Normal (N) | 30 | 100 |
| Rhonchi (R) | 23 | 100 |
| Fine Crackle (FC) | 20 | 100 |
| Coarse Crackle (CC) | 21 | 100 |
| Total Database | 94 | 400 |
| Architecture | Key Features |
|---|---|
| DenseNet201 | Densely connected layers, improved information flow, reduces overfitting and fewer parameters for DNN. |
| VGGNet | Deep architecture (16 or 19 layers), 3 × 3 filters, ReLU activation and pooling layers for feature reduction. |
| InceptionV3 | Modular structure, multiscale feature learning and smaller filters (1 × 1) for computational efficiency. |
| MobileNetV2 | Inverted residual blocks, depthwise convolutions, lightweightness and efficiency for mobile applications. |
| ResNet50V2 | Residual learning, 50 layers, block-wise connections and enhanced performance in deeper networks. |
| Time-Frequency Representation | Feature Extractor | CNN Classifier Accuracy % | LSTM Classifier Accuracy % | SVM Classifier Accuracy % |
|---|---|---|---|---|
| Spectrogram | DenseNet 201 | 85.3 ± 2.3 | 80.0 ± 2.8 | 75.0 ± 3.1 |
| VGG16 | 75.0 ± 3.4 | 70.0 ± 3.8 | 67.5 ± 4.0 | |
| VGG19 | 82.5 ± 2.9 | 77.5 ± 3.2 | 72.5 ± 3.6 | |
| InceptionV3 | 77.5 ± 3.6 | 77.5 ± 3.4 | 72.5 ± 3.9 | |
| MobileNetV2 | 82.5 ± 2.7 | 80.0 ± 3.0 | 77.5 ± 3.3 | |
| ResNet50V2 | 75.0 ± 3.5 | 70.0 ± 3.9 | 72.5 ± 3.7 | |
| Mel-spectrogram | DenseNet 201 | 90.3 ± 2.1 | 85.0 ± 2.6 | 82.5 ± 2.9 |
| VGG16 | 82.5 ± 3.0 | 75.0 ± 3.4 | 70.0 ± 3.8 | |
| VGG19 | 87.5 ± 2.5 | 80.0 ± 3.0 | 75.0 ± 3.3 | |
| InceptionV3 | 75.0 ± 3.7 | 75.0 ± 3.6 | 72.5 ± 3.9 | |
| MobileNetV2 | 80.0 ± 3.2 | 72.5 ± 3.6 | 75.0 ± 3.5 | |
| ResNet50V2 | 80.0 ± 2.9 | 77.5 ± 3.3 | 82.5 ± 2.8 | |
| Scalogram | DenseNet 201 | 92.5 ± 2.0 | 75.0 ± 3.5 | 82.5 ± 3.0 |
| VGG16 | 90.0 ± 2.6 | 75.0 ± 3.7 | 67.5 ± 4.2 | |
| VGG19 | 87.5 ± 2.8 | 80.0 ± 3.2 | 67.5 ± 4.0 | |
| InceptionV3 | 80.0 ± 3.6 | 85.0 ± 3.1 | 60.0 ± 4.5 | |
| MobileNetV2 | 85.0 ± 3.0 | 85.0 ± 2.9 | 77.5 ± 3.4 | |
| ResNet50V2 | 87.5 ± 2.7 | 85.0 ± 3.0 | 80.0 ± 3.3 | |
| Gammatonegram | DenseNet 201 | 97.3 ± 1.9 | 82.5 ± 3.0 | 85.0 ± 2.8 |
| VGG16 | 87.5 ± 2.6 | 85.0 ± 2.9 | 77.5 ± 3.4 | |
| VGG19 | 85.0 ± 3.0 | 82.5 ± 3.2 | 80.0 ± 3.3 | |
| InceptionV3 | 80.0 ± 3.6 | 77.5 ± 3.8 | 72.5 ± 4.0 | |
| MobileNetV2 | 87.5 ± 2.7 | 82.5 ± 3.1 | 77.5 ± 3.5 | |
| ResNet50V2 | 85.0 ± 2.8 | 75.0 ± 3.9 | 72.5 ± 4.1 |
| Normal | Rhonchi | Fine Crackle | Coarse Crackle | |
|---|---|---|---|---|
| Normal | 10 | 0 | 0 | 0 |
| Rhonchi | 1 | 9 | 0 | 0 |
| Fine Crackle | 0 | 0 | 10 | 0 |
| Coarse Crackle | 0 | 0 | 0 | 10 |
| Spectrogram | Mel-Spectrogram | Scalogram | Gammatonegram | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Class | Pre. | Rec. | F1 | Pre. | Rec. | F1 | Pre. | Rec. | F1 | Pre. | Rec. | F1 |
| DenseNet201 | FC | 0.75 | 0.90 | 0.82 | 0.82 | 0.90 | 0.86 | 0.83 | 1.00 | 0.91 | 0.91 | 1.00 | 0.95 |
| CC | 0.88 | 0.70 | 0.78 | 1.00 | 0.80 | 0.89 | 1.00 | 0.90 | 0.95 | 1.00 | 0.90 | 0.95 | |
| R | 0.82 | 0.90 | 0.86 | 0.82 | 0.90 | 0.86 | 0.89 | 0.80 | 0.84 | 1.00 | 1.00 | 1.00 | |
| N | 1.00 | 0.90 | 0.95 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | |
| VGG16 | FC | 0.89 | 0.80 | 0.84 | 0.88 | 0.70 | 0.78 | 0.83 | 1.00 | 0.91 | 0.90 | 0.90 | 0.90 |
| CC | 0.58 | 0.70 | 0.64 | 0.71 | 1.00 | 0.83 | 0.90 | 0.90 | 0.90 | 0.86 | 0.60 | 0.71 | |
| R | 0.56 | 0.50 | 0.53 | 0.88 | 0.70 | 0.78 | 0.89 | 0.80 | 0.84 | 0.77 | 1.00 | 0.87 | |
| N | 1.00 | 1.00 | 1.00 | 0.90 | 0.90 | 0.90 | 1.00 | 0.90 | 0.95 | 1.00 | 1.00 | 1.00 | |
| VGG19 | FC | 0.78 | 0.70 | 0.74 | 1.00 | 0.80 | 0.89 | 0.75 | 0.90 | 0.82 | 0.80 | 0.80 | 0.80 |
| CC | 1.00 | 0.80 | 0.89 | 0.75 | 0.90 | 0.82 | 0.90 | 0.90 | 0.90 | 0.78 | 0.70 | 0.74 | |
| R | 0.67 | 0.80 | 0.73 | 0.80 | 0.80 | 0.80 | 0.89 | 0.80 | 0.84 | 0.82 | 0.90 | 0.86 | |
| N | 0.91 | 1.00 | 0.95 | 1.00 | 1.00 | 1.00 | 1.00 | 0.90 | 0.95 | 1.00 | 1.00 | 1.00 | |
| InceptionV3 | FC | 0.80 | 0.80 | 0.80 | 0.78 | 0.70 | 0.74 | 0.67 | 0.80 | 0.73 | 0.73 | 0.80 | 0.76 |
| CC | 0.64 | 0.70 | 0.67 | 0.88 | 0.70 | 0.78 | 0.89 | 0.80 | 0.84 | 0.75 | 0.60 | 0.67 | |
| R | 0.70 | 0.70 | 0.70 | 0.55 | 0.60 | 0.57 | 0.78 | 0.70 | 0.74 | 0.75 | 0.90 | 0.82 | |
| N | 1.00 | 0.90 | 0.95 | 0.83 | 1.00 | 0.91 | 0.90 | 0.90 | 0.90 | 1.00 | 0.90 | 0.95 | |
| MobileNetV2 | FC | 0.75 | 0.90 | 0.82 | 0.78 | 0.70 | 0.74 | 0.73 | 0.80 | 0.76 | 0.83 | 1.00 | 0.91 |
| CC | 0.86 | 0.60 | 0.71 | 0.73 | 0.80 | 0.76 | 0.89 | 0.80 | 0.84 | 1.00 | 0.60 | 0.75 | |
| R | 0.80 | 0.80 | 0.80 | 0.73 | 0.80 | 0.76 | 0.82 | 0.90 | 0.86 | 0.75 | 0.90 | 0.82 | |
| N | 0.91 | 1.00 | 0.95 | 1.00 | 0.90 | 0.95 | 1.00 | 0.90 | 0.95 | 1.00 | 1.00 | 1.00 | |
| ResNet50V2 | FC | 0.64 | 0.90 | 0.75 | 0.69 | 0.90 | 0.78 | 0.80 | 0.80 | 0.80 | 0.82 | 0.90 | 0.86 |
| CC | 1.00 | 0.50 | 0.67 | 0.78 | 0.70 | 0.74 | 0.82 | 0.90 | 0.86 | 0.80 | 0.80 | 0.80 | |
| R | 0.64 | 0.70 | 0.67 | 0.86 | 0.60 | 0.71 | 0.89 | 0.80 | 0.84 | 0.78 | 0.70 | 0.74 | |
| N | 0.90 | 0.90 | 0.90 | 0.91 | 1.00 | 0.95 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | |
| Data Splitting Rate (Train/Validation/Test) | Accuracy % (Mean ± Standard Deviation) |
|---|---|
| 80/10/10 | 97.3 ± 1.9 |
| 70/10/20 | 95.6 ± 2.4 |
| 60/10/30 | 93.8 ± 2.9 |
| 50/10/40 | 91.5 ± 3.6 |
| References | Data Size and Type (Multi/Single Ch.) | Dataset Creation Methods | Classification Methods | Results |
|---|---|---|---|---|
| [33] | 171 normal, 33 wheeze, 19 crackle, 4 wheeze and crackle and single-channel | Four-second recordings | Spectrograms with a semi-supervised DL method | AUC; 86% wheeze; 74% crackle. |
| [9] | 886 wheezes, 1864 crackles 506 wheezes+ crackles and 3642 normal (ICBHI 2017) | Manually labelled respiratory cycle durations | Mel-spectrograms with a CNN-RNN based model | Score: 71.81% |
| [5] | 297 crackles, 298 wheezes, 101 rhonchi and single-channel | Divided LS into 6 s each with a 50% overlapping | Mel-spectrograms with VGG16 | Accuracy: 85.7% |
| [15] | 702 normal, 436 crackles and 295 wheezes | Manually labelled respiratory cycle durations | Gammatonegrams With ResNet-50 | Accuracy: 98.80% |
| [17] | 886 wheezes, 1864 crackles, 506 wheezes+ crackles and 3642 normal (ICBHI 2017) | Cycles with a duration that exceeds 2.7 s were cropped, preserving the first 2.7 s, while cycles with a duration lower than 2.7 s were expanded using sample padding. | Spectrograms with CNN−LSTM and loss function selection | Accuracy: 76.39% |
| [21] | 105 normal, 116 crackle and 73 rhonchi | Fixed 15 s period | Spectrograms with VGG16-CNN-SVM | Accuracy: 83% |
| [22] | 886 wheezes, 1864 crackles, 506 wheezes + crackles and 3642 normal (ICBHI 2017) | Zero padding for a constant duration of 6 s | Scalograms with a Parallel Convolutional Autoencoder (CAE), LSTM | Accuracy: 80% |
| [24] | 886 wheezes, 1864 crackles, 506 wheezes + crackles and 3642 normal (ICBHI 2017) | Sampling time: 6 s | Mel-spectrograms with VGG19 and the Convolutional Block Attention Module (CBAM) | Score: 75.73% |
| Proposed | 100 normal, 100 rhonchi, 100 fine crackles, 100 coarse crackles and single-channel | Automatic | Gammatonegrams with DenseNet201 | Accuracy: 97.0% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Engin, M.A.; Uzun Arslan, R.; Senyer Yapici, İ.; Aras, S.; Gangal, A. Deep Learning-Based Classification of Common Lung Sounds via Auto-Detected Respiratory Cycles. Bioengineering 2026, 13, 170. https://doi.org/10.3390/bioengineering13020170
Engin MA, Uzun Arslan R, Senyer Yapici İ, Aras S, Gangal A. Deep Learning-Based Classification of Common Lung Sounds via Auto-Detected Respiratory Cycles. Bioengineering. 2026; 13(2):170. https://doi.org/10.3390/bioengineering13020170
Chicago/Turabian StyleEngin, Mustafa Alptekin, Rukiye Uzun Arslan, İrem Senyer Yapici, Selim Aras, and Ali Gangal. 2026. "Deep Learning-Based Classification of Common Lung Sounds via Auto-Detected Respiratory Cycles" Bioengineering 13, no. 2: 170. https://doi.org/10.3390/bioengineering13020170
APA StyleEngin, M. A., Uzun Arslan, R., Senyer Yapici, İ., Aras, S., & Gangal, A. (2026). Deep Learning-Based Classification of Common Lung Sounds via Auto-Detected Respiratory Cycles. Bioengineering, 13(2), 170. https://doi.org/10.3390/bioengineering13020170

