Musical Instrument Classification using Audio Features and Convolutional Neural Network

  • Gst. Ayu Vida Mastrika Giri Universitas Udayana
  • Made Leo Radhitya Institut Bisnis dan Teknologi Indonesia
Keywords: Audio Signal Processing, Audio Features, Convolutional Neural Network, Music Information Retrieval, Musical Instrument Classification

Abstract

The classification of acoustic instruments is the subject of this research, which utilizes Convolutional Neural Networks (CNNs). We employ a dataset from Kaggle that includes audio recordings of the piano, violin, drums, and guitar. In the training set, the dataset comprises 700 samples of guitar, percussion, and violin and 528 samples of piano. The test set contains 80 samples of each instrument. Mel spectrograms, MFCCs, and other spectral and non-spectral characteristics are among the features that can be extracted using the librosa package. Three feature sets—spectral-only, non-spectral-only, and a combined set—are employed to evaluate the efficacy of CNN models—various CNNs configurations by adjusting the number of convolutional filters, learning rates, and epochs. The combined feature set achieves the highest performance, with a validation accuracy of 71.8% and a training accuracy of 76.9%. In contrast, non-spectral features achieve 68.4% validation accuracy, while spectral-only features achieve 69.3%. These findings demonstrate the advantages of employing a vast feature set for precise classification.

Downloads

Download data is not yet available.

References

K. Racharla, V. Kumar, C. B. Jayant, A. Khairkar, and P. Harish, “Predominant musical instrument classification based on spectral features,” in 2020 7th International Conference on Signal Processing and Integrated Networks, SPIN 2020, 2020. doi: 10.1109/SPIN48934.2020.9071125.

S. R. Chaudhary, S. N. Kakarwal, and J. V. Bagade, “Feature selection and classification of indian musical string instruments using svm,” Indian Journal of Computer Science and Engineering, vol. 12, no. 4, 2021, doi: 10.21817/indjcse/2021/v12i4/211204142.

P. K. Aurchana, “Musical Instruments Sound Classification using GMM,” London Journal of Social Sciences, 2021, doi: 10.31039/ljss.2021.1.37.

C. Dewi, A. P. S. Chen, and H. J. Christanto, “Recognizing Similar Musical Instruments with YOLO Models,” Big Data and Cognitive Computing, vol. 7, no. 2, 2023, doi: 10.3390/bdcc7020094.

S. Rajesh and N. J. Nalini, “Musical instrument emotion recognition using deep recurrent neural network,” in Procedia Computer Science, 2020. doi: 10.1016/j.procs.2020.03.178.

Y. Su, “Instrument Classification Using Different Machine Learning and Deep Learning Methods,” Highlights in Science, Engineering and Technology, vol. 34, 2023, doi: 10.54097/hset.v34i.5435.

S. K. Mahanta, N. J. Basisth, E. Halder, A. F. U. R. Khilji, and P. Pakray, “Exploiting cepstral coefficients and CNN for efficient musical instrument classification,” Evolving Systems, vol. 15, no. 3, 2024, doi: 10.1007/s12530-023-09540-x.

C.-W. Weng, C.-Y. Lin, and J.-S. R. Jang, “Music Instrument Identification Using MFCC: Erhu as an Example,” Chinese Music Dept, Tainan National …, 2004.

M. Blaszke and B. Kostek, “Musical Instrument Identification Using Deep Learning Approach,” Sensors, vol. 22, no. 8, 2022, doi: 10.3390/s22083033.

SOUMENDRA PRASAD MOHANTY, “Musical Instrument’s Sound Dataset.” Accessed: Jun. 01, 2024. [Online]. Available: https://www.kaggle.com/datasets/soumendraprasad/musical-instruments-sound-dataset/

D. S. Lau and R. Ajoodha, “Music Genre Classification: A Comparative Study Between Deep Learning and Traditional Machine Learning Approaches,” in Lecture Notes in Networks and Systems, 2022. doi: 10.1007/978-981-16-2102-4_22.

J. L. Leevy, J. M. Johnson, J. Hancock, and T. M. Khoshgoftaar, “Threshold optimization and random undersampling for imbalanced credit card data,” J Big Data, vol. 10, no. 1, 2023, doi: 10.1186/s40537-023-00738-z.

R. A. Nawasta, N. H. Cahyana, and H. Heriyanto, “Implementation of Mel-Frequency Cepstral Coefficient as Feature Extraction using K-Nearest Neighbor for Emotion Detection Based on Voice Intonation,” Telematika, vol. 20, no. 1, 2023, doi: 10.31315/telematika.v20i1.9518.

P.-N. Tan, M. Steinbach, A. Karpatne, and V. Kumar, “Introduction to data mining Pang-Ning Tan, Michael Steinbach, Anuj Karpatne, Vipin Kumar.,” Introduction to data mining, 2019.

Published
2024-07-25
How to Cite
[1]
G. A. V. M. Giri and M. L. Radhitya, “Musical Instrument Classification using Audio Features and Convolutional Neural Network”, JAIC, vol. 8, no. 1, pp. 226-234, Jul. 2024.
Section
Articles